unfortunately, gcc 4.6
void fn (void) {
int foo;
foo = bar ();
}
evaluates that foo is never used. The __attribute__((unused)) is
necessary...
Signed-off-by: Karel Zak <kzak@redhat.com>
If more than 128 devices are specified on the blkid cmdline,
the devices[] array will overflow.
We can dynamically allocate the devices[] array based on number
of arguments to avoid this problem.
[kzak@redhat.com: - add "if (optind < argc)" check]
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
We shouldn't be accepting things like 'dmesg -n 2crapinput'
This patch also changes the exit's value to use EXIT_* constants.
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Before this change, "uuidd -t -n 1" reported
"6fd0672e-2f9b-11e0-b9c8-000feae00cb0 and subsequent 1 UUIDs".
That is two subsequent UUIDs, which is not correct.
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Use named constants for lentgh of UUID's binary and textual
representation, instead of magic numbers.
[kzak@redhat.com: - use sizeof(uuid_t) rather than hardcoded size]
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
xalloc.h needs string.h for declaration of strdup(). Otherwise we
can get implicit declaration warning. This patch prevents it.
Signed-off-by: Marek Polacek <mpolacek@redhat.com>
The PART_ENTRY_* has nothing to do with the _contents_ of the block
device. So if the device is empty these values should not be printed
and blkid(8) has to return 2.
The PART_ENTRY_* for empty devices should be printed for "-o udev"
output only.
Reported-by: Thomas Bächler <thomas@archlinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
The 1MiB limit for swap and COW is useless for Fedora LiveDVD where is
938KiB COW device.
Reported-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
mount does not parse parse offset= option if it is followed by other
options. In umount, the parsing is done with the get_value() function.
This patch moves get_value to fstab.c (with new name get_option_value())
and fixes mount to use the function.
[kzak@redhat.com: - rename to get_option_value()
- use fstab.c rather than sundries.c]
Novell bugzilla: #666150
Reported-by: Ludwig Nussel <ludwig.nussel@suse.de>
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
Try some replacements, such as getexecname() on Solaris and __progname
on BSDs and Darwin. When not found, base program_invocation_short_name
on the source filename it is used in, as not to require argv[0] to be
passed along. This latter approach is not dynamic, but doesn't require
code changes for all places where program_invocation_short_name is used
now.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>