summaryrefslogtreecommitdiffstats
path: root/term-utils
Commit message (Collapse)AuthorAgeFilesLines
* docs: format, grammarize, and standardize the wall man pageBenno Schulenberg2013-10-151-19/+21
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* various: fix mixing declarations and code compiler warnings [smatch]Sami Kerola2013-10-081-5/+5
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* textual: make two messages somewhat easier to understandBenno Schulenberg2013-10-081-2/+2
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* build-sys: use tinfo *or* ncurses for more(1), ul(1) and setterm(1)Karel Zak2013-10-041-2/+9
| | | | | | | | | | | | * it seems that we don't have to link the utils with ncurses, tinfo is enough. This change saves one unnecessary dependence. * libtinfo is also distributed with pkg-config files, so we can use PKG_CHECK_MODULES() as a primary source for LIBS and CFLAGS. * add TINFO_CFLAGS (although it's probably always empty) Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: tweak the grammar of an agetty man-page fragmentBenno Schulenberg2013-10-041-4/+4
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* agetty: use standard angular brackets in usage messageBenno Schulenberg2013-10-041-2/+2
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* build-sys: Fix check for __GNU_LIBRARY__Michael Forney2013-10-041-1/+1
| | | | | | | If we are not on glibc, __GNU_LIBRARY__ will not exist causing the check to always fail and try to use syscalls directly. Signed-off-by: Karel Zak <kzak@redhat.com>
* include: Add missing includesMichael Forney2013-10-041-0/+1
| | | | | | | | sys/types.h: For u_char typedef sys/params.h: For MAXNAMLEN sys/ttydefaults.h: For various tty definitions (also add configure check) Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'master' of https://github.com/yurchor/util-linuxKarel Zak2013-09-301-1/+1
|\
| * Fix various typosYuri Chornoivan2013-09-281-2/+2
| |
* | textual: fix misspelled words in -rc1Karel Zak2013-09-301-1/+1
| | | | | | | | | | Reported-by: Rafael Ferreira <rafael.f.f1@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* | clean up term lib handlingMike Frysinger2013-09-301-5/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ncurses package has been providing pkg-config files for a while now. So let's start using them to get the proper linker & compiler flags. It can make a difference when ncurses is configured in a way that requires extra link time flags but util-linux doesn't provide them, or when the headers live in a weird place and util-linux can't find them. Since the NCURSES_LIBS is always defined for the Makefile, there's no need to gate on the HAVE_NCURSES conditional. When it's disabled, the var will simply be empty. With a minor tweak to how tinfo is handled, we can do the same thing -- we just always use TINFO_LIBS in the Makefile's. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | setterm: fix term.h/ncurses.h include orderingMike Frysinger2013-09-301-2/+3
|/ | | | | | | | | | | | | | | | | | | The ncurses term.h header has logic in it to detect if nucrses.h has already been included and void defining things when it has. But since setterm includes term.h and the ncurses.h, it doesn't work and we can get fun build-time warnings like: CC term-utils/setterm-setterm.o In file included from term-utils/setterm.c:109:0: /usr/include/ncursesw/ncurses.h:827:12: warning: redundant redeclaration of 'tigetflag' [-Wredundant-decls] extern NCURSES_EXPORT(int) tigetflag (NCURSES_CONST char *); /* implemented */ ^ In file included from term-utils/setterm.c:106:0: /usr/include/ncursesw/term.h:775:12: note: previous declaration of 'tigetflag' was here extern NCURSES_EXPORT(int) tigetflag (NCURSES_CONST char *); ^ Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* agetty: add \S to output /etc/os-release dataKarel Zak2013-09-122-2/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows to use a new \S or \S{VARNAME} sequence in the /etc/issue file. The sequence prints data from /etc/os-release. The reason is to keep /etc/issue file distribution and release independent. The \S{ANSI_COLOR} is converted to the real terminal escape seq. For example: \S Kernel \r on an \m (\l) or more complex example: Welcome to \S{ANSI_COLOR}\S{NAME}0m \S{VERSION} Report bugs at \S{BUG_REPORT_URL}. See http://www.freedesktop.org/software/systemd/man/os-release.html fr more details about /etc/issue. Based on patch from Bill Nottingham <notting@redhat.com>. Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: add baud rates available from glibc that are not already supportedJames Buren2013-09-121-0/+36
| | | | | This adds userspace support for baud rates reater than 230400, provided the tty also supports it.
* agetty: only use EXTA/EXTB macros if B19200/B38400 macros are not presentJames Buren2013-09-121-7/+5Star
|
* agetty: cleanup debug ifdefsKarel Zak2013-09-091-5/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* last, utmpdump, agetty, wall, write: avoid compatibility hacksSami Kerola2013-08-293-3/+7
| | | | | | | | In include/bits/utmp.h the ut_user and ut_time macros are marked with comment they are backwards compatibility hacks. It is probably best to avoid use of these macros where ever possible. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* write: change determination can user write to a terminalSami Kerola2013-08-291-4/+5
| | | | | | | | | | | | | Earlier test failed when user had write permission, but was not in special group that owns terminal devices, usually tty. This made write(1) to fail for root, if the root did not happen to be in tty group. In this commit root is granted ot write to anyone, even if they have mesg(1) turned off. For an user who is trying to write to own other session the group write bit is significant only for whether mesg(1) are enabled. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: add note to wall(1) about sessions which will not get messageSami Kerola2013-08-291-0/+6
| | | | | | | | | | | | Sessions that has in utmp data ut_line begining with ':' are skipped. This is done to avoid write errors to devices such as '/dev/:0'. For example wdm is reported to to generate such utmp line. Perhaps in future this code should be revalidated. If an utmp data contains broken device lines it might be best inform user with a error message, rather than skipping silently suspicious device entries. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* wall: line wrap at column 79 also when line has tab charsSami Kerola2013-08-291-0/+2
| | | | | | | Earlier tabs caused random ragged right indentation, because the tab length was assumed to be 1 char which is not the case most of the time. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* mesg: sync usage() with howto-usage-function.txtSami Kerola2013-08-291-8/+7Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* wall: sync usage() with howto-usage-function.txtSami Kerola2013-08-291-11/+10Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* wall: send message also to sessions opened by user 'sleeper'Sami Kerola2013-08-291-4/+1Star
| | | | | | | Ignoring an user by name, and not telling about it in manual page, is unexpected. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* include: carefulput: print determined char when unprintable char is foundSami Kerola2013-08-232-2/+2
| | | | | | This is done to allow reuse of the functin in last(1). Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* wall: make banner sysvinit compatibleKarel Zak2013-08-131-16/+18
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* wall: allow to specify <message> on command lineKarel Zak2013-08-132-36/+68
| | | | | | | | | | wall(1) from sysvinit supports # wall I love this company! semantic, This patch add this functionally to the util-linux wall. Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: -L accepts optional argumentKarel Zak2013-08-061-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: fix memory leak [clang-analyzer]Sami Kerola2013-07-091-1/+3
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* Fixes "getty: unrecognized option '--loginpause'"kernc2013-07-041-2/+2
| | | | | Usage incorrectly stated --loginpause is a valid option, where instead --login-pause is. Also --no-hostname --> --nohostname.
* agetty: improve wording, grammar and some formatting in man pageBenno Schulenberg2013-06-181-49/+49
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* agetty: fix a kill/erase error in man page and improve clarityBenno Schulenberg2013-06-181-12/+12
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* Merge branch 'master' of https://github.com/eric-s-raymond/util-linuxKarel Zak2013-06-131-26/+44
|\ | | | | | | | | | | | | | | | | | | * 'master' of https://github.com/eric-s-raymond/util-linux: Fix broken list syntax. Restore use of correct alternation syntax using { | }. Re-layout a FILES section in the traditional style. Remove another .ti for .RS/.RE, and remove a .TP that broke list parsing. Replace .IP o with .IP \(bu, using the [nt]roff bullet character. Replace .ti operations with equivalent .RS/.RE pairs.
| * Re-layout a FILES section in the traditional style.Eric S. Raymond2013-06-101-5/+12
| |
| * Remove another .ti for .RS/.RE, and remove a .TP that broke list parsing.Eric S. Raymond2013-06-101-8/+11
| |
| * Replace .IP o with .IP \(bu, using the [nt]roff bullet character.Eric S. Raymond2013-06-101-9/+9
| | | | | | | | | | | | | | This will improve the quality of generated HTML. There is a cost, which is that most terminal emulators will just display the bullet as a (less visible) dot. An alternative to this change would be to use a * character for the bullet.
| * Replace .ti operations with equivalent .RS/.RE pairs.Eric S. Raymond2013-06-101-4/+12
| | | | | | | | | | This change makes automatic lifting to XML-DocBook possible, and should enable generation of better-quality HTML from these pages.
* | agetty: use O_NONBLOCK only for serial lines with CLOCALKarel Zak2013-06-131-5/+7
|/ | | | | | | | | | * regression introduced by ef264c830effc91add6da334204215f61eb8515e * also increase sleep when O_NONBLOCK used (grr.. this is so stupid thing, do we really need O_NONBLOCK for the stupid serial lines?) References: https://bugzilla.redhat.com/show_bug.cgi?id=972457 Signed-off-by: Karel Zak <kzak@redhat.com>
* textual: standardize the spelling of "superuser"Benno Schulenberg2013-06-072-2/+2
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* agetty: update man page and usage()Karel Zak2013-06-032-22/+23
| | | | | | | | - baud_rate is optional - agetty has been rewritten 2 years ago, so don't blame original authors in the man page Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: allow full control on CLOCAL flagKarel Zak2013-05-232-9/+49
| | | | | | | | | | | Now the -L option allows to explicitly enable CLOCAL flag. Unfortunately sometimes it's necessary to clear the flag. This patch add optional argument =<mode> to specify 'auto', 'always' and 'never' to control CLOCAL flag. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=816342 Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: add --disable-settermKarel Zak2013-04-261-4/+1Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* wall: check writing to a file descriptor was successfulSami Kerola2013-04-261-2/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* agetty: check writing to a file was successfulSami Kerola2013-04-261-1/+10
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* various: fix variable and function declarations [smatch scan]Sami Kerola2013-04-091-5/+5
| | | | | | | | | | | | | | | | | disk-utils/fsck.minix.c:511:9: warning: mixing declarations and code fdisks/sfdisk.c:982:5: warning: mixing declarations and code fdisks/sfdisk.c:1254:5: warning: mixing declarations and code fdisks/sfdisk.c:1564:5: warning: mixing declarations and code lib/mbsalign.c:279:7: warning: mixing declarations and code libblkid/src/devname.c:378:17: warning: mixing declarations and code libfdisk/src/alignment.c:219:9: warning: mixing declarations and code term-utils/wall.c:111:9: warning: mixing declarations and code text-utils/col.c:418:19: warning: non-ANSI function declaration of function 'flush_blanks' text-utils/col.c:553:12: warning: non-ANSI function declaration of function 'alloc_line' text-utils/rev.c:105:9: warning: mixing declarations and code text-utils/tailf.c:245:9: warning: mixing declarations and code Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* setterm: fix various color option argument listsSami Kerola2013-04-051-37/+37
| | | | | | | | The lists did not have correct colors in usage(). Because the usage() had to be fixed, it is best to make the output easy for translators to work with. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* agetty: the command does not have -h and -V optionsSami Kerola2013-04-051-3/+2Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: remove repeated wordsKarel Zak2013-04-051-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: add --chroot to usage() and man pageKarel Zak2013-04-052-0/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: add -E, --remote to usage()Karel Zak2013-04-051-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>