mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
dev: also check for blank sysfs value containing only '\n'
This commit is contained in:
parent
e69e81388d
commit
2a47f0957f
@ -379,7 +379,7 @@ static int _get_sysfs_value(const char *path, char *buf, size_t buf_size)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!(len = strlen(buf))) {
|
||||
if (!(len = strlen(buf)) || (len == 1 && buf[0] == '\n')) {
|
||||
log_error("_get_sysfs_value: %s: no value", path);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user