Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
The function blkid_do_probe() is able to detect more filesystems on
the device
while(blkid_do_probe(pr) == 0)
...
but in many cases we need only one exact answer, and we also need to
be sure that there is not any other FS on the device.
For example it's possible to create valid LUKS (or vfat, ...) header
and valid linux swap header on the same device -- in such case the
device can be interpreted (by mount/swapon) in two completely
different ways. An ambivalent result is always error -- the library
never returns such result.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Fix small non-sense from from a recent commit.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
LUKS stores UUID as a string...
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
- fix blkid_probe_set_device() to work for non-blkdevs (e.g. file images),
in such case we need to set the size of data from stat->st_size
- add blkid_probe_strcpy_uuid() for filesystems where UUID is stored as a string
(e.g. DDF raid, luks, ...)
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
- uses the "safe" output for non-encoded values
- makes the print_udev_format() more readable
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
... some nice ideas from brainstorming with Ted, Kay and Scott.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
It seems that if we have the test_filesystem flag set on an ext3
filesystem(!) on a system which provides ext4, blkid gets confused.
According to the current logic:
* It's not an ext4dev filesystem, because the system provides ext4.
* It's not an ext4 filesystem, because it has no ext4 features.
* It's not an ext3 filesystem, because the test flag is set.
In the end, it's nothing.
blkid should return *something* that is mountable... I'm inclined to
think that ext3 should be the right answer, if no ext4-specific features
are set.
This would mean just dropping the EXT2_FLAGS_TEST_FILESYS test in
probe_ext3(), because ext4 & ext4dev probes have come first already.
[kzak@redhat.com: port from e2fsprogs to util-linux-ng tree]
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Fix blkid_get_dev() so it will never return a device structure if the
device file doesn't exist.
[kzak@redhat.com: port from e2fsprogs to util-linux-ng tree]
Addresses-Debian-Bug: #502541
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
[kzak@redhat.com: port from e2fsprogs to util-linux-ng tree]
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
If only ext4 is available (as a module or in /proc/filesystems)
blkid wasn't properly testing for it, because the time checks
were backwards and always failed. This caused old ext4dev
filesystems to fail to mount as ext4. With this patch it works
fine.
Also, don't try to check for modules on a non-Linux system.
[kzak@redhat.com: port from e2fsprogs to util-linux-ng tree]
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Give a boost to dm devices which are not used to build other dm
devices, since "leaf" devices are generally more likely to be
interesting as devices to mount.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
blkid_devdirs was defined in blkidP.h and was never intended to be
used outside of the library. Since it no longer needs to be shared
across object files, rename it and turn it into a static variable.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
This commit works by removing all calls from libdevmapper altogether,
and using the standard support for "normal" non-dm devices.
It depends on dm devices being placed in /dev/mapper (but the previous
code had this dependency anyway), and /proc/partitions containing dm
devices.
We don't actually rip out the libdevmapper code in this commit, but
just disable it via #undef HAVE_DEVMAPPER, just so it's easier to
review and understand the fundamental code changes. A subsequent
commit will remove the libdevmapper code, as well as unexport
the blkid_devdirs string array.
Thanks to Karel Zak for inspiring me to look at the dm code in blkid,
so I could realize how much it deserved to ripped out by its roots. :-)
[kzak@redhat.com: port from e2fsprogs to util-linux-ng tree]
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Here is the md5'd UUID for hfs:
$ LD_LIBRARY_PATH=libs/blkid/src/ libs/blkid/bin/blkid ../../volume_images/hfs-extended.img
UUID="56a19597-a3c8-325d-9df2-f30bc6f8ac09" LABEL="I am HFS Extended" TYPE="hfsplus"
$ /lib/udev/vol_id ../../volume_images/hfs-extended.img
ID_FS_USAGE=filesystem
ID_FS_TYPE=hfsplus
ID_FS_VERSION=
ID_FS_UUID=56a19597-a3c8-325d-9df2-f30bc6f8ac09
ID_FS_UUID_ENC=56a19597-a3c8-325d-9df2-f30bc6f8ac09
ID_FS_LABEL=I_am_HFS_Extended
ID_FS_LABEL_ENC=I\x20am\x20HFS\x20Extended
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
|
|
The vrfy.org url does not exist anymore, it's all in the udev tree,
and hopefully not for long anymore. :)
The blkid_idinfo does not work. :)
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
We needn't to use kernel types, in userspace we have portable
stdint.h.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
* libblkid was and is licensed under LGPL
The GPL comment in some files was unwished mistake (copy & past the
start of files from my other project....).
* add information about inspiration by libvolume_id
* rename *_meta to _metadata
* rename *_off to off
* use sizeof() rather than some magic constants
* remove unnecessary #includes
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|