Bernhard Voelker [Fri, 27 Jul 2012 08:35:01 +0000 (10:35 +0200)]
tests: search mount point in canonicalized form in /proc/mounts
* tests/functions.sh (ts_is_mounted): Enhance to resolve symlinks in
given mount point before grep'ing in /proc/mount.
If the test directory is on a symlink, then e.g. tests/ts/cramfs/doubles
failed because the kernel keeps the mount entry in a canonicalized form
in /proc/mounts while this function searched for it with the original
path name.
Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
Commit 79c8a145ddff98d9c5bc70e67c5a861f67c50484 changed the numerical values of
fdisk_labeltype and broke the menu functionality, mixing main and expert menus.
Revert this change along with the label comment regarding it matching labeltype.
This is no longer valid since the original patch that lead to this modification
assumed that __probe_labels() would use these indices when creating a default
DOS/SUN disklabel, see http://www.spinics.net/lists/util-linux-ng/msg06509.html
Reported-by: Petr Uzel <petr.uzel@suse.cz> Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Sami Kerola [Wed, 25 Jul 2012 19:15:44 +0000 (21:15 +0200)]
dmesg: inform user when klogctl() or read_buffer() fails
Fix to small regression which made 'dmesg --clear' not to error
when running without root privileges. Same happen with '-D' and
few other options as well.
Sami Kerola [Wed, 25 Jul 2012 19:15:43 +0000 (21:15 +0200)]
wdctl: fix conflicting types on old systems
The program wants the userland version of declaration(s), not the
kernel one. Problem occured with glibc-devel-2.5-34.
/usr/include/stdint.h:41: error: conflicting types for 'int64_t'
/usr/include/linux/types.h:98: error: previous declaration of 'int64_t' was here
/usr/include/stdint.h:56: error: conflicting types for 'uint64_t'
/usr/include/linux/types.h:96: error: previous declaration of 'uint64_t' was here
In file included from /usr/include/stdlib.h:438,
from ./include/c.h:13,
from sys-utils/wdctl.c:30:
Sami Kerola [Wed, 25 Jul 2012 19:15:33 +0000 (21:15 +0200)]
hexdump: fix shadow declaration
text-utils/hexdump.h:84:5: warning: shadowed declaration is here [-Wshadow]
./include/xalloc.h:23:28: warning: declaration of 'size' shadows a global declaration [-Wshadow]
./include/xalloc.h:33:40: warning: declaration of 'size' shadows a global declaration [-Wshadow]
./include/xalloc.h:43:49: warning: declaration of 'size' shadows a global declaration [-Wshadow]
Sami Kerola [Wed, 25 Jul 2012 19:15:32 +0000 (21:15 +0200)]
ul: fix shadow declaration
text-utils/ul.c:641:25: warning: declaration of 'col' shadows a global declaration [-Wshadow]
text-utils/ul.c:126:5: warning: shadowed declaration is here [-Wshadow]
Sami Kerola [Wed, 25 Jul 2012 19:15:31 +0000 (21:15 +0200)]
more: fix shadow declaration
text-utils/more.c:1123:13: warning: declaration of 'state' shadows a previous local [-Wshadow]
text-utils/more.c:1095:18: warning: shadowed declaration is here [-Wshadow]
Sami Kerola [Wed, 25 Jul 2012 19:15:30 +0000 (21:15 +0200)]
setterm: fix shadow declaration
term-utils/setterm.c:221:55: warning: declaration of 'opt_term' shadows a global declaration [-Wshadow]
term-utils/setterm.c:181:5: warning: shadowed declaration is here [-Wshadow]
Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
Sami Kerola [Wed, 25 Jul 2012 19:15:29 +0000 (21:15 +0200)]
lscpu: fix shadow declaration
sys-utils/lscpu.c:1084:8: warning: declaration of 'buf' shadows a previous local [-Wshadow]
sys-utils/lscpu.c:1077:7: warning: shadowed declaration is here [-Wshadow]
sys-utils/lscpu.c:1144:9: warning: declaration of 'buf' shadows a previous local [-Wshadow]
sys-utils/lscpu.c:1077:7: warning: shadowed declaration is here [-Wshadow]
sys-utils/lscpu.c:1196:8: warning: declaration of 'buf' shadows a previous local [-Wshadow]
sys-utils/lscpu.c:1077:7: warning: shadowed declaration is here [-Wshadow]
sys-utils/lscpu.c:1197:7: warning: declaration of 'i' shadows a previous local [-Wshadow]
sys-utils/lscpu.c:1078:6: warning: shadowed declaration is here [-Wshadow]
Sami Kerola [Wed, 25 Jul 2012 19:15:28 +0000 (21:15 +0200)]
eject: fix shadow declaration
sys-utils/eject.c:529:11: warning: declaration of 'str' shadows a previous local [-Wshadow]
sys-utils/eject.c:506:9: warning: shadowed declaration is here [-Wshadow]
Karel Zak [Wed, 25 Jul 2012 19:15:27 +0000 (21:15 +0200)]
whereis: fix shadow declaration
misc-utils/whereis.c:191:7: warning: declaration of 'dirp' shadows a global declaration [-Wshadow]
misc-utils/whereis.c:134:42: warning: shadowed declaration is here [-Wshadow]
Reported-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
Sami Kerola [Wed, 25 Jul 2012 19:15:26 +0000 (21:15 +0200)]
lslocks: fix shadow declaration
misc-utils/lslocks.c:157:49: warning: declaration of 'pid' shadows a global declaration [-Wshadow]
misc-utils/lslocks.c:80:14: warning: shadowed declaration is here [-Wshadow]
Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
Sami Kerola [Wed, 25 Jul 2012 19:15:25 +0000 (21:15 +0200)]
blkid: fix shadow declaration
misc-utils/blkid.c:402:15: warning: declaration of 'usage' shadows a global declaration [-Wshadow]
misc-utils/blkid.c:63:13: warning: shadowed declaration is here [-Wshadow]
Sami Kerola [Wed, 25 Jul 2012 19:15:24 +0000 (21:15 +0200)]
sulogin: fix shadow declaration
login-utils/sulogin.c:337:8: warning: declaration of 'sushell' shadows a global declaration [-Wshadow]
login-utils/sulogin.c:332:13: warning: shadowed declaration is here [-Wshadow]
Sami Kerola [Wed, 25 Jul 2012 19:15:23 +0000 (21:15 +0200)]
libmount: fix shadow declaration
libmount/src/tab_update.c:203:8: warning: declaration of 'rc' shadows a previous local [-Wshadow]
libmount/src/tab_update.c:159:6: warning: shadowed declaration is here [-Wshadow]
Sami Kerola [Wed, 25 Jul 2012 19:15:22 +0000 (21:15 +0200)]
mkswap: fix shadow declaration
disk-utils/mkswap.c:366:57: warning: declaration of 'is_blkdev' shadows a global declaration [-Wshadow]
./include/blkdev.h:92:5: warning: shadowed declaration is here [-Wshadow]
Karel Zak [Thu, 26 Jul 2012 07:04:55 +0000 (09:04 +0200)]
include/optutils: add err_exclusive_options()
This is improved implementation of exclusive_option(). The new
implementation:
- uses regular struct option to compose error messages
- relationships between options are described in one const static array
- the current status is stored in one int array