* [PATCH] libblkid: Fix blkid.conf parsing
@ 2017-03-12 16:48 Tobias Stoeckmann
2017-03-13 12:05 ` Karel Zak
0 siblings, 1 reply; 2+ messages in thread
From: Tobias Stoeckmann @ 2017-03-12 16:48 UTC (permalink / raw)
To: util-linux
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(-)
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)
--
2.12.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] libblkid: Fix blkid.conf parsing
2017-03-12 16:48 [PATCH] libblkid: Fix blkid.conf parsing Tobias Stoeckmann
@ 2017-03-13 12:05 ` Karel Zak
0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2017-03-13 12:05 UTC (permalink / raw)
To: Tobias Stoeckmann; +Cc: util-linux
On Sun, Mar 12, 2017 at 05:48:44PM +0100, Tobias Stoeckmann wrote:
> 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
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-13 12:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-12 16:48 [PATCH] libblkid: Fix blkid.conf parsing Tobias Stoeckmann
2017-03-13 12:05 ` Karel Zak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox