summaryrefslogtreecommitdiffstats
path: root/libblkid/src
diff options
context:
space:
mode:
authorTobias Stoeckmann2017-03-12 17:48:44 +0100
committerKarel Zak2017-03-13 12:46:47 +0100
commit55a5fbbc335480eb3b535fbe5f18289d9458d382 (patch)
treeb16f6546f38c4fdd90e34dea154ed22f9becbf19 /libblkid/src
parentlibsmartcols: allow to add column to already used table (diff)
downloadkernel-qcow2-util-linux-55a5fbbc335480eb3b535fbe5f18289d9458d382.tar.gz
kernel-qcow2-util-linux-55a5fbbc335480eb3b535fbe5f18289d9458d382.tar.xz
kernel-qcow2-util-linux-55a5fbbc335480eb3b535fbe5f18289d9458d382.zip
libblkid: Fix blkid.conf parsing
The SEND_UEVENT=yes|no line is not properly parsed, because the offset jumps one byte too far behind the equal sign. Therefore, every configuration that contains the line "SEND_UEVENT=yes" still does not send an uevent. The fix is simple: adjust the offset to be "12" instead of "13".
Diffstat (limited to 'libblkid/src')
-rw-r--r--libblkid/src/config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libblkid/src/config.c b/libblkid/src/config.c
index 1822f1c67..52f159d87 100644
--- a/libblkid/src/config.c
+++ b/libblkid/src/config.c
@@ -88,7 +88,7 @@ static int parse_next(FILE *fd, struct blkid_config *conf)
} while (*s == '\0' || *s == '#');
if (!strncmp(s, "SEND_UEVENT=", 12)) {
- s += 13;
+ s += 12;
if (*s && !strcasecmp(s, "yes"))
conf->uevent = TRUE;
else if (*s)