1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-13 09:34:37 +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:
Peter Rajnoha 2012-02-28 08:36:51 +00:00
parent 792343a694
commit 25b25bd1a2
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
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.
Version 1.02.72 - 23rd February 2012

View File

@ -526,7 +526,7 @@ static int _dm_task_set_name_from_path(struct dm_task *dmt, const char *path,
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;
else if (_find_dm_name_of_device(st1.st_rdev, buf, sizeof(buf)))
final_name = buf;