Why?
* read-only root
* /etc is pretty bad place for caches
* all is usually cached by udev in /dev/disk/by-* and libblkid
is able to use these symlinks
* boot persistent cache is attractive for very small subset of
Linux machines (and they already need extra udev tunning otherwise
udev will probe all block devices during boot)
* the default is possible to override in /etc/blkid.conf
The systems without /run directory will not be affected by this
change.
Signed-off-by: Karel Zak <kzak@redhat.com>
The option does not have any effect, the original functionality was
removed from e2fsprogs in year 2003 by
commit 50b380b4d4ab668bad45033e3a8aaf93c7f42844
git://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
So.. don't propagate the option to users in year 2012 :-)
Signed-off-by: Karel Zak <kzak@redhat.com>
The current optimization for small devices (1.4MiB) is broken. It
checks for partition table, but if nothing is detected then details
(ID_PART_ENTRY_*) about the current partition are not gathered.
The optimization should be enabled for small *whole* disks only.
Reported-by: David Zeuthen <davidz@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
blkid.c: In function ‘main’:
blkid.c:656:6: warning: ‘res’ may be used uninitialized in this function [-Wuninitialized]
blkid.c:623:9: note: ‘res’ was declared here
Signed-off-by: Karel Zak <kzak@redhat.com>
This small fix makes it possible to print the first unprintable character
with code 128 from ASCII table.
Signed-off-by: Sergey Gusarov <laborer2008@gmail.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>
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>
This patch replaces a few functions used throughout the source:
* Renames getnum (from schedutils) to strtol_or_err
* Moves strtosize (from lib/strtosize.c)
* Moves xstrncpy (from include/xstrncpy.h)
* Adds strnlen, strnchr and strndup if not available (remove it from libmount utils)
A few Makefile.am files were modified to compile accordingly along with trivial renaming
in schedutils source code.
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
The *_ENC variables are deprecated. All stuff for udev should be
encoded.
Reported-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
This output format is similar to 'udev' but without udev specific
prefixed (e.g. ID_FS_*). The 'export' format is automatically enabled
for I/O Limits (-i).
Signed-off-by: Karel Zak <kzak@redhat.com>
This option allows to restrict low-level probing to the defined list
of superbocks (filesystems or RAIDs). For example:
blkid -p -n ext3,ext4,vfat /dev/sda1
or
blkid -p -n novfat /dev/sda1
Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid(8) in low-level mode probes for PT now (blkid is replacement
for devkit-disks-part-id)
* add ID_PART_TABLE_TYPE=<name> to blkid(8) udev output
* don't probe for FS/RAIDs on small devices when PT is detected
Signed-off-by: Karel Zak <kzak@redhat.com>
UI tools that read information from udev need a way how inform users
about ambivalent probing result (more valid filesystems on the
device).
This patch add a new ID_FS_AMBIVALENT variable:
ID_FS_AMBIVALENT=<info> <info> [ ...]
where <info> is:
<usage>:<type>[:<version>]
all strings are encoded (white spaces and utf8 are replaced with \hex).
For example:
# blkid -p -o udev /dev/sda1
ID_FS_AMBIVALEN=filesystem:vfat:FAT12 other:swap:2
Signed-off-by: Karel Zak <kzak@redhat.com>
... sad story, I have temporary disabled pretty-output code
in very early version of blkid.c in u-l-ng. (It was also in
time when pretty-output was very new feature in e2fsprogs.)
Unfortunately, the -L option (shortcut to "-o list") in u-l-ng version
was reused for for any other functionality few months later.... this
stupid thing was released in u-l-ng 2.15 and 2.16 without any negative
feedback from users.
It means the blkid from u-l-ng is not backwardly compatible with
the original version from e2fsprogs. The -L option has a different
meaning there.
I'm sorry about this bug...
This patch:
* enable pretty-output (-o line)
* add a note about incompatibility between u-l-ng and e2fsprogs
to blkid.8 man page
Signed-off-by: Karel Zak <kzak@redhat.com>
The others utilities are in one of the top-level directories. That's
confusing to have blkid(8) and findfs(8) in shlibs/ tree.
Signed-off-by: Karel Zak <kzak@redhat.com>