mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
Fix dm_task_set_name to properly resolve path to dm name.
Wrong variable was checked in _dm_task_set_name_from_path.
This commit is contained in:
parent
60d0b63380
commit
0fd3ed18f1
@ -1,5 +1,6 @@
|
|||||||
Version 1.02.73 -
|
Version 1.02.73 -
|
||||||
====================================
|
====================================
|
||||||
|
Fix dm_task_set_name to properly resolve path to dm name (1.02.71).
|
||||||
Add dm_strncpy() function as a faster strncpy() replacement.
|
Add dm_strncpy() function as a faster strncpy() replacement.
|
||||||
|
|
||||||
Version 1.02.72 - 23rd February 2012
|
Version 1.02.72 - 23rd February 2012
|
||||||
|
@ -526,7 +526,7 @@ static int _dm_task_set_name_from_path(struct dm_task *dmt, const char *path,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!stat(path, &st2) && (st1.st_rdev == st2.st_rdev))
|
if (!stat(buf, &st2) && (st1.st_rdev == st2.st_rdev))
|
||||||
final_name = name;
|
final_name = name;
|
||||||
else if (_find_dm_name_of_device(st1.st_rdev, buf, sizeof(buf)))
|
else if (_find_dm_name_of_device(st1.st_rdev, buf, sizeof(buf)))
|
||||||
final_name = buf;
|
final_name = buf;
|
||||||
|
Loading…
Reference in New Issue
Block a user