summaryrefslogtreecommitdiffstats
path: root/sys-utils/ipcmk.c
Commit message (Collapse)AuthorAgeFilesLines
* misc: consolidate version printing and close_stdout()Karel Zak2019-04-161-4/+3Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* 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-6/+8
| | | | | | | Here we fix all cases where we have usage(FILE*) functions. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* Use --help suggestion on invalid optionKarel Zak2016-12-191-2/+1Star
| | | | | | | | 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>
* ipcmk: support <size>{K,M,G,...}Karel Zak2015-07-201-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* ipc*: use customary fputs() instead of fprintf() with the usage macrosBenno Schulenberg2015-01-061-5/+6
| | | | | | Also use the clearer word <number> with the --semaphore option. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: add a docstring to most of the utilitiesBenno Schulenberg2015-01-061-1/+4
| | | | | | | | | 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>
* ipcmk: use random_get_bytes() to generate IPC keysKarel Zak2013-01-241-11/+10Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* ipcmk: fix compiler warning [-Wmissing-prototypes]Karel Zak2012-07-161-4/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* sys-utils: cleanup strtoxx_or_err()Karel Zak2012-05-151-2/+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>
* docs: corrections to FSF license files, and postal addressSami Kerola2012-02-241-3/+3
| | | | | | | | | | | | | | The COPYING and Documentation/licenses/COPYING* files are being replaced by files from GNU web site. http://www.gnu.org/licenses/gpl-2.0.txt http://www.gnu.org/licenses/lgpl-2.1.txt Postal addresses to FSF in other files are updated to match with the address in license files. Reference: http://lists.gnu.org/archive/html/freefont-announce/2005-04/msg00001.html Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* build-sys: fixes to USAGE_* macrosSami Kerola2011-09-171-2/+2
| | | | | | | | | | | The USAGE_BEGIN_TAIL is removed as unnecessary. In between command specific options and --help & --version USAGE_SEPARATOR is inserted. For now the separator is empty line. The USAGE_MAN_TAIL is changed to take an argument. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* ipcmk: allow high speed ipc creationSami Kerola2011-09-171-2/+4
| | | | | | | | | This commit will allow user to create quickly plenty of ipc resources. Earlier the line bellow gave no satisfaction. for i in $(seq 0 42); do ipcmk -Q; done Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* ipcmk: include-what-you-use header checkSami Kerola2011-09-121-10/+7Star
| | | | | | | | | | | Three removes & a sort to alphabetical order. ipcmk.c should remove these lines: - #include <string.h> // lines 24-24 - #include <sys/types.h> // lines 30-30 - #include <unistd.h> // lines 29-29 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* ipcmk: remove camel casingSami Kerola2011-09-121-20/+20
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* ipcmk: validate numeric option argumentsSami Kerola2011-09-121-2/+3
| | | | | | Use strtoul_or_err() instead of atoi(). Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* ipcmk: remove useless codeSami Kerola2011-09-121-28/+4Star
| | | | | | | | Checking same return value twice does not make command any better. Secondly the program_invocation_short_name is known to work, so global progname variable does not add anything extra. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* ipcmk: add long options & fix usage()Sami Kerola2011-09-121-19/+31
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* ipcmk: cleanup usage()Karel Zak2011-08-161-7/+13
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: provide alternatives for err, errx, warn and warnxFabian Groffen2011-02-141-1/+1
| | | | | | | | Solaris lacks err, errx, warn and warnx. This also means the err.h header doesn't exist. Removed err.h include from all files, and included err.h from c.h instead if it exists, otherwise alternatives are provided. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* ipcmk: add NLS supportKarel Zak2008-09-101-10/+16
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* ipcmk: fix error codes and error messagesKarel Zak2008-09-101-14/+32
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* ipcmk: new commandHayden James2008-09-101-0/+140
Small patch to create an application that can easily create ad-hoc ipc resources, along with man page. [kzak@redhat.com: - rename from ipccreat to ipcmk - minor coding style changes] Signed-off-by: Hayden James <hayden.james@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>