summaryrefslogtreecommitdiff
path: root/libs
AgeCommit message (Collapse)AuthorFilesLines
2009-02-11blkid: cleanup _LOGPROBE debug messagesKarel Zak1-9/+11
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add blkid_do_safeprobe()Karel Zak8-7/+66
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>
2009-02-11blkid: add version support to LVM2Karel Zak1-0/+4
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add uuid and version support to gfs2Karel Zak1-6/+4
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add to reiserKarel Zak1-2/+10
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add ocfs2 versionKarel Zak1-9/+54
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: fix ..._strncpy_uuidKarel Zak1-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: fix blkid_do_probe()Karel Zak2-2/+5
Fix small non-sense from from a recent commit. Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: remove unnecessary debug messageKarel Zak1-5/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: use blkid_probe_strcpy_uuid() for luksKarel Zak1-1/+1
LUKS stores UUID as a string... Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: improve ddf detectionKarel Zak1-15/+27
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: set size for non-blkdevs, add blkid_probe_strcpy_uuid()Karel Zak2-22/+48
- 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>
2009-02-11blkid: netware SB has to be packedKarel Zak1-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: fix udev outputKarel Zak1-9/+8
- uses the "safe" output for non-encoded values - makes the print_udev_format() more readable Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: fix blkid_safe_string()Karel Zak1-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add a note to TODO listKarel Zak1-0/+3
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: refresh TODO fileKarel Zak1-0/+39
... some nice ideas from brainstorming with Ted, Kay and Scott. Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: use sizeof() for hfs uuidKarel Zak1-5/+5
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: hfs - do not set UUID for emtpy finder infoKay Sievers1-0/+2
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
2009-02-11blkid: refresh TODO fileKarel Zak1-5/+0
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add udev ID_FS_* output to blkid binaryKarel Zak1-10/+34
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add udev string encoding routinesKarel Zak5-3/+295
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add -p and low-probe mode to blkid binaryKarel Zak5-43/+128
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add DEBUG_LOWPROBE, cleanup a little debug stuffKarel Zak11-27/+80
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add btrfs supportKarel Zak4-2/+96
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: remove unnecessary ifdef __cplusplusKarel Zak1-4/+0
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: recognize ext3 with test_fs set as ext3Eric Sandeen1-4/+0
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>
2009-02-11blkid: Refuse to create a device structure for a non-existent deviceTheodore Ts'o1-0/+2
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>
2009-02-11blkid: fix file descriptor leak when checking for a moduleKarel Zak1-1/+3
[kzak@redhat.com: port from e2fsprogs to util-linux-ng tree] Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkis: fix detection of ext4dev as ext4Eric Sandeen2-3/+6
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>
2009-02-11blkid: use Requires.private and fix the include directoryKarel Zak1-2/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: Give a priority bonus to "leaf" devicemapper devicesTheodore Ts'o1-3/+37
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>
2009-02-11blkid: Unexport the private symbol blkid_devdirsTheodore Ts'o2-3/+2
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>
2009-02-11build-sys: remove use of devmapper libraryKarel Zak4-199/+5
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: Optimize devicemapper supportTheodore Ts'o3-14/+28
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>
2009-02-11blkid: hfs - use proper native UUID formatKay Sievers3-20/+26
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>
2009-02-11blkid: vfat - fix declarationKay Sievers1-3/+2
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>
2009-02-11blkid: add sysv and xenixKarel Zak4-1/+146
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add netware (NSS)Karel Zak4-1/+101
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add squashfsKarel Zak4-9/+71
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: remove blkid_types.hKarel Zak6-167/+32
We needn't to use kernel types, in userspace we have portable stdint.h. Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: fix hedeader in ntfs.cKarel Zak1-4/+0
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: use posix uintXX_t in lvm codeKarel Zak1-9/+7
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: use posix uint32_t in ocfs superblockKarel Zak1-12/+12
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: fix highpoint37x offsetKarel Zak1-6/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: cleanup starts of probing filesKarel Zak32-435/+208
* 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>
2009-02-11blkid: add HPFSKarel Zak4-2/+133
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add TODO fileKarel Zak1-0/+25
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add proper copying infoKarel Zak2-4/+524
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: remove unused stuff from MakefileKarel Zak1-2/+0
Signed-off-by: Karel Zak <kzak@redhat.com>