diff options
author | Peter Rajnoha <prajnoha@redhat.com> | 2016-03-22 09:29:24 +0100 |
---|---|---|
committer | Peter Rajnoha <prajnoha@redhat.com> | 2016-03-22 09:29:24 +0100 |
commit | 2a47f0957fb95136985c97d0b7b4580044e3f68d (patch) | |
tree | 41cb197d01fcf657167486ba84e90c6f833609f6 | |
parent | e69e81388dd84598a37b8b77c17c393bf570cf75 (diff) | |
download | lvm2-2a47f0957fb95136985c97d0b7b4580044e3f68d.tar.gz |
dev: also check for blank sysfs value containing only '\n'
-rw-r--r-- | lib/device/dev-cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/device/dev-cache.c b/lib/device/dev-cache.c index d912dea88..bcee783a5 100644 --- a/lib/device/dev-cache.c +++ b/lib/device/dev-cache.c @@ -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; } |