1
0
forked from pool/util-linux
util-linux/util-linux-agetty-smart-reload-12.patch
Stanislav Brabec bb4a013d42 Accepting request 662937 from home:sbrabec:branches:util-linux-b1120298
- agetty: Fixes for reload issue only if it is really needed
  (bsc#1085196, boo#1120298,
  util-linux-agetty-smart-reload-10.patch,
  util-linux-agetty-smart-reload-11.patch,
  util-linux-agetty-smart-reload-12.patch).

OBS-URL: https://build.opensuse.org/request/show/662937
OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=391
2019-01-08 16:41:49 +00:00

31 lines
911 B
Diff

From d16afd8d157d41bd128da9f792ee49a716b76fd1 Mon Sep 17 00:00:00 2001
From: Stanislav Brabec <sbrabec@suse.cz>
Date: Tue, 20 Nov 2018 00:38:14 +0100
Subject: [PATCH] agetty: Return old behavior with empty logname
c094fcd37 introduced a behavior change: When Return is entered with empty
logname, nothing happens. As it confuses users, return back the old
behavior: re-prompt.
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
---
term-utils/agetty.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/term-utils/agetty.c b/term-utils/agetty.c
index 615db2c78..fc373847e 100644
--- a/term-utils/agetty.c
+++ b/term-utils/agetty.c
@@ -2185,7 +2185,7 @@ static char *get_logname(struct issue *ie, struct options *op, struct termios *t
break;
}
/* Everything was erased. */
- if (bp == logname)
+ if (bp == logname && cp->eol == '\0')
goto no_reload;
}
}
--
2.19.1