mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-18 10:04:20 +03:00
readlink does not append a null byte to the output string!
This commit is contained in:
parent
d36644c20d
commit
e8ee29e9c1
@ -1145,6 +1145,7 @@ int dm_device_has_mounted_fs(uint32_t major, uint32_t minor)
|
|||||||
log_sys_error("readlink", sysfs_path);
|
log_sys_error("readlink", sysfs_path);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
temp_path[size] = '\0';
|
||||||
|
|
||||||
if (!(kernel_dev_name = strrchr(temp_path, '/'))) {
|
if (!(kernel_dev_name = strrchr(temp_path, '/'))) {
|
||||||
log_error("Could not locate device kernel name in sysfs path %s", temp_path);
|
log_error("Could not locate device kernel name in sysfs path %s", temp_path);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user