aboutsummaryrefslogtreecommitdiff
path: root/loginutils/getty.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-10-10 04:20:21 +0000
committerEric Andersen <andersen@codepoet.org>2002-10-10 04:20:21 +0000
commit71ae64bdc6b044eef0a9f3bebd85cc4a6b67362f (patch)
tree802990cf39a805f253b9d32f3888a7c749babd01 /loginutils/getty.c
parentfdfe298a966da0e6eecdc355efd640acf73c00e5 (diff)
downloadbusybox-w32-71ae64bdc6b044eef0a9f3bebd85cc4a6b67362f.tar.gz
busybox-w32-71ae64bdc6b044eef0a9f3bebd85cc4a6b67362f.tar.bz2
busybox-w32-71ae64bdc6b044eef0a9f3bebd85cc4a6b67362f.zip
last_patch61 from vodz:
New complex patch for decrease size devel version. Requires previous patch. Also removed small problems from dutmp and tar applets. Also includes vodz' last_patch61_2: Last patch correcting comment for #endif and more integrated with libbb (very reduce size if used "cat" applet also). Requires last_patch61 for modutils/config.in.
Diffstat (limited to 'loginutils/getty.c')
-rw-r--r--loginutils/getty.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/loginutils/getty.c b/loginutils/getty.c
index fec8ae8e5..0f0778caf 100644
--- a/loginutils/getty.c
+++ b/loginutils/getty.c
@@ -388,34 +388,20 @@ static void parse_args(int argc, char **argv, struct options *op)
388 switch (c) { 388 switch (c) {
389 case 'I': 389 case 'I':
390 if (!(op->initstring = strdup(optarg))) 390 if (!(op->initstring = strdup(optarg)))
391 error("can't malloc initstring"); 391 error(memory_exhausted);
392 392
393 { 393 {
394 char ch, *p, *q; 394 const char *p;
395 int i; 395 char *q;
396 396
397 /* copy optarg into op->initstring decoding \ddd 397 /* copy optarg into op->initstring decoding \ddd
398 octal codes into chars */ 398 octal codes into chars */
399 q = op->initstring; 399 q = op->initstring;
400 p = optarg; 400 p = optarg;
401 while (*p) { 401 while (*p) {
402 if (*p == '\\') { /* know \\ means \ */ 402 if (*p == '\\') {
403 p++; 403 p++;
404 if (*p == '\\') { 404 *q++ = process_escape_sequence(&p);
405 ch = '\\';
406 p++;
407 } else { /* handle \000 - \177 */
408 ch = 0;
409 for (i = 1; i <= 3; i++) {
410 if (*p >= '0' && *p <= '7') {
411 ch <<= 3;
412 ch += *p - '0';
413 p++;
414 } else
415 break;
416 }
417 }
418 *q++ = ch;
419 } else { 405 } else {
420 *q++ = *p++; 406 *q++ = *p++;
421 } 407 }