aboutsummaryrefslogtreecommitdiff
path: root/loginutils/getty.c
diff options
context:
space:
mode:
author"Vladimir N. Oleynik" <dzo@simtreas.ru>2005-10-15 10:23:55 +0000
committer"Vladimir N. Oleynik" <dzo@simtreas.ru>2005-10-15 10:23:55 +0000
commit6f347ef9dc540aaea025c0575e586817cd85cc8e (patch)
tree5fc98f67e92bb2eca75d33940a4f8698bb216f3a /loginutils/getty.c
parent84e7511607600c2c7b9e7c4087897d44cc4668c4 (diff)
downloadbusybox-w32-6f347ef9dc540aaea025c0575e586817cd85cc8e.tar.gz
busybox-w32-6f347ef9dc540aaea025c0575e586817cd85cc8e.tar.bz2
busybox-w32-6f347ef9dc540aaea025c0575e586817cd85cc8e.zip
common BUFSIZ BSS buffer, small reduce code, data and bss
Diffstat (limited to 'loginutils/getty.c')
-rw-r--r--loginutils/getty.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/loginutils/getty.c b/loginutils/getty.c
index db9a150e0..e8643ef93 100644
--- a/loginutils/getty.c
+++ b/loginutils/getty.c
@@ -113,15 +113,6 @@ extern void updwtmp(const char *filename, const struct utmp *ut);
113#endif 113#endif
114 114
115 /* 115 /*
116 * This program tries to not use the standard-i/o library. This keeps the
117 * executable small on systems that do not have shared libraries (System V
118 * Release <3).
119 */
120#ifndef BUFSIZ
121#define BUFSIZ 1024
122#endif
123
124 /*
125 * When multiple baud rates are specified on the command line, the first one 116 * When multiple baud rates are specified on the command line, the first one
126 * we will try is the first one specified. 117 * we will try is the first one specified.
127 */ 118 */
@@ -744,12 +735,12 @@ static void next_speed(struct termio *tp, struct options *op)
744/* return NULL on failure, logname on success */ 735/* return NULL on failure, logname on success */
745static char *get_logname(struct options *op, struct chardata *cp, struct termio *tp) 736static char *get_logname(struct options *op, struct chardata *cp, struct termio *tp)
746{ 737{
747 static char logname[BUFSIZ]; 738#define logname bb_common_bufsiz1
748 char *bp; 739 char *bp;
749 char c; /* input character, full eight bits */ 740 char c; /* input character, full eight bits */
750 char ascval; /* low 7 bits of input character */ 741 char ascval; /* low 7 bits of input character */
751 int bits; /* # of "1" bits per character */ 742 int bits; /* # of "1" bits per character */
752 int mask; /* mask with 1 bit up */ 743 int mask; /* mask with 1 bit up */
753 static char *erase[] = { /* backspace-space-backspace */ 744 static char *erase[] = { /* backspace-space-backspace */
754 "\010\040\010", /* space parity */ 745 "\010\040\010", /* space parity */
755 "\010\040\010", /* odd parity */ 746 "\010\040\010", /* odd parity */