summaryrefslogtreecommitdiff
path: root/libs/blkid/src
AgeCommit message (Collapse)AuthorFilesLines
2009-05-14build-sys: rename /libs to /shlibsKarel Zak60-10389/+0
On Wed, May 13, 2009 at 05:38:49AM -0400, Christoph Hellwig wrote: > Also the lib vs libs toplevel directories probably aren't a too good > choice. Signed-off-by: Karel Zak <kzak@redhat.com>
2009-05-12blkid: make libuuid optionalKarel Zak3-7/+0
read.c:28:23: error: uuid/uuid.h: No such file or directory make[3]: *** [read.lo] Error 1 make[3]: *** Waiting for unfinished jobs.... Reported-by: Olaf <mailinglists@ban-solms.de> Signed-off-by: Karel Zak <kzak@redhat.com>
2009-05-05blkid: use /sys/block/dm-<N>/dm/nameKarel Zak1-1/+27
The Linux kernel (since 2.6.29, patch 784aae735d9b0bba3f8b9faef4c8b30df3bf0128) exports the real DM device names in /sys/block/<ptname>/dm/name. The sysfs based solution is nicer and faster than scan for devno in /dev/mapper/. CC: Milan Broz <mbroz@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2009-05-05blkid: use /dev/mapper/<name> rather than /dev/dm-<N>Karel Zak1-1/+12
The libblkid (since v1.41.1) returns private device-mapper names (e.g. /dev/dm-0). It's because the probe_one() function scans /dev before /dev/mapper. brw-rw---- 1 root disk 253, 0 2009-04-27 13:41 /dev/dm-0 brw-rw---- 1 root disk 253, 0 2009-04-27 13:41 /dev/mapper/TestVolGroup-TestLogVolume Old version: # blkid -t LABEL="TEST-LABEL" -o device /dev/dm-0 Fixed version: # blkid -t LABEL="TEST-LABEL" -o device /dev/mapper/TestVolGroup-TestLogVolume Addresses-Red-Hat-Bug: #497259 Signed-off-by: Karel Zak <kzak@redhat.com>
2009-04-29blkid: linux_raid - fix logic for volumes with size == 0Karel Zak2-16/+25
Based on commit 7643819062985d9fc6c7664072576e71d3822b10 Author: Kay Sievers <kay.sievers@vrfy.org> Date: Sat Sep 6 16:23:21 2008 +0200 from udev upstream tree. Reported-by: Scott James Remnant <scott@ubuntu.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2009-04-29blkid: rename blkid_evaluate_spec to blkid_evaluate_tagKarel Zak3-5/+5
"SPEC" is usually used in mount(8) as a generic term for device name or tag (LABEL, UUID). The function blkid_evaluate_* works with TAGs only. Signed-off-by: Karel Zak <kzak@redhat.com>
2009-04-28blkid: split SONAME and LIBBLKID_VERSIONKarel Zak3-7/+15
It seems better to split SONAME and the public library version. The library version will be the same as util-linux-ng PACKAGE_VERSION. PACKAGE_VERSION: <maj>.<min>[-<suffix>] e.g. 2.15-rc2 Symbols versioning: BLKID_<maj>.<min> e.g. BLKID_2.15 blkid_get_library_version(): <maj>.<min>.0 e.g. 2.15.0 SONAME: libblkid.so.1 See also the original patch a0487b1cb5beffb8f6783476664b01e8833e0ea8 where was introduced library versioning. Signed-off-by: Karel Zak <kzak@redhat.com>
2009-04-24blkid: remove whole-disk entries from cache when partitions are foundEric Sandeen1-0/+24
We can get into a situation in blkid where whole disks remain in the cache, even though partitions are found. For labels such as sun disklabels which may have the first partition beginning at sector 0, this is even somewhat likely. 1) create a sun disklabel w/partitions 2) mkfs the first partition (at sector 0) 3) remove the partition table 4) run blkid - this finds the fs on the whole disk, places in cache 5) recreate the partition table 6) run blkid - this finds the partition, places in cache And now we have both /dev/sda and /dev/sda1 in cache. There are heuristics in probe_all to avoid putting the whole disk in cache if it has partitions, but there is nothing to remove the whole-disk entry in the above case. I think the below patch suffices, although I haven't quite convinced myself that setting the lens[which]=0; is the right logic for that bit of state... 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-04-20blkid: rename blkid_debug_init to blkid_init_debugKarel Zak12-16/+16
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-04-17blkid: add tst_types.c to Makefile.amKarel Zak1-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-04-03blkid: add ZSF supportAndreas Dilger4-2/+70
Signed-off-by: Andreas Dilger <adilger@sun.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2009-04-03blkid: check idinfo[] indexKarel Zak1-1/+4
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-03-18build-sys: fix bugs detected by "make distcheck"Karel Zak2-3/+6
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-03-17blkid: fix ocfs2 detectionKarel Zak1-1/+2
The regression tests has failed on PPC64, because OCFS3 suberblock is in little-endian. Signed-off-by: Karel Zak <kzak@redhat.com>
2009-03-17blkid: add missing blkidP.h to Makefile.amKarel Zak1-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-03-09blkid: add fallback to ext4 for 2.6.29+ kernels if ext2 is not presentTheodore Ts'o1-115/+160
Starting in 2.6.29, ext4 can be used to support filesystems without a journal. So if ext2 is not present, and the kernel version is greater than 2.6.29, and ext4 is present, return a filesystme type of ext4. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> blkid: Add fallback to ext4 for 2.6.29+ kernels if ext2 is not present Starting in 2.6.29, ext4 can be used to support filesystems without a journal. So if ext2 is not present, and the kernel version is greater than 2.6.29, and ext4 is present, return a filesystme type of ext4. [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-03-09blkid: recognize ext4(dev) without journalEric Sandeen1-8/+0
ext4/ext4dev no longer require a journal. w/o this blkid doesn't recognize after: We still must have one ext3-incompat-feature to flag as ext4(dev) so we shouldn't ever mis-recognize it. [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-03-03blkid: fix gcc warning in blkid_get_cache_filename()Karel Zak1-4/+6
cache.c: In function `blkid_get_cache_filename': cache.c:113 warning: return makes pointer from integer without a cast Signed-off-by: Karel Zak <kzak@redhat.com>
2009-03-03blkid: use "char **" rather than "unsigned char **"Karel Zak4-9/+9
Use "char" to be consistent with the old high level API. Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-24blkid: fix a syntax nitKarel Zak1-1/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-24blkid: remove useless if-before-free testsJim Meyering6-26/+13
[kzak@redhat.com: - port the original e2fsprogs patch to util-linux-ng] Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-24blkid: don't dereference NULL upon slashless module dependency lineJim Meyering1-2/+3
* probers/ext.c (check_for_modules): Skip current line if it has no slash. [kzak@redhat.com: - port the original e2fsprogs patch to util-linux-ng] Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-18blkid: blkid_evaluate_spec() shouldn't ignore $BLKID_FILEKarel Zak3-14/+30
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-17blkid: check calloc() return valueKarel Zak1-0/+6
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-13build-sys: libtoolize by libtool-2Karel Zak2-55/+19
We need an infrastructure for stared libraries. The latest libtool-2 seems useful and it's definitely better than the old 1.5 crap. You need to install libtool-2 when you want to run ./autogen.sh script after checkout from git repository. Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-13blkid: start to use ABI versioningKarel Zak1-15/+35
The library ABI and API is backwardly compatible, so it does not make sense to change the library SONAME. This patch adds a symbol versioning, naming paradigm is: BLKID_<maj>.<min> The original libblkid from e2fsprogs uses "1.0" as a .so version and "libblkid.1" as a SONAME for all time (at least according to stuff in /lib/libblkid*) And the original library is without symbols versioning. It means that many private functions are exported to applications ;-( Note that the original blkid_get_library_version() returns E2FSPROGS_VERSION. The version in util-linux-ng returns BLKID_VERSION which is <maj>.<min>.<rel>. The <maj>.<min> is the same version as we use for ABI. This concept seems less confusing than mix a library version and package version. Summary: OLD (e2fsprogs): ABI versioning: -none- SONAME: libblkid.1 .so version: libblkid.so.1.0 blkid_get_library_version(): @E2FSPROGS_VERSION@ (e.g. 1.41.1) NEW (util-linux-ng): ABI versioning: BLKID_<maj>.<min> SONAME: libblkid.1 .so version: libblkid.so.<maj.<min> (e.g. 1.41) blkid_get_library_version(): @BLKID_VERSION@ (e.g. 1.41.1) (BLKID_VERSION = <maj>.<min>.<rel>) Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add blkid_evaluate_spec()Karel Zak5-2/+280
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: compile TEST_PROGRAMsKarel Zak1-4/+19
Well, the src/Makefile.am is not prefect. Maybe it's time to switch to libtools .... Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: add support for /etc/blkid.conf fileKarel Zak4-10/+257
We need a config file for the library. Now the library supports config options: EVALUATION=<method>[,<method>] SEND_UEVENT=<yes|not> CACHE_FILE=<path> Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11blkid: support via raid version 2Sven Jost1-1/+1
[kzak@redhat.com: patch from udev volume_id] Signed-off-by: Karel Zak <kzak@redhat.com>
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 Zak7-6/+58
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 blkid_safe_string()Karel Zak1-1/+1
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: 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 Zak2-7/+9
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>