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>
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>
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>
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>
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>
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>
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>