summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* textual: improve clarity of some error messagesBenno Schulenberg2013-06-075-11/+11
| | | | | Reported-by: Petr Písař <petr.pisar@atlas.cz> Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* cal: fix few type mismatchesSami Kerola2013-06-071-6/+6
| | | | | | Sloppiness from commit e44fe4712140774b677de466affc31e0581ee335. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* rev: reduce stream checking when closing read-only file descriptorSami Kerola2013-06-071-4/+1Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* rev: simplify new line detection and impossible testSami Kerola2013-06-071-5/+4Star
| | | | | | | | | | | The new line detection is earlier using only '\n' so there should not be need to search for '\r' later. The detection whether allocated address is pointing to null seems to be unnecessary. Assuming xmalloc() returned valid address space the address should never be 0. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* rev: stop adding new line at the end when input does not have itSami Kerola2013-06-073-2/+7
| | | | | | | | | | When the rev(1) is executed twice outcome is expected to be exactly what it was originally. That includes not adding new line at the end of the output. The oneliner below demonstrates earlier issue. $ printf "abc\n123" | rev | rev Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: add lscpu max mhz to manual and bash completionSami Kerola2013-06-072-1/+7
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* lscpu: add max MHz value to make cpu governor effects more visibleSami Kerola2013-06-071-1/+25
| | | | | | | | | The existing 'CPU MHz' is usually dynamic value, which CPU governor changes up on needs of CPU demand. Assuming lscpu is used to gather information to a hardware inventory the dynamic value is misleading. For inventing the maximum MHz value is more sensible. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* lib: remove unused codeSami Kerola2013-06-071-10/+0Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: slightly correct the man page of columnBenno Schulenberg2013-06-071-10/+11
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* docs: normalize the formatting of man pages for nsenter and unshareBenno Schulenberg2013-06-072-81/+79Star
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: fix several typos and angular brackets in messagesBenno Schulenberg2013-06-076-21/+21
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: harmonize some loop-device error messagesBenno Schulenberg2013-06-071-6/+6
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* mount: (deprecated) fix typo tailed->failedYuri Chornoivan2013-06-071-1/+1
| | | | Signed-off-by: Yuri Chornoivan <yurchor@ukr.net>
* su: fix exit status if terminated by signalOndrej Oprala2013-06-072-15/+50
| | | | | | | [kzak@redhat.com: - add comment] Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: improve grammar and consistency of comments in login.cBenno Schulenberg2013-06-071-85/+77Star
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: tiny alphabetical and grammatical tweakBenno Schulenberg2013-06-071-1/+1
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: standardize the spelling of "superuser"Benno Schulenberg2013-06-074-6/+6
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: standardize synopsis for login, and improve an error messageBenno Schulenberg2013-06-071-2/+2
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* runuser: update man page, add note about -l vs. -pKarel Zak2013-06-071-0/+1
| | | | | Reported-by: Bernhard Voelker <mail@bernhard-voelker.de> Signed-off-by: Karel Zak <kzak@redhat.com>
* login: use TCSANOW to remove HUPCLKarel Zak2013-06-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fedora 19, kernel 3.9, systemd 204, telnetd with socket activation. login(1) code: ttt.c_cflag &= ~HUPCL; tcsetattr(0, TCSAFLUSH, &ttt); close(STDIN_FILENO); close(STDOUT_FILENO); close(STDERR_FILENO); signal(SIGHUP, SIG_IGN); /* so vhangup() wont kill us */ vhangup(); signal(SIGHUP, SIG_DFL); strace : ioctl(0, SNDCTL_TMR_CONTINUE or SNDRV_TIMER_IOCTL_GPARAMS or TCSETSF, {B9600 opost isig icanon echo ...}) = 0 close(0) = 0 close(1) = 0 close(2) = 0 --- SIGHUP {si_signo=SIGHUP, si_code=SI_KERNEL} --- --- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=1, si_uid=0} --- +++ killed by SIGTERM +++ It seems we get SIGHUP (and SIGTERM from systemd) before vhangup(). The problem occur sometimes. I guess it's because TCSAFLUSH is not applied immediately, so it would be probably better to use TCSANOW to make the code more robust. References: https://bugzilla.redhat.com/show_bug.cgi?id=962145 Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: don't remove ECHOCTL from c_lflagKarel Zak2013-06-031-4/+2Star
| | | | | | | | It's really unexpected that arrows keys move cursor when agetty/login asks for login name or password. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=969458 Signed-off-by: Karel Zak <kzak@redhat.com>
* 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>
* libmount: more robust options string parsingKarel Zak2013-05-302-2/+4
| | | | | | | | | # mount -o=rw /dev/sdb /mnt/test mount: libmount/src/optmap.c:212: mnt_optmap_get_entry: Assertion `namelen' failed. Aborted (core dumped) Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=968786 Signed-off-by: Karel Zak <kzak@redhat.com>
* su: ignore --preserve-environment, it's mutually exclusive to --loginKarel Zak2013-05-292-0/+6
| | | | | | Addresses: http://bugs.gnu.org/10317 Reported-by: Bernhard Voelker <mail@bernhard-voelker.de> Signed-off-by: Karel Zak <kzak@redhat.com>
* logger: small coding style changesKarel Zak2013-05-291-8/+7Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* logger: cleanup usage()Karel Zak2013-05-291-15/+17
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* logger: add support for --prio-prefix when logging stdinDennis H Jensen2013-05-292-4/+54
| | | | | | | | | | | | | | | | This patch adds a new option to logger that will make it look for a priority prefix <n> at the beginning of every line. The priority is a single decimal number formed as explained in syslog(3). If a prefix is found logger will log the message using the found facility and level in that prefix, if the prefix doesn't contain a facility the default facility specified by the -p option will be used. If no prefix is found, logger will use the priority specified by -p. [kzak@redhat.com: - add --prio-prefix to usage() output] Signed-off-by: Dennis H Jensen <dennis.h.jensen@siemens.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* cal: improve coding styleKarel Zak2013-05-281-45/+51
| | | | | | | | | - use static for all global variables - use REFORMATION_YEAR macro - make if() lines more readable - etc. Signed-off-by: Karel Zak <kzak@redhat.com>
* cal: simplify colormode parsingKarel Zak2013-05-281-6/+3Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'cal-fourth' of git://github.com/kerolasa/lelux-utiliteetitKarel Zak2013-05-2812-471/+1210
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'cal-fourth' of git://github.com/kerolasa/lelux-utiliteetit: docs: cal: stop telling year 9999 is upper limit tests: check cal works when year is far in future cal: remove arbitrary limit of maxium year being 9999 cal: use Claus Tøndering's day of the week algorithm cal: simplify day_in_week() calculation cal: mark all functions static cal: stop trimming whitespaces tests: add cal day color corner cases docs: cal: add --color option description to manual page cal: add --color to usage() cal: support --color[={auto,always,never}] cal: de-duplicate julian specific functions cal: remove unnecessary initializations cal: simplify calendar reformat calculations tests: add calendar reformation check cal: clean up use of constants cal: convert function like definitions to functions cal: fix preprocessor directive indendation
| * docs: cal: stop telling year 9999 is upper limitSami Kerola2013-05-261-1/+1
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * tests: check cal works when year is far in futureSami Kerola2013-05-262-0/+301
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * cal: remove arbitrary limit of maxium year being 9999Sami Kerola2013-05-261-41/+80
| | | | | | | | | | | | | | The change limits year to be unsigned long. In case a year + month name exceed a column width two lines are used for them. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * cal: use Claus Tøndering's day of the week algorithmSami Kerola2013-05-261-30/+20Star
| | | | | | | | | | Reference: http://en.wikipedia.org/wiki/Determination_of_the_day_of_the_week#T.C3.B8ndering.27s_algorithm Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * cal: simplify day_in_week() calculationSami Kerola2013-05-261-7/+7
| | | | | | | | | | | | | | | | | | The day_in_week() can be made easier to read, and should return invalid weekday at the time of missing 11 days at September 1752. Reported-by: Thomas Bächler <thomas@archlinux.org> References: http://www.spinics.net/lists/util-linux-ng/msg07910.html Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * cal: mark all functions staticSami Kerola2013-05-261-22/+22
| | | | | | | | | | | | Proposed-by: Dave Reisner <dreisner@archlinux.org> Reference: http://marc.info/?l=util-linux-ng&m=136717012419551&w=2 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * cal: stop trimming whitespacesSami Kerola2013-05-266-354/+337Star
| | | | | | | | | | | | | | | | | | | | | | Remove trailing spaces from output it is trivial cal | sed 's/ *$//' but padding them back is difficult. CC: Pádraig Brady <P@draigbrady.com> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * tests: add cal day color corner casesSami Kerola2013-05-262-0/+123
| | | | | | | | | | | | | | Check that the first, andn last, possible dates and strange Sep 1752 dates are highlighted correctly. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * docs: cal: add --color option description to manual pageSami Kerola2013-05-261-0/+14
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * cal: add --color to usage()Sami Kerola2013-05-261-15/+14Star
| | | | | | | | | | | | And clean up the usage() function. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * cal: support --color[={auto,always,never}]Sami Kerola2013-05-262-3/+18
| | | | | | | | | | | | | | | | Similar with dmesg commit 9bc2b51a06dc9cf6244106ac489ab08a91fd4360. CC: Pádraig Brady <P@draigBrady.com> Reviewed-by: Karel Zak <kzak@redhat.com> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * cal: de-duplicate julian specific functionsSami Kerola2013-05-261-74/+45Star
| | | | | | | | | | | | | | The cost is a little bit more complex functions, while the benefit is couple data flows fewer to mind about. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * cal: remove unnecessary initializationsSami Kerola2013-05-261-7/+0Star
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * cal: simplify calendar reformat calculationsSami Kerola2013-05-261-26/+15Star
| | | | | | | | | | | | | | The only September 1752 offset calculation that is necessary is whether Sun or Mon is the first day of the week. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * tests: add calendar reformation checkSami Kerola2013-05-262-0/+293
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * cal: clean up use of constantsSami Kerola2013-05-261-60/+81
| | | | | | | | | | | | | | | | | | The commit also adds few new symbolic names, such as DAYS_IN_WEEK. While these definitions may look a little too trivial to have I am sure they ease understanding what is going on in code where they are used. Reviewed-by: Thomas Bächler <thomas@archlinux.org> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * cal: convert function like definitions to functionsSami Kerola2013-05-261-17/+28
| | | | | | | | | | | | Reviewed-by: Thomas Bächler <thomas@archlinux.org> Reviewed-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Sami Kerola <kerolasa@iki.fi>