ntfs_mst_post_read_fixup, ntfs_mst_pre_write_fixup: log all errors
parent
18213bb6a9
commit
501217f1df
|
@ -2,7 +2,7 @@
|
|||
* mst.c - Multi sector fixup handling code. Originated from the Linux-NTFS project.
|
||||
*
|
||||
* Copyright (c) 2000-2004 Anton Altaparmakov
|
||||
* Copyright (c) 2006 Szabolcs Szakacsits
|
||||
* Copyright (c) 2006-2009 Szabolcs Szakacsits
|
||||
*
|
||||
* This program/include file is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as published
|
||||
|
@ -63,6 +63,7 @@ int ntfs_mst_post_read_fixup(NTFS_RECORD *b, const u32 size)
|
|||
(u32)(usa_ofs + (usa_count * 2)) > size ||
|
||||
(size >> NTFS_BLOCK_SIZE_BITS) != usa_count) {
|
||||
errno = EINVAL;
|
||||
ntfs_log_perror("%s", __FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
/* Position of usn in update sequence array. */
|
||||
|
@ -91,6 +92,7 @@ int ntfs_mst_post_read_fixup(NTFS_RECORD *b, const u32 size)
|
|||
*/
|
||||
b->magic = magic_BAAD;
|
||||
errno = EIO;
|
||||
ntfs_log_perror("Incomplete multi-sector transfer");
|
||||
return -1;
|
||||
}
|
||||
data_pos += NTFS_BLOCK_SIZE/sizeof(u16);
|
||||
|
@ -142,6 +144,7 @@ int ntfs_mst_pre_write_fixup(NTFS_RECORD *b, const u32 size)
|
|||
if (!b || ntfs_is_baad_record(b->magic) ||
|
||||
ntfs_is_hole_record(b->magic)) {
|
||||
errno = EINVAL;
|
||||
ntfs_log_perror("%s: bad argument", __FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
/* Setup the variables. */
|
||||
|
@ -153,6 +156,7 @@ int ntfs_mst_pre_write_fixup(NTFS_RECORD *b, const u32 size)
|
|||
(u32)(usa_ofs + (usa_count * 2)) > size ||
|
||||
(size >> NTFS_BLOCK_SIZE_BITS) != usa_count) {
|
||||
errno = EINVAL;
|
||||
ntfs_log_perror("%s", __FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
/* Position of usn in update sequence array. */
|
||||
|
|
Loading…
Reference in New Issue