diff --git a/libntfs-3g/bootsect.c b/libntfs-3g/bootsect.c index f13a11cd..f3ffb5d1 100644 --- a/libntfs-3g/bootsect.c +++ b/libntfs-3g/bootsect.c @@ -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; }