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".
This commit is contained in:
Tobias Stoeckmann 2017-03-12 17:48:44 +01:00 committed by Karel Zak
parent 1765814521
commit 55a5fbbc33
1 changed files with 1 additions and 1 deletions

View File

@ -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)