Commit Graph

27 Commits

Author SHA1 Message Date
Benno Schulenberg aa06617f6e textual: remove square brackets from around three dots
Also improve some option descriptions here and there.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-05-06 11:12:13 +02:00
Benno Schulenberg b50945d4ac textual: spell and encode the name of Arkadiusz Miśkiewicz correctly
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-02-06 11:15:02 +01:00
Bernhard Voelker b83b9b11c2 ipcrm: avoid 'uninitialized' warning
GCC 4.1.2 on SLES 10.4:
sys-utils/ipcrm.c: In function ‘main’:
sys-utils/ipcrm.c:297: warning: ‘what_all’ may be used uninitialized in this function

* sys-utils/ipcrm.c: Initialize what_all to ALL.

Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
2012-10-02 10:01:51 +02:00
Karel Zak 20a3998222 sys-utils: cleanup strtoxx_or_err()
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-05-15 17:45:17 +02:00
Sami Kerola efb8854f4c sys-utils: verify writing to streams was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-04-04 19:49:40 +02:00
Davidlohr Bueso f9bd085879 sys-utils: fix typos
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2012-02-24 14:15:40 +01:00
Francesco Cosoleto d916761f3e ipcrm: fix wrong subject in error messages for -m, -q, -s id options
This makes error messages print 'id' instead of 'key' using id options.

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
2011-09-29 00:25:34 +02:00
Francesco Cosoleto 91b4ce6a73 ipcrm: use ternary operator in "(key|id) failed" message
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
2011-09-29 00:25:32 +02:00
Francesco Cosoleto 14cbdb85dd ipcrm: add static keyword to some functions
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
2011-09-29 00:25:30 +02:00
Sami Kerola 6f162034d0 build-sys: fixes to USAGE_* macros
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>
2011-09-17 15:07:52 +02:00
Davidlohr Bueso 7678c735b2 ipcrm: check IPC syscalls
It's not enough to check errno for errors as the variable is not
reset, we also need to check the last syscall return value to
verify a problem. This addresses bogus msgqueue errors when
deleting keys.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-09-17 15:07:52 +02:00
Sami Kerola 99e89eded2 ipcrm: add --verbose option
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-09-17 15:07:52 +02:00
Sami Kerola 3d0fc72d65 ipcrm: add --all option
An --all option will remove all ipc entries. The option takes
optional resource argument, which limits the removal to be
applied only the given resource entries.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-09-17 15:07:35 +02:00
Sami Kerola 79092062a4 ipcrm: include-what-you-use header check
Three removes & a sort to alphabetical order.

ipcrm.c should remove these lines:
- #include <ctype.h>  // lines 29-29
- #include <sys/types.h>  // lines 18-18
- #include <unistd.h>  // lines 27-27

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-09-17 14:25:20 +02:00
Sami Kerola 8b69b6d6de ipcrm: refactor new and old main to share code
The code is now much more tidy, and as a bonus old main has
shares error printing with the `new' code.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-09-17 14:25:14 +02:00
Sami Kerola 6054d3a774 ipcrm: exit if unknown error occurs
Previously for instance lack of memory space caused unknown
reason to be printed, and ipcrm tried to continue.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-09-17 13:12:33 +02:00
Sami Kerola 1b3b3f9fb9 ipcrm: add long options
With long options usage function had to be changed. The change
also takes libc error printing facilities to use, primarily to
get rid of execname & progname variables.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-09-12 21:27:07 +02:00
Francesco Cosoleto 51e1424225 ipcrm: remove redundant message in case of invalid option
This leaves getopt() only to print a similar error message on invalid
options.

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
2010-06-30 12:51:35 +02:00
Guillem Jover 869829e457 build-sys: check for union semun instead of using _SEM_SEMUN_UNDEFINED
Older versions of glibc used to declare ‘union semun’ in <sys/sem.h>,
but POSIX.1-2001 requires the caller to declare it instead. Later
versions of glibc started defining _SEM_SEMUN_UNDEFINED to note that
the union was not being declared, but conforming systems are not
required to define that macro (e.g. FreeBSD). As a side effect we get
rid of some obsolete __GNU_LIBRARY__ macro usage.

[kzak@redhat.com: - use #ifndef]

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-09 15:16:25 +02:00
Karel Zak a2c5f3cadc Imported from util-linux-2.11r tarball. 2006-12-07 00:25:56 +01:00
Karel Zak 1d4ad1decc Imported from util-linux-2.11q tarball. 2006-12-07 00:25:54 +01:00
Karel Zak c07ebfa1e0 Imported from util-linux-2.11b tarball. 2006-12-07 00:25:46 +01:00
Karel Zak 22853e4a82 Imported from util-linux-2.10m tarball. 2006-12-07 00:25:43 +01:00
Karel Zak 7eda085c41 Imported from util-linux-2.9v tarball. 2006-12-07 00:25:39 +01:00
Karel Zak 5c36a0eb7c Imported from util-linux-2.9i tarball. 2006-12-07 00:25:37 +01:00
Karel Zak fd6b7a7ffc Imported from util-linux-2.7.1 tarball. 2006-12-07 00:25:34 +01:00
Karel Zak 6dbe3af945 Imported from util-linux-2.2 tarball. 2006-12-07 00:25:32 +01:00