mirror of
git://sourceware.org/git/lvm2.git
synced 2025-02-25 21:57:45 +03:00
Add warnings to check udev did what it was meant to.
This commit is contained in:
parent
aaa01e3488
commit
2ad32d9518
@ -194,9 +194,14 @@ static int _rm_link(const char *dev_dir, const char *vg_name,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lstat(lv_path, &buf) || !S_ISLNK(buf.st_mode)) {
|
if (lstat(lv_path, &buf) && errno == ENOENT)
|
||||||
if (errno == ENOENT)
|
return 1;
|
||||||
return 1;
|
else if (dm_udev_get_sync_support())
|
||||||
|
log_warn("The link %s should have been removed by udev "
|
||||||
|
"but it is still present. Falling back to "
|
||||||
|
"direct link removal.", lv_path);
|
||||||
|
|
||||||
|
if (!S_ISLNK(buf.st_mode)) {
|
||||||
log_error("%s not symbolic link - not removing", lv_path);
|
log_error("%s not symbolic link - not removing", lv_path);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user