summaryrefslogtreecommitdiffstats
path: root/sys-utils/tunelp.c
Commit message (Collapse)AuthorAgeFilesLines
* misc: consolidate version printing and close_stdout()Karel Zak2019-04-161-6/+5Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tunelp: use linux headerSami Kerola2017-07-311-12/+2Star
| | | | | | | | | Remove use of LPTRUSTIRQ in same go. The LPTRUSTIRQ provided --trust-irq option, but it has not worked in nearly 20 years. Reference: http://repo.or.cz/davej-history.git/blobdiff/1f58336fe0515bc929e4de227eb44b12a4a18998..ac5579c68db87bc21630676c167ee8224267f32c:/include/linux/lp.h Reference: http://repo.or.cz/davej-history.git/blobdiff/1f58336fe0515bc929e4de227eb44b12a4a18998..ac5579c68db87bc21630676c167ee8224267f32c:/drivers/char/lp.c Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* misc: consolidate macro style USAGE_HELP_OPTIONSRuediger Meier2017-06-291-2/+2
| | | | | | | | | changed in include/c.h and applied via sed: sed -i 's/fprintf.*\(USAGE_MAN_TAIL.*\)/printf(\1/' $(git ls-files -- "*.c") sed -i 's/print_usage_help_options\(.*\);/printf(USAGE_HELP_OPTIONS\1);/' $(git ls-files -- "*.c") Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* misc: introduce print_usage_help_options()Ruediger Meier2017-06-271-2/+1Star
| | | | | | | | | | | | Consolidate --help and --version descriptions. We are now able to align them to the other options. We changed include/c.h. The rest of this patch was generated by sed, plus manually setting the right alignment numbers. We do not change anything but white spaces in the --help output. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* misc: never use usage(stderr)Ruediger Meier2017-06-261-8/+13
| | | | | | | Here we fix all cases where we have usage(FILE*) functions. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* lib: fix strutils.h, remove STRTOXX_EXIT_CODERuediger Meier2017-06-221-3/+4
| | | | | | | | | As discussed on the mailing list. We fix all places where the non-working define STRTOXX_EXIT_CODE was used. Regarding tunelp, also see 7e3c80a7. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* misc: fix some broken exit codesRuediger Meier2017-06-221-1/+4
| | | | | | | | | | | | | | | These tools have special exit codes. They got changed mistakenly. See: findfs 0e1fa6b6 fsck 658c0891 fsck.cramfs 922ec175 mkfs.cramfs 16154b1f tunelp 2ab428f6 FIXME: STRTOXX_EXIT_CODE doesn't work as it should. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* misc: do not use plain 0 as NULL [smatch scan]Sami Kerola2017-02-201-11/+11
| | | | | | | | | | text-utils/tailf.c:69:21: warning: Using plain integer as NULL pointer Since many 'struct option' has used zero as NULL make them more readable in same go by reindenting, and using named argument requirements. Reference: https://lwn.net/Articles/93577/ Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* Use --help suggestion on invalid optionKarel Zak2016-12-191-1/+1
| | | | | | | | The current default is to print all usage() output. This is overkill in many case. Addresses: https://github.com/karelzak/util-linux/issues/338 Signed-off-by: Karel Zak <kzak@redhat.com>
* tunelp: use parse_switch()Sami Kerola2015-03-051-16/+5Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tunelp: remove unnecessary preprocessor directivesSami Kerola2015-02-241-8/+0Star
| | | | | | | | The lp.h included earlier in the tunelp.c has the definitions that were checked, so these statements could have not been false and such impossible conditions does not need to be checked. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tunelp: remove get_val() in favour of strtol_or_err()Sami Kerola2015-02-241-14/+8Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* textual: add a docstring to most of the utilitiesBenno Schulenberg2015-01-061-0/+3
| | | | | | | | | This adds a concise description of a tool to its usage text. A first form of this patch was proposed by Steven Honeyman (see http://www.spinics.net/lists/util-linux-ng/msg09994.html). Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: use version printing macro everywhereSami Kerola2014-10-011-2/+1Star
| | | | | | | Only mount, umount, and blkid remains not using the macro because they are print also library references. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: update deprecation bannersSami Kerola2014-10-011-0/+9
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* textual: spell and encode the name of Arkadiusz Miƛkiewicz correctlyBenno Schulenberg2013-02-061-1/+1
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: standardize reporting of program name plus package versionBenno Schulenberg2013-01-251-1/+2
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* tunelp: add missing break [coverity scan]Karel Zak2012-09-071-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tunelp: check fstat return code [coverity scan]Karel Zak2012-06-211-1/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* sys-utils: verify writing to streams was successfulSami Kerola2012-04-041-0/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tunelp: remove old, now unneeded headerDave Reisner2012-03-201-1/+0Star
| | | | | | malloc and friends are provided by stdlib.h. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* tunelp: free allocation, use xallocSami Kerola2012-02-081-2/+2
| | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* tunelp: add long options and align with howto-usage-function.txtSami Kerola2011-11-021-17/+48
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tunelp: use libc error printing facilitiesSami Kerola2011-11-021-30/+17Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tunelp: use symbolic exit valuesSami Kerola2011-11-011-4/+7
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tunelp: fix coding styleSami Kerola2011-11-011-204/+225
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tunelp: fix compiler warnings [-Wsign-compare]Karel Zak2011-08-011-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* sys-utils: make use xalloc wrappersDavidlohr Bueso2010-11-011-21/+13Star
| | | | Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* messages: gettextize a few skipped or forgotten onesBenno Schulenberg2010-06-141-3/+3
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* remove CVS keywordsmaximilian attems2008-07-281-1/+1
| | | | | | | | this patch removes old CVS keywords from comments. mount(8) works for newer Linux then 0.99 ;) Signed-off-by: maximilian attems <max@stro.at>
* Imported from util-linux-2.13-pre2 tarball.Karel Zak2006-12-071-1/+1
|
* Imported from util-linux-2.13-pre1 tarball.Karel Zak2006-12-071-1/+1
|
* Imported from util-linux-2.11o tarball.Karel Zak2006-12-071-1/+1
|
* Imported from util-linux-2.11b tarball.Karel Zak2006-12-071-1/+1
|
* Imported from util-linux-2.10s tarball.Karel Zak2006-12-071-0/+1
|
* Imported from util-linux-2.10m tarball.Karel Zak2006-12-071-8/+12
|
* Imported from util-linux-2.10f tarball.Karel Zak2006-12-071-9/+10
|
* Imported from util-linux-2.9v tarball.Karel Zak2006-12-071-48/+71
|
* Imported from util-linux-2.8 tarball.Karel Zak2006-12-071-1/+6
|
* Imported from util-linux-2.7.1 tarball.Karel Zak2006-12-071-9/+23
|
* Imported from util-linux-2.5 tarball.Karel Zak2006-12-071-5/+8
|
* Imported from util-linux-2.2 tarball.Karel Zak2006-12-071-0/+248