ntfs_boot_sector_parse: hints on error (Ralph Corderoy, Szabolcs Szakacsits)

master
szaka 2008-05-05 15:53:40 +00:00
parent a6ec7d343b
commit 68e382fc9d
1 changed files with 8 additions and 3 deletions

View File

@ -151,6 +151,13 @@ not_ntfs:
return ret;
}
static const char *last_sector_error =
"HINTS: Either the volume is a RAID/LDM but it wasn't setup yet,\n"
" or it was not setup correctly (e.g. by not using mdadm --build ...),\n"
" or a wrong device is tried to be mounted,\n"
" or the partition table is corrupt (partition is smaller than NTFS),\n"
" or the NTFS boot sector is corrupt (NTFS size is not valid).\n";
/**
* ntfs_boot_sector_parse - setup an ntfs volume from an ntfs boot sector
* @vol: ntfs_volume to setup
@ -198,9 +205,7 @@ int ntfs_boot_sector_parse(ntfs_volume *vol, const NTFS_BOOT_SECTOR *bs)
SEEK_SET) == -1) {
ntfs_log_perror("Failed to read last sector (%lld)",
(long long)sectors);
ntfs_log_error("Perhaps the volume is a RAID/LDM but it wasn't "
"setup yet, or the\nwrong device was used, "
"or the partition table is incorrect.\n" );
ntfs_log_error("%s", last_sector_error);
return -1;
}