From 26a8b9f1967d910033c516462c101100e041a9b4 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 8 Sep 2014 18:19:15 +0200 Subject: [PATCH] mdev: treat zero-length /dev/mdev.seq the same as "\n" one. Closes 7334 Signed-off-by: Denys Vlasenko --- util-linux/mdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux/mdev.c b/util-linux/mdev.c index e80b58f2e..b2d56575f 100644 --- a/util-linux/mdev.c +++ b/util-linux/mdev.c @@ -972,7 +972,7 @@ wait_for_seqfile(const char *seq) break; } seqbuf[seqlen] = '\0'; - if (seqbuf[0] == '\n') { + if (seqbuf[0] == '\n' || seqbuf[0] == '\0') { /* seed file: write out seq ASAP */ xwrite_str(seq_fd, seq); xlseek(seq_fd, 0, SEEK_SET);