summaryrefslogtreecommitdiff
path: root/libs/blkid/src
AgeCommit message (Collapse)AuthorFilesLines
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: 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 Zak2-197/+0
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 Sievers2-19/+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 Zak5-166/+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 proper copying infoKarel Zak1-4/+14
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>
2009-02-11blkid: add UFSKarel Zak5-1/+240
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add minixKarel Zak4-1/+62
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add vxfsKarel Zak4-1/+54
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add lvm1Karel Zak3-3/+14
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add highpoint{37x,45x} RAIDsKarel Zak4-2/+79
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add version and probe FSInfoKarel Zak1-1/+47
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: support detection of multiple signaturesKarel Zak2-1/+47
The classic way is to return the first successfully detected signature (filesystem/raid). Unfortunately, sometimes we need to check for all possible signatures, because on some volumes (e.g. CD-ROMs) is possible to store multiple filesystems. Sometimes we need to check for all filesystems to avoid situation that we return wrong result (e.g. swap and FAT on the same device). Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add LUKS supportKarel Zak4-1/+73
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: re-order list of filesystemsKarel Zak1-20/+35
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add VFAT supportKarel Zak4-0/+329
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add UDF supportKarel Zak4-0/+168
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add LVM2 support and a fix _sprintf_uuid() bugKarel Zak5-5/+144
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add iso9600Karel Zak4-3/+144
Notes: - the original libblkid does not make difference between High Sierra and the standard iso9660 (the superblock is different). This bugs is fixed. - the original libblkid does not detect for MS Joliet Extension. This bugs is fixed. Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add missing hfs.cKarel Zak1-0/+315
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add HTFSKarel Zak4-1/+201
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add GFS2 UUID supportKarel Zak1-1/+7
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add HFS and HFS+Karel Zak3-5/+9
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11add reiser and reiser4Karel Zak4-0/+134
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: fix blkid_probe_sprintf_version() usageKarel Zak1-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add __attribute__ ((format))Karel Zak1-2/+6
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add ocfs and oracleasmKarel Zak4-0/+192
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add romfsKarel Zak4-1/+62
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add GFS and GFS2Karel Zak4-1/+144
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: fix xfs labelKarel Zak1-1/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: fix ext2 SEC_TYPEKarel Zak3-7/+7
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add xfsKarel Zak4-0/+72
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add blkid_probe_get_sb() macroKarel Zak3-4/+11
Signed-off-by: Karel Zak <kzak@redhat.com>