Now it's necessary to explicitly create a lock for mnt_update_table().
It seems better to create the lock in mnt_update_table() by default to
skip this extra step.
Reported-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
The function blkid_evaluate_tag() is useful for tags only (e.g.
LABEL=foo). But we also need to address devices by tags OR paths in
many utils.
The function blkid_evaluate_spec() support this functionality without
extra care about the way how device is addressed. The tags as well as
paths are converted to the standardized device path.
Signed-off-by: Karel Zak <kzak@redhat.com>
This is not a bug ('ent' is always non-NULL is 'm' is non-NULL), but
let's keep static analyzes and humans who read the code happy.
Signed-off-by: Karel Zak <kzak@redhat.com>
Intel uses little-endians for UUID, the rest of the sane world uses 16
byte big-endian array...
Reported-by: Andrew Lutomirski <luto@mit.edu>
Signed-off-by: Karel Zak <kzak@redhat.com>
LVM (pvcreate) wipes the begin of the device. If there is a PT in the
wiped area then LVM signature is obsolete.
# pvcreate /dev/sdb
# fdisk /dev/sdb
old version:
# blkid -p -o udev /dev/sdb
ID_FS_TYPE=LVM2_member
new version:
# blkid -p -o udev /dev/sdb
ID_PART_TABLE_TYPE=dos
Reported-by: Matej Cepl <mcepl@redhat.com>
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=679799
Signed-off-by: Karel Zak <kzak@redhat.com>
Linux is not 100% POSIX compatible in this area...
strace: "flock(3, LOCK_EX|LOCK_NB) = -1 EAGAIN (Resource temporarily unavailable)"
This reverts commit 78d8c28f74.
Linux is not 100% POSIX compatible in this area...
strace: "flock(3, LOCK_EX|LOCK_NB) = -1 EAGAIN (Resource temporarily unavailable)"
This reverts commit d6c8d399b9.
The problem with libuuid interface is that it is impossible to
inform the caller of uuid_generate_time() if the UUID was generated
in a safe manner (either via uuidd, or using the global clock state
counter).
This patch introduces new function,
int uuid_generate_time_safe(uuid_t out)
which can report whether the generated UUID is safe.
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Having uuid_generate_time and uuid__generate_time at
the same time is confusing. These functions are exported,
but not part of the official API (used by uuidd only).
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
[kzak@redhat.com: - cleanup lscpu(1) usage text
- use <disk> rather than <device> in partx(8)
usage text]
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
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>