- Fix renaming a FAT volume.
Note that this does not fix the fact that the volume name can be in the bpb or in a diri. The dosfs_identify_partition() only returns the label in the bpb so more usually than not it will show one name in Tracker's mount menu and a different name when mounted. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30837 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1017,7 +1017,7 @@ dosfs_write_fs_stat(fs_volume *_vol, const struct fs_info * fss, uint32 mask)
|
||||
if ((vol->sectors_per_fat == 0 && (buffer[0x42] != 0x29
|
||||
|| strncmp(buffer + 0x47, vol->vol_label, 11) != 0))
|
||||
|| (vol->sectors_per_fat != 0 && (buffer[0x26] != 0x29
|
||||
|| strncmp(buffer + 0x2b, vol->vol_label, 11) != 0))) {
|
||||
|| strncmp(buffer + 0x2b, vol->vol_label, 11) == 0))) {
|
||||
dprintf("dosfs_wfsstat: label mismatch\n");
|
||||
block_cache_set_dirty(vol->fBlockCache, 0, false, tid);
|
||||
result = B_ERROR;
|
||||
@@ -1033,7 +1033,9 @@ dosfs_write_fs_stat(fs_volume *_vol, const struct fs_info * fss, uint32 mask)
|
||||
buffer = diri_init(vol, vol->root_vnode.cluster, vol->vol_entry, &diri);
|
||||
|
||||
// check if it is the same as the old volume label
|
||||
if ((buffer == NULL) || (strncmp(buffer, vol->vol_label, 11))) {
|
||||
dprintf("buffer = %s\n", buffer);
|
||||
dprintf("vol->vol_label = %s\n", vol->vol_label);
|
||||
if ((buffer == NULL) || (strncmp(buffer, vol->vol_label, 11) == 0)) {
|
||||
dprintf("dosfs_wfsstat: label mismatch\n");
|
||||
diri_free(&diri);
|
||||
result = B_ERROR;
|
||||
|
||||
Reference in New Issue
Block a user