aboutsummaryrefslogtreecommitdiff
path: root/loginutils/getty.c
diff options
context:
space:
mode:
Diffstat (limited to 'loginutils/getty.c')
-rw-r--r--loginutils/getty.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/loginutils/getty.c b/loginutils/getty.c
index 2144c95ff..0176d621c 100644
--- a/loginutils/getty.c
+++ b/loginutils/getty.c
@@ -232,7 +232,7 @@ static void termio_final(struct options *op, struct termio *tp,
232 struct chardata *cp); 232 struct chardata *cp);
233static int caps_lock(const char *s); 233static int caps_lock(const char *s);
234static int bcode(const char *s); 234static int bcode(const char *s);
235static void error(const char *fmt, ...); 235static void error(const char *fmt, ...) __attribute__ ((noreturn));
236 236
237/* The following is used for understandable diagnostics. */ 237/* The following is used for understandable diagnostics. */
238 238
@@ -299,8 +299,7 @@ int getty_main(int argc, char **argv)
299 int iv; 299 int iv;
300 300
301 iv = getpid(); 301 iv = getpid();
302 if (ioctl(0, TIOCSPGRP, &iv) < 0) 302 ioctl(0, TIOCSPGRP, &iv);
303 perror_msg("ioctl() TIOCSPGRP call failed");
304 } 303 }
305#endif 304#endif
306 /* Initialize the termio settings (raw mode, eight-bit, blocking i/o). */ 305 /* Initialize the termio settings (raw mode, eight-bit, blocking i/o). */
@@ -368,7 +367,6 @@ int getty_main(int argc, char **argv)
368 367
369 (void) execl(options.login, options.login, "--", logname, (char *) 0); 368 (void) execl(options.login, options.login, "--", logname, (char *) 0);
370 error("%s: can't exec %s: %m", options.tty, options.login); 369 error("%s: can't exec %s: %m", options.tty, options.login);
371 return (0); /* quiet GCC */
372} 370}
373 371
374/* parse-args - parse command-line arguments */ 372/* parse-args - parse command-line arguments */
@@ -382,10 +380,9 @@ static void parse_args(int argc, char **argv, struct options *op)
382 while (isascii(c = getopt(argc, argv, "I:LH:f:hil:mt:wn"))) { 380 while (isascii(c = getopt(argc, argv, "I:LH:f:hil:mt:wn"))) {
383 switch (c) { 381 switch (c) {
384 case 'I': 382 case 'I':
385 if (!(op->initstring = strdup(optarg))) { 383 if (!(op->initstring = strdup(optarg)))
386 error("can't malloc initstring"); 384 error("can't malloc initstring");
387 break; 385
388 }
389 { 386 {
390 char ch, *p, *q; 387 char ch, *p, *q;
391 int i; 388 int i;