summaryrefslogtreecommitdiffstats
path: root/libblkid
Commit message (Collapse)AuthorAgeFilesLines
* libblkid/libblkid.3: Improve the typsetting of the manualBjarni Ingi Gislason2014-05-061-3/+3
| | | | | | | Correct space between sentences to two space characters (or begin each sentence on a new line). Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
* libblkid: make new_partition() more robustKarel Zak2014-04-181-2/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: fix return codes from PART_ENTRY_* probingKarel Zak2014-04-151-1/+11
| | | | | | | | | | | | | | | | The partitions prober does two step: 1) probe the assigned device for partition table 2) probe whole-disk device for partition table if the assigned device is a partition (this generates PART_ENTRY_* results for blkid -p -o udev)) The step 2) is optional and the return code from this probing should not override success (rc=0) from the step 1) -- except situations when the step 2) ends with I/O error or when the step 1) found nothing, but 2) was successful. Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: remove private function from docsKarel Zak2014-04-071-7/+1Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: fix .h.in usage in libblkid and libmountKarel Zak2014-04-071-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: fix partitions probingKarel Zak2014-03-284-5/+11
| | | | | | | | | | | * PART_ENTRY_* stuff is optional and should not overwrite previous probing result in partitions_probe() * missing minix parental partition is not error * blkid_probe_is_vfat() usage has to be more robust Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: use new debug functionsKarel Zak2014-03-2134-218/+196Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'common_debug' of https://github.com/ooprala/util-linuxKarel Zak2014-03-212-26/+7Star
|\ | | | | | | | | | | | | | | | | | | | | | | * 'common_debug' of https://github.com/ooprala/util-linux: clean up redundant macros and defines libfdisk: use include/debug.h libblkid: use include/debug.h libmount: further debug.h integration libcommon: don't mention lib versions in debug macros libcommon: define more debugging macros libmount: use macros from include/debug.h libcommon: add common debugging routines
| * clean up redundant macros and definesOndrej Oprala2014-03-132-10/+1Star
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
| * libblkid: use include/debug.hOndrej Oprala2014-03-132-21/+11Star
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | blkid: convert superblocks to new calling conventionHannes Reinecke2014-03-2056-303/+376
| | | | | | | | | | | | | | | | | | | | | | | | | | With the previous patch the scanning functions were modified to return a differentiated return code. To correctly abort scanning when an I/O error occurs we need to differentiate between 'error' (= -1) and 'not found' (= 1) in the probe functions. This patch updates all superblock scanning functions to the new calling convention. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Karel Zak <kzak@redhat.com>
* | blkid: stop scanning on I/O errorHannes Reinecke2014-03-204-36/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whenever we fail to read from a device it's pointless to continue with probing; we should be failing immediately. Otherwise the system will continue logging I/O errors. This patch updates the probe functions to return the negative error number on error and BLKID_PROBE_NONE if not found. [kzak@redhat.com: - fix s/return errno/return -errno/] Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Karel Zak <kzak@redhat.com>
* | libblkid: convert GPT attributes to host endianessKarel Zak2014-03-121-1/+1
|/ | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: sort gitignore filesSami Kerola2014-03-122-10/+10
| | | | | | Use 'LC_ALL=C sort -fu' order for all lists. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* libblkid: improve commentKarel Zak2014-03-121-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: don't connect _DEPENDENCIES and _LIBADDKarel Zak2014-03-051-6/+5Star
| | | | | | | | | The _DEPENDENCIES has to be used for dependencies on another in-tree files, but _LIBADD is to specify additional libs (including external libs). Reported-by: oleid <notifications@github.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: add extra checks to XFS proberKarel Zak2014-02-191-16/+142
| | | | | | The current code rely on XFS magic string only. It seems too fragile. Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: detect alone PMBRKarel Zak2014-01-203-2/+44
| | | | | | | | wipefs(8) has to also erase PMBR, not GPR header only, otherwise the device could be still interpreted as a device with a partition table. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1054186 Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: no more probe for btrfs backup superblockKarel Zak2014-01-164-19/+2Star
| | | | | | | | | | | | | * Linux kernel cares about the first superblock only * backup superblock are FS specific stuff and there is no reason to care about it in generic tools * the problem with broken btrfs utils has been already fixed (it was possible to use the utils on filesystem with erased primary superblok without any warning message). Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: add blkid_partlist_get_partition_by_partno()Karel Zak2014-01-154-0/+40
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: (nilfs2) check also backup superblockKarel Zak2014-01-131-24/+42
| | | | | | | | | * read also backup superblock * check which superblock is newer * set minimal device size to 1MiB Reported-by: Phillip Susi <psusi@ubuntu.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: Identify extN file system properlyLukas Czerner2013-12-121-180/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently when trying to identify extN file system we're playing games with searching for kernel modules and parsing /proc/filesystem. All of this just because ext4 module can be used to mount ext3 and ext2 file systems on recent kernel and also because of ext4dev. However all of this is not necessary. Ext4 module which does support mounting ext2 and ext3 file system is able to recognize and mount ext2 and ext3 type so there is no need to disguise it and ext4dev should only be ever used for testing and not as fallback when other modules are missing (use -t instead). This also introduces a bug when in situation that we only have ext4 modules with ext2/ext3 support which is not loaded and we try to mount ext2 file system we will mount it incorrectly as ext4. This will not happen if the ext4 module is already loaded. With this patch we remove all the unnecessary checks and return the real type of the file system which is on the device. This fixes the issue. However on the kernel which was not compiled with EXT4_USE_FOR_EXT23 support one would have to provide file system type (-t) to be able to mount the file system with ext4 driver. Signed-off-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: fix sgi PT parser to report system partitionsKarel Zak2013-11-271-2/+1Star
| | | | | | ... to be compatible with Linux kernel. Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: fix memory leak in blkid_parse_tag_string()Karel Zak2013-11-191-5/+9
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: fix swap-area versionKarel Zak2013-11-041-3/+3
| | | | | | | | | | | * v1: hdr->version = 1, magic string = SWAPSPACE2 * v0: no versio in header, magic string = SWAP-SPACE The mistake has been introduced in the old udev volume_id binary where the version was set according to magic string. Reported-by: Phillip Susi <psusi@ubuntu.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* COPYING: fix grammar of referring phrase, and indicate location betterBenno Schulenberg2013-10-081-2/+2
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* libblkid: use proper type in xfs log checker [coverity scan]Karel Zak2013-10-011-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: update docsKarel Zak2013-09-272-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: Get rid of an unnecessary checkKarel Zak2013-09-261-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: fix kboff usage in BSD proberKarel Zak2013-09-161-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: move bsd definitions to pt-bsd.hKarel Zak2013-09-161-78/+1Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: add mbr_get_partition()Karel Zak2013-09-163-10/+7Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: use functions from pt-mbr.hKarel Zak2013-09-163-14/+14
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: rename sys_type to sys_indKarel Zak2013-09-163-10/+10
| | | | | | | This makes struct dos_partition more compatible with the current fdisk code. Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: move MBR definitions to include/pt-mbr.hKarel Zak2013-09-165-53/+8Star
|
* libblkid: move MBR partition types to include/Karel Zak2013-09-168-142/+20Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: move SGI disklabel definitions to include/Karel Zak2013-09-161-77/+3Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: export info about bad csumKarel Zak2013-09-111-4/+11
| | | | | | | If a bad check sum is detected and BLKID_SUBLKS_BADCSUM is enabled than SBBADCSUM=1 is added to the probing result. Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: Add bcache supportRolf Fokkens2013-09-114-0/+139
| | | | | | | | | From https://bugzilla.redhat.com/show_bug.cgi?id=1001120#c11 [kzak@redhat.com: - move crc64 code to lib/ by separate patch, - use BLKID_USAGE_OTHER rather than _RAID] Signed-off-by: Karel Zak <kzak@redhat.com>
* wipefs: Also wipe superblocks with bad checksumsGabriel de Perthuis2013-09-112-2/+7
| | | | | | | | [kzak@redhat.com: - move BLKID_SUBLKS_BADCSUM login to blkid_probe_verify_csum()] Signed-off-by: Gabriel de Perthuis <g2p.code@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: use separate function to verify checksumsKarel Zak2013-09-116-15/+39
| | | | | | | | | * consolidate "incorrect checksum" debug messages * verify all on one place Based on patch from Gabriel de Perthuis <g2p.code@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: don't use UUID= for xfs external logKarel Zak2013-09-111-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | The log UUID is usually the same as filesystem UUID, it is bad idea to have two devices with the same UUID in the system. It seems batter to use only LOGUUID= for xfs external log. # mkfs.xfs -l logdev=/dev/sdb1 /dev/sdb2 # blkid -p -o udev /dev/sdb1 | grep FS ID_FS_LOGUUID=4063d453-5c01-46ce-b92f-9523d64aecc7 ID_FS_TYPE=xfs_external_log ID_FS_USAGE=other # blkid -p -o udev /dev/sdb2 | grep FS ID_FS_UUID=4063d453-5c01-46ce-b92f-9523d64aecc7 ID_FS_TYPE=xfs ID_FS_USAGE=filesystem The filesystem (sdb2) uses UUID= and log (sdb1) uses LOGUUID=. Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: don't interpret regual XFS as external xfs logKarel Zak2013-09-111-0/+3
| | | | | | | | | | | | $ blkid -o udev -p tests/output/blkid/images-fs/xfs.img ID_FS_AMBIVALENT=filesystem:xfs other:xfs_external_log it seems that regular XFS with internal log may be interpreted as log device. This is incorrect. This patch checks for XFS magic string to avoid this collision. Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: diffs between errors and failed probing in via raidKarel Zak2013-09-111-5/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: diffs between errors and failed probing in silicon raidKarel Zak2013-09-111-3/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: populate jbd LOGUUID in addition to UUIDKarel Zak2013-09-111-0/+2
| | | | | | | | | | | | The LOGUUID is alias for UUID, this alias is necessary to standardize the tag name (we want to use the same tag LOGUUID= for all external logs on all filesystems). Note that for another filesystems (e.g. xfs) we have to differentiate between the journal and filesystem uuids to avoid collisions, because both devices use the same uuid. Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: rename UUID_LOG to LOGUUIDKarel Zak2013-09-112-2/+2
| | | | | | | | | | | * the goal is to make the uuid visible and usable it as mount variable/spec, then LOGUUID= seems better than UUID_LOG= * we already have PARTUUID= * the UUID_RAW and UUID_SUB are not used by mount(8) Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: Detect external XFS log deviceEric Sandeen2013-09-113-0/+90
| | | | | | | | | | | | Detects external XFS log devices with a minimum size of 10MB. It's possible to craft a smaller log, but that would be very unlikely; it'd require a small XFS filesystem and an intentionally small log, which would defeat the performance goal of an external log in the first place. [kzak@redhat.com: - use UUID_LOG variable name for the log uuid] Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: add CFLAGS and LDFLAGS for daemons and shared libsKarel Zak2013-08-271-0/+2
| | | | | | | | This is necessary for paranoid security guys who believe that things like "-Wl,-z,relro" or "-Wl,-z,bind_now" is a way how to make the world a safer place... Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: support pseudo PARTUUID= for MBRKarel Zak2013-06-133-1/+14
| | | | | | | | | | | | # blkid /dev/sdb1 dev/sdb1: TYPE="ext2" PARTUUID="54e743a7-01" the PARTUUID is generated from MBR Id and partition number. The same method uses Linux kernel for root=PARTUUID= on systems with MBR. Note that the patch also removes 0x prefix from PTUUID. Signed-off-by: Karel Zak <kzak@redhat.com>