libblkid: Fix blkid.conf parsing
PATCH 1/1 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".
--- libblkid/src/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
libblkid/src/config.c +1 -1
@@ -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)
Signature · 1 line
2.12.0
Quoted 2 lines · Tobias Stoeckmann
libblkid/src/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
Tobias, use Signed-off-by line for your patches next time, please ;-)
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com