summaryrefslogtreecommitdiffstats
path: root/term-utils
Commit message (Collapse)AuthorAgeFilesLines
* write: cleanup usage()Karel Zak2011-08-161-6/+8
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* wall: cleanup usage()Karel Zak2011-08-161-7/+8
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* setterm: cleanup usage()Karel Zak2011-08-161-43/+42Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* scriptreplay: cleanup usage()Karel Zak2011-08-161-8/+10
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* script: cleanup usage()Karel Zak2011-08-161-10/+9Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mesg: cleanup usage()Karel Zak2011-08-161-6/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: clean up usageKarel Zak2011-08-161-9/+9
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* script: normalize formatting of the man pageBenno Schulenberg2011-08-151-19/+18Star
| | | | | | | Also improve the description of the --timing option, and discard a then superfluous paragraph. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* script: indicate that the file argument to --timing is optionalBenno Schulenberg2011-08-151-4/+4
| | | | | | Also improve some other descriptions in the usage message. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* write: remove inconsistent periods from two error messagesBenno Schulenberg2011-08-151-2/+2
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* agetty: improve login(1) argv[]Karel Zak2011-08-082-72/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix regression: missing username should not be reported (EPERM) if -n/--skip-login is given and username is NULL. * don't compose login options *string* if we can use argv *array* (the string is necessary only for --login-options). * don't overwrite --login-options by --autologin The old code silently ignores login-options and "login -f <username>" is always used. The new code uses: a) "login -f <username>" by default b) "login <login-options>" for --login-options + --autologin where for b) the username from "--autologin <username>" is used to replace \u magic string in <login-options>. * the \u could be used more than once in one login argv string, for example: agetty --login-options "-o user=\\u,name=\\u --foo" * the space in --login-options is correctly ignored, for example agetty --login-options " hello world ". Reviewed-by: Voelker, Bernhard <bernhard.voelker@siemens-enterprise.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: C.UTF-8 locale instead of en_US.UTF-8Samuel Thibault2011-08-081-1/+1
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* agetty: only enable F_UTF8 if kernel has already set IUTF8.Samuel Thibault2011-08-081-1/+2
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* wall: build with SUID_{C,LD}FLAGSPetr Uzel2011-08-081-0/+2
| | | | Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* agetty: Fix IUTF8 flagWerner Fink2011-08-021-1/+7
| | | | | | | | Preserve IUTF8 as set up by the kernel, which knows which consoles are in utf8 mode. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Werner Fink <werner@suse.de>
* scriptreplay: fix buffer overflowSami Kerola2011-07-261-2/+2
| | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: fix spaces versus tabs conflictMarc-Antoine Perennou2011-07-111-4/+4
| | | | | | | For some reason, tabs were replaced by spaces in commit 73ae0d5be6e070afe83d1a2324ac79941629201e Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
* build-sys: don't try to chgrp write or wall if they are not builtMarc-Antoine Perennou2011-07-111-3/+8
| | | | | | Fix regression from commit 4aa9d65bfa76afd0d886ca410ae83428a490d4ea Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
* script: remove magic constants and a type mismatch fixSami Kerola2011-06-291-36/+38
| | | | | | | | | | The type mismatch; doinput: int -> ssize_t [kzak@redhat.com: - int -> pid_t, - remove "register" keyword] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* script: include-what-you-use header checkSami Kerola2011-06-291-2/+5
| | | | | | | | | | | | | | | | | The tool proposed; script.c should add these lines: script.c should remove these lines: - #include <sys/file.h> // lines 53-53 - #include <sys/types.h> // lines 48-48 - #include "c.h" // lines 61-61 and the change nearly did what the tool told. We should keep on using c.h, not err.h. The config.h is not needed, it's added automaticly. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* script: remove unnecessary void castingSami Kerola2011-06-291-28/+28
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* script: option --force addedSami Kerola2011-06-292-7/+17
| | | | | | | | | | The --force will allow default output destination, e.g. typescript file, to be hard or symbolic link. [kzak@redhat.com: - remove "error:" prefix from errx()] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* write: maintenance fixesSami Kerola2011-06-251-103/+90Star
| | | | | | | Use libc error printing facilities, remove void casting, clean up unused headers and alignt coding style with README.devel. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* write: long options & new usageSami Kerola2011-06-251-3/+34
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* build-sys: move write to term-utils directorySami Kerola2011-06-254-3/+473
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* misc: hurd build fixesSamuel Thibault2011-06-201-3/+17
| | | | | | | | | | | | * Make blkdev_is_misaligned return 0 when BLKALIGNOFF is not available. * Make procutils.c include c.h to get a PATH_MAX replacement. * Provide agetty.c USE_SYSLOG, DEFAULT_VCTERM and DEFAULT_STERM defaults for Hurd. * Make agetty.c only deal with OFDEL, XCASE and VSWTCH if they are available. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: try next speed after CBREAKKarel Zak2011-05-181-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: don't use xalloc.h stuffKarel Zak2011-05-171-8/+17
| | | | | | | agetty logs errors and warnings to syslog, we shouldn't use err.h stuff here. Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: remove unnecessary options synonymsKarel Zak2011-05-172-16/+11Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: use a generic function for strings concatenationKarel Zak2011-05-171-50/+60
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: remove unnecessary space and "(void)" junkKarel Zak2011-05-171-68/+71
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* aggety: further mingetty featuresDr. Werner Fink2011-05-172-38/+146
| | | | | | | | | | | Allow the system adminstrator to provide options to the login program. Some changes for several layouts of the agetty prompt like short host name or full qualified host name. Four options enables the user to delay agetty after start, to change the working directory, to change the root directory, and to modified scheduling priority. Signed-off-by: Werner Fink <werner@suse.de>
* agetty: add an autologin featureWerner Fink2011-05-172-26/+222
| | | | | | | | | Add an autologin feature to agetty, that is that a user can be automatically logged in. For this the options of for the login program has to used. Make it possible to pass-through options to the login program which requires a security check. Signed-off-by: Werner Fink <werner@suse.de>
* agetty: better support of virtual consoleDr. Werner Fink2011-05-171-61/+126
| | | | | | | | Better support of virtual console due support of UTF-8 login names provided by e.g. LDAP. Set default size 24/80 on serial modem lines if not found by the kernel. Signed-off-by: Werner Fink <werner@suse.de>
* agetty: check virtual console for UTF-8 supportWerner Fink2011-05-171-9/+115
| | | | | | | Check out a virtual console line for UTF-8 support, also skip modem specific setups on a virtual console line. Signed-off-by: Werner Fink <werner@suse.de>
* agetty: proper session on the terminal lineWerner Fink2011-05-172-35/+126
| | | | | | | | | | Ensure a proper session on the terminal line, that is do a vhangup() and become the controlling terminal. After this determine if the terminal line a virtual console by using the ioctl TIOCMGET to get the status modem bits of a serial line which is a invalid argument on a virtual console. Signed-off-by: Werner Fink <werner@suse.de>
* 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>