aboutsummaryrefslogtreecommitdiff
path: root/loginutils/getty.c
AgeCommit message (Collapse)Author
2011-06-05*: remove "Options:" string from help textsDenys Vlasenko
function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-06fix bit rot in scripts/Makefile.IMADenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-03whitespace fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-26getty: fix "ifdef CMSPAR"Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-26getty: restore CRTSCTS commentDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-26getty: do clear CLOCAL and CRTSCTS unless told otherwiseDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-26getty: do not clear all c_cflag's (we were clearing baud bits!)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-26getty: wait up to 5 seconds for the output buffer to drainPeter Korsgaard
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-26getty: document bits we don't set - maybe we should set some of them?Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-26getty: add ECHOE explanationDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-26getty: explain every bit in termios; remove redundant stuff in termios_finalDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-25move utmp.h include to libbb.hDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-24getty: flush _only_ input after switching to the next baud rateDenys Vlasenko
It was originally like this, but at some point TCIFLUSH was inadvertently changed to TCIOFLUSH. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-24getty: simplify macros; improve VSWTC[H] compatDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-24getty: more simplifications; explain how we treat parity nowDenys Vlasenko
function old new delta getty_main 1471 1434 -37 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-24getty: simplify code by going to more straignforward G trickDenys Vlasenko
function old new delta getty_main 1615 1475 -140 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-24getty: add sleep before initial tcdrain; reduce another sleep from 1 to 0.1sDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-24getty: use cfsetspeed to save some bytes; cosmetic fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-22getty: more correct check for O_RDWRDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-22getty: comment out parity detection code; improve usage textDenys Vlasenko
function old new delta packed_usage 28155 28191 +36 static.erase 12 - -12 getty_main 1847 1621 -226 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/1 up/down: 36/-238) Total: -202 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-09getty: fix -i (was ignored)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28*: whitespace fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-23libbb: introduce and use strcpy_and_process_escape_sequencesDenys Vlasenko
function old new delta strcpy_and_process_escape_sequences - 50 +50 bb_process_escape_sequence 148 138 -10 printf_main 789 776 -13 getty_main 1897 1831 -66 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/3 up/down: 50/-89) Total: -39 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-09-01getty: small code shrinkDenys Vlasenko
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-08-16*: make GNU licensing statement forms more regularDenys Vlasenko
This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-19init,loginutils: termios portability fixesJeremie Koenig
Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-07bbconfig: make it independent from printf functionsDenys Vlasenko
function old new delta full_write2_str - 25 +25 full_write1_str - 25 +25 clear_main 21 20 -1 telnet_main 1488 1477 -11 getty_main 1932 1918 -14 full_write22_str 25 - -25 ------------------------------------------------------------------------------ (add/remove: 2/1 grow/shrink: 0/3 up/down: 50/-51) Total: -1 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-22getty: do not emit bogus error message on EOFDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-05telnetd: write LOGIN/DEAD_PROCESS utmp records. Closes bug 1363Denys Vlasenko
function old new delta write_new_utmp - 253 +253 skip_dev_pfx - 30 +30 handle_sigchld 42 72 +30 telnetd_main 1650 1673 +23 make_new_session 415 438 +23 ... login_main 1140 1148 +8 update_utmp 337 313 -24 write_wtmp 220 154 -66 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 11/6 up/down: 406/-115) Total: ~291 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-05libbb: split update_utmp from login/getty in preparation to use it for telnetdDenys Vlasenko
function old new delta update_utent - 339 +339 login_main 1498 1128 -370 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/1 up/down: 339/-370) Total: -31 bytes function old new delta update_utmp 246 337 +91 login_main 1128 1140 +12 getty_main 1908 1918 +10 ... update_utent 339 - -339 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 5/6 up/down: 119/-368) Total: -249 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-18libbb: robustify isXXXX(). +39 bytesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-08*: a few more NOINLINEsDenys Vlasenko
function old new delta print_linkinfo - 815 +815 do_msg - 783 +783 INET_setroute - 757 +757 varvalue - 746 +746 do_sem - 637 +637 inflate_codes - 617 +617 INET6_setroute - 491 +491 edir - 370 +370 sync_cursor - 298 +298 update_utmp - 246 +246 searchLines - 165 +165 setup_alarm - 144 +144 may_wakeup - 101 +101 getNum 566 371 -195 refresh 1166 848 -318 rtcwake_main 809 479 -330 getty_main 2396 1921 -475 chpst_main 1373 746 -627 inflate_unzip_internal 1335 567 -768 evalvar 1384 612 -772 ipaddr_list_or_flush 2160 1246 -914 route_main 1585 245 -1340 ipcs_main 2523 1049 -1474 ------------------------------------------------------------------------------ (add/remove: 13/0 grow/shrink: 0/10 up/down: 6170/-7213) Total: -1043 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-05df: fix "df /"Denys Vlasenko
also, clean up mount checks in mkfs/fsck. function old new delta find_mount_point 243 261 +18 sha1_process_block64 497 510 +13 find_main 436 444 +8 display_speed 85 90 +5 df_main 795 793 -2 parse_command 1463 1460 -3 static.ignored_mounts 8 - -8 mkfs_minix_main 2962 2937 -25 fsck_minix_main 3065 2970 -95 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 4/4 up/down: 44/-133) Total: -89 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-05Patches to enable FreeBSD buildDenys Vlasenko
platform.h: fix wrong check for endianness, fix lchown aliasing to chown on uclibc. Code seems to not be affected in my testing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-04-12getty: fix handling of speed 0;Denis Vlasenko
stop using non-portable way of setting speeds. function old new delta cfsetispeed - 76 +76 cfsetospeed - 57 +57 cfgetispeed - 20 +20
2009-04-09patch by Stuart Hughes <seh@zee2.com> and Guenter <lists@gknw.net> to make ↵Mike Frysinger
"0" a special baud rate for getty where it uses this as "leave baud rate unchanged"
2009-03-09*: move get_sock_lsa and xwrite_str to libbb, use where appropriateDenis Vlasenko
function old new delta get_sock_lsa - 72 +72 buffer_fill_and_print 179 196 +17 parse_expr 824 832 +8 read_base64 343 348 +5 nameval 202 206 +4 fbset_main 1694 1698 +4 expand 1849 1853 +4 udhcp_send_kernel_packet 249 252 +3 udhcp_get_option 223 222 -1 chat_main 1246 1245 -1 pack_gzip 1661 1659 -2 doset 299 297 -2 bb__parsespent 119 117 -2 test_main 260 257 -3 qgravechar 109 106 -3 tcpudpsvd_main 1834 1830 -4 sysctl_display_all 589 580 -9 xopen_xwrite_close 44 33 -11 prs 30 18 -12 find_main 418 406 -12 full_write2_str 25 12 -13 adduser_main 667 654 -13 evaltreenr 817 802 -15 evaltree 817 802 -15 tftpd_main 526 493 -33 ftpd_main 2050 1990 -60 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 7/18 up/down: 117/-211) Total: -94 bytes
2009-01-09- isascii() is obsolescent in SUSv4 and furthermore looks redundant in this spotBernhard Reutner-Fischer
2008-11-25remove a few superfluous includesDenis Vlasenko
2008-11-05*: code shrink by adding a wrapper around very common tcsetattr(0, TCSANOW, ↵Denis Vlasenko
xx) op function old new delta tcsetattr_stdin_TCSANOW - 14 +14 set_sane_term 116 113 -3 top_main 1277 1273 -4 make_new_session 421 415 -6 rawmode 133 126 -7 reset_term 18 10 -8 die 43 35 -8 cookmode 62 54 -8 vlock_main 425 415 -10 read_line_input 3165 3155 -10 bb_askpass 357 347 -10 fsck_minix_main 3079 3065 -14 getty_main 2375 2332 -43 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/12 up/down: 14/-131) Total: -117 bytes
2008-09-11halt: reinstate -w even if !FEATURE_WTMP; beautify code in halt.cDenis Vlasenko
2008-07-21libbb: [x]fopen_for_{read,write} introduced and used.Denis Vlasenko
(by Valdimir) function old new delta config_open2 - 41 +41 config_read 507 542 +35 find_pair 169 187 +18 fopen_for_write - 14 +14 fopen_for_read - 14 +14 find_main 406 418 +12 xfopen_for_write - 10 +10 xfopen_for_read - 10 +10 popstring 134 140 +6 parse_inittab 396 401 +5 next_token 923 928 +5 pack_gzip 1659 1661 +2 bb__parsespent 117 119 +2 fallbackSort 1719 1717 -2 evalvar 1376 1374 -2 qrealloc 36 33 -3 ... ... ... ... singlemount 4579 4569 -10 process_stdin 443 433 -10 patch_main 1111 1101 -10 ifupdown_main 2175 2165 -10 file_action_grep 90 80 -10 uuidcache_init 649 637 -12 hush_main 797 785 -12 read_config 230 217 -13 dpkg_main 3835 3820 -15 read_line_input 3134 3110 -24 sysctl_main 232 203 -29 config_open 40 10 -30 WARN_BAD_LINE 44 - -44 login_main 1714 1575 -139 ------------------------------------------------------------------------------ (add/remove: 5/1 grow/shrink: 8/74 up/down: 174/-737) Total: -563 bytes
2008-07-05*: rename ATTRIBUTE_XXX to just XXX.Denis Vlasenko
2008-06-01- use ut_user rather than ut_name (Cristian Ionescu-Idbohrn)Bernhard Reutner-Fischer
- use ut_tv.tv_sec rather than ut_time (me) - shrink halt a little bit (me): halt_main 464 433 -31 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-31) Total: -31 bytes
2008-05-19- use STD*_FILENO some more. No object-code changesBernhard Reutner-Fischer
2008-05-19- use EXIT_{SUCCESS,FAILURE}. No object-code changesBernhard Reutner-Fischer
2008-05-15more of -Wall fixes from Cristian Ionescu-Idbohrn.Denis Vlasenko
Some are fixing real bugs. function old new delta syslogd_main 938 958 +20 get_signum 136 143 +7 obj_load 777 782 +5 recv_from_to 210 214 +4 get_next_block 1795 1799 +4 display_topmem_process_list 1117 1121 +4 logread_main 484 487 +3 buffer_fill_and_print 73 76 +3 kill_main 687 689 +2 ll_remember_index 240 241 +1 do_stats 452 453 +1 if_readconf 166 165 -1 display_process_list 1192 1191 -1 run_applet_and_exit 507 505 -2 print_signames 33 31 -2 parse_one_line 1092 1090 -2 find_out_spec 57 55 -2 add_ksymoops_symbols 421 419 -2 ash_main 1407 1402 -5 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 11/8 up/down: 54/-17) Total: 37 bytes
2008-03-17*: fix various kinds of damage to letter 'c' in Arkadiusz Mickiewicz' surname.Denis Vlasenko
chrt,taskset,dc,eject: shrink crontab: call "vi" with just name, no path watchdog: intercept all fatal signals function old new delta xstrtoull_range - 35 +35 static.sg_commands - 18 +18 packed_usage 23698 23712 +14 watchdog_main 148 151 +3 crontab_main 637 638 +1 base 1 - -1 static.ps 4 - -4 pointer 4 - -4 stack_machine 99 92 -7 run_command 273 260 -13 eject_main 360 343 -17 static.C 30 12 -18 ptok 61 38 -23 xstrtol_range 27 - -27 get_token 35 - -35 taskset_main 586 550 -36 chrt_main 411 372 -39 dc_main 158 117 -41 time_main 1127 1037 -90 ------------------------------------------------------------------------------ (add/remove: 2/5 grow/shrink: 3/9 up/down: 71/-355) Total: -284 bytes text data bss dec hex filename 793680 662 7420 801762 c3be2 busybox_old 793327 662 7412 801401 c3a79 busybox_unstripped
2008-03-17*: add -Wunused-parameter; fix resulting breakageDenis Vlasenko
function old new delta procps_scan 1265 1298 +33 aliascmd 278 283 +5 parse_file_cmd 116 120 +4 dname_enc 373 377 +4 setcmd 90 93 +3 execcmd 57 60 +3 count_lines 72 74 +2 process_command_subs 340 339 -1 test_main 409 407 -2 mknod_main 179 177 -2 handle_incoming_and_exit 2653 2651 -2 argstr 1312 1310 -2 shiftcmd 131 128 -3 exitcmd 46 43 -3 dotcmd 297 294 -3 breakcmd 86 83 -3 evalpipe 353 349 -4 evalcommand 1180 1176 -4 evalcmd 109 105 -4 send_tree 374 369 -5 mkfifo_main 82 77 -5 evalsubshell 152 147 -5 typecmd 75 69 -6 letcmd 61 55 -6 add_cmd 1190 1183 -7 main 891 883 -8 ash_main 1415 1407 -8 parse_stream 1377 1367 -10 alloc_procps_scan 55 - -55 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 7/21 up/down: 54/-148) Total: -94 bytes text data bss dec hex filename 797195 658 7428 805281 c49a1 busybox_old 797101 658 7428 805187 c4943 busybox_unstripped
2008-03-17help text: regularize format, and shrinkDenis Vlasenko
getty: shrink, and improve comments mount: OPT_ALL is superfluous, we already have OPT_a function old new delta bcode 47 25 -22 getty_main 2503 2349 -154 packed_usage 23928 23698 -230 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-406) Total: -406 bytes text data bss dec hex filename 798031 658 7428 806117 c4ce5 busybox_old 797604 658 7428 805690 c4b3a busybox_unstripped