summaryrefslogtreecommitdiffstats
path: root/term-utils
Commit message (Collapse)AuthorAgeFilesLines
* agetty: cleanup argv parsing, utmp update, use writeall(), etc.Werner Fink2011-05-171-205/+243
| | | | | | | | | | | Next cleanup, that is split off special character parsing in do_prompt() and parse_args(), handle name of line of virtual console and use it in utmp update as well as the session id. Also move the initial TERM variable to open_tty() as we use this later in open_tty(). Use writeall() but avoid repeat to often for EAGAIN (compare with info page of the (g)libc, description of the macro EAGAIN). Signed-off-by: Werner Fink <werner@suse.de>
* agetty: more code cleanupWerner Fink2011-05-171-84/+80Star
| | | | | | | | More code cleanup, that is use bit mask for eight bit option, use modern speed_t type, split local error() into local log_err(), log_warn(), and dolog() for fine graduated logging with syslogger. Signed-off-by: Werner Fink <werner@suse.de>
* docs: agetty manual updateSami Kerola2011-04-271-5/+5
| | | | | | | Tell users how to see what issue escape will print by using other commands, such as uname. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* agetty.c: move issue path to pathnames.hSami Kerola2011-04-271-1/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* agetty.c: further scrubbingSami Kerola2011-04-271-545/+555
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | In reply to two requests. http://permalink.gmane.org/gmane.linux.utilities.util-linux-ng/3990 http://permalink.gmane.org/gmane.linux.utilities.util-linux-ng/3999 The scubbing consists; o Old school introduction back to the top of the source file. o Indentation changes. o Removal of void casting. o Removal of braces from single statements. o Unified format for comments. o Comparison with W. Venema's code from 1993 to clean few comment mysteries. o Web referrals added to further explanation to near the code or comments which some could find difficult to understand why. o Clean up of comments. o FIXME items added where attention is needed. o Make functions static. o Functions with same argument types use same argument order. o Get rid of classic K&R style function declarations. Please notice that this patch _should not_ affect how program works e.g. this has no actual code changes. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* mesg: add \n to usage() outputKarel Zak2011-04-141-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mesg: man page clean wqupKarel Zak2011-04-141-5/+2Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mesg: new --verbose optionSami Kerola2011-04-142-2/+14
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* mesg: add long options to the man pageSami Kerola2011-04-141-1/+10
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* mesg: use long options, also --help and --version addedSami Kerola2011-04-141-7/+30
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* agetty: coding style - fix identationKarel Zak2011-04-141-973/+938Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: coding style - fix comments, remove tailing whitespaceKarel Zak2011-04-141-51/+42Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: getopt case segment reorderingSami Kerola2011-04-141-28/+27Star
| | | | | | | | The case clause after getopts is in alphabetical order, just like option string definition and manual page. The patch also convers spaces to tabs in this code block. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: agetty long optionsSami Kerola2011-04-141-34/+40
| | | | | | | | | Long options to manual page with the new --version and --help. The manual page option order is also set to be the same as it is in code. For the persons who don't see the order it is short option case in sensitive alphabetical order. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* agetty: symbolic standard file descriptorsSami Kerola2011-04-141-24/+25
| | | | | | | I find it easier to read code in which standard file descriptors are symbolic strings rather than numbers. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* agetty: #endif commentsSami Kerola2011-04-141-13/+13
| | | | | | | | The longer #ifdef ... #endif markups have now at the end section comment where they begun, which should improve preprosessor directive readability. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* agetty: error message about required argumentsSami Kerola2011-04-141-3/+6
| | | | | | | This patch also fixes only remaining magical number to EXIT_* markup. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* agetty: use long optionsSami Kerola2011-04-141-7/+63
| | | | | | | | | | | | | This patch will introducing --help and --version options, which does not have short version. Reason to this is a that the -h was already assigned. [kzak@redhat.com: - fix one usage call, - use %1$s in usage printf format - remove "static const" from enum] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: use program_invocation_short_nameSami Kerola2011-04-141-19/+2Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* agetty: use xalloc.hSami Kerola2011-04-141-6/+4Star
| | | | | | Unifies and fixes malloc and strdup calls. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* script: optional timing output file argument addedSami Kerola2011-04-122-9/+18
| | | | | | And update to manual page accordingly. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: scriptreplay add note about new optionsSami Kerola2011-04-121-0/+11
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* scriptreplay: allow arguments as command line switchesSami Kerola2011-04-121-9/+28
| | | | | | | The command line switches override old style arguments Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: scriptreplay mention basic long optionsSami Kerola2011-04-121-0/+7
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* scriptreplay: support long optionsSami Kerola2011-04-121-9/+38
| | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* scriptreplay: end printing with new lineSami Kerola2011-04-121-0/+1
| | | | | | | Depending on opinion this is either modest bug fix or tiny improvement. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* script: don't include err.h directlyKarel Zak2011-04-121-1/+1
|
* wall: support --timeout switch (vol 2.)Karel Zak2011-04-122-1/+6
| | | | | | | | | | | | This is the rest of the commit cae7485e59299c4b70ea7e1c7a4206df416701dc the original patch was committed without man page and Makefile changes. Sorry. Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* wall: cleanup mbufsize usageKarel Zak2011-04-121-7/+5Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* wall: support --timeout switchSami Kerola2011-04-121-2/+11
| | | | | | The switch controls message write time out to terminals. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* wall: add long options and 79 char cut info to the man pageSami Kerola2011-04-121-2/+11
| | | | | | | Mention that over 79 characters long lines are cut, while long options is an obvious change. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* ttymsg: fix compiler warnings and use EXIT_Sami Kerola2011-04-122-10/+11
| | | | | | | [kzak@redhat.com: - remove 'register' storage class specifier] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* wall: use long optionsSami Kerola2011-04-121-7/+30
| | | | | | | Also --version & --help options added, and rewrote help output. Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* wall: remove global variables and support TMPDIRSami Kerola2011-04-121-27/+47
| | | | | | | | | | The TMPDIR environment is preferred over _PATH_TMP in which a file is created that is ultimately sent to terminals. This patch will also fix compiler warnings and removes magical numbers, which has not explanation. Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* setterm: use xmalloc()Karel Zak2011-04-061-6/+4Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* setterm: fix variable types, and unused argument warningsSami Kerola2011-04-061-3/+4
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* setterm: add note about long dump file paths to man pageSami Kerola2011-04-061-1/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* setterm: function screendump coding style fixedSami Kerola2011-04-061-60/+61
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* setterm: mention in man setterm.1 -version and -help switchesSami Kerola2011-04-061-0/+6
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* setterm: use libc error printing facilitiesSami Kerola2011-04-061-21/+27
| | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* setterm: support -help and -version optionsSami Kerola2011-04-061-61/+65
| | | | | | | [kzak@redhat.com: - merge all options to the one string] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* setterm: segfault with long dump file nameSami Kerola2011-04-061-2/+3
| | | | | | | | | | | | | The patch will make too long path to be truncated to MAX_PATH lenght. If user supplies too long file name that is caught at fopen. Some users might find this unintuitive, so the altered behavior will be mantioned in manual page. Bug in earlier version was visible with a command bellow. setterm -dump -file $(for i in $(seq 254); do printf x ; done) Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* build-sys: fix distcheck for term-utilsKarel Zak2011-04-041-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* move struct option to .rodataKarel Zak2011-03-031-1/+1
| | | | | | | It does not make sense to have writable large arrays of "struct option" on the stack. Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: add term-utils/.gitignoreKarel Zak2011-03-021-0/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: move wall to term-utils/Karel Zak2011-03-025-0/+523
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: move mesg to term-utils/Karel Zak2011-03-023-0/+226
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: move reset to term-utils/Karel Zak2011-03-024-0/+74
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: move script and scriptreplay to term-utils/Karel Zak2011-03-025-2/+1116
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: move setterm to term-utils/Karel Zak2011-03-023-0/+1497
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>