mirror of
https://git.code.sf.net/p/ntfs-3g/ntfs-3g.git
synced 2024-11-23 10:04:00 +08:00
Fixed updating the backup boot sector in ntfslabel
The location of the backup boot sector was one-off
This commit is contained in:
parent
fa0a7a5686
commit
8f0fbd286d
@ -299,8 +299,9 @@ static int set_new_serial(ntfs_volume *vol)
|
||||
serial_number = cpu_to_le64(sn);
|
||||
}
|
||||
if (!change_serial(vol, 0, serial_number, bs, oldbs)) {
|
||||
number_of_sectors = sle64_to_cpu(bs->number_of_sectors);
|
||||
if (!change_serial(vol, number_of_sectors,
|
||||
number_of_sectors = ntfs_device_size_get(vol->dev,
|
||||
vol->sector_size);
|
||||
if (!change_serial(vol, number_of_sectors - 1,
|
||||
serial_number, bs, oldbs)) {
|
||||
ntfs_log_info("New serial number : %016llx\n",
|
||||
(long long)le64_to_cpu(
|
||||
|
Loading…
Reference in New Issue
Block a user