summaryrefslogtreecommitdiffstats
path: root/libblkid
Commit message (Collapse)AuthorAgeFilesLines
...
* | misc: fix typos using codespellRuediger Meier2018-02-162-3/+3
| | | | | | | | | | | | Some more funny typos, please review carefully. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | libblkid: make mpool independent on libuuidKarel Zak2018-02-131-3/+1Star
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | misc: remove %p from debug messagesKarel Zak2018-02-012-26/+25Star
| | | | | | | | | | | | From libs where suid program may be executed by non-root user. Signed-off-by: Karel Zak <kzak@redhat.com>
* | libblkid: atari - reject devices with blocksize != 512Vaclav Dolezal2018-01-301-0/+4
| | | | | | | | Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
* | libblkid: atari - don't add duplicate entriesVaclav Dolezal2018-01-241-1/+8
| | | | | | | | | | | | This should protect against looped XGMs. Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
* | libblkid: atari - test if any partition fits disk sizeVaclav Dolezal2018-01-241-3/+9
| | | | | | | | Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
* | libblkid: atari - fix bad variable nameVaclav Dolezal2018-01-241-1/+1
| | | | | | | | Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
* | libblkid: Support for Atari partitioning schemeVaclav Dolezal2018-01-234-1/+263
| | | | | | | | | | Addresses: https://github.com/karelzak/util-linux/issues/517 Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
* | build-sys: remove redundant EXTRA_DIST filesRuediger Meier2018-01-222-3/+2Star
| | | | | | | | | | | | | | The sources of AC_CONFIG_FILES (*.in) are automatically distributed. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | build-sys: avoid using prog_DEPENDENCIESRuediger Meier2018-01-221-3/+1Star
| | | | | | | | | | | | | | Use EXTRA_prog_DEPENDENCIES to have the benefit of automake's automatic prog_DEPENDENCIES. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | build-sys: remove unneeded dependencies on bla.h.inRuediger Meier2018-01-221-2/+1Star
| | | | | | | | | | | | | | | | | | | | We have already automakes's automatic dependencies like bla.h.in -> bla.h -> foo.o -> bar.la An explicit direct dependency bla.h.in -> bar.la is redundant and useless anyways. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | build-sys: automake is able to find headers in builddir ...Ruediger Meier2018-01-221-1/+1
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | build-sys: remove generated headers from dist tar ballRuediger Meier2018-01-221-2/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | Headers should only be listed in either *_HEADERS or *_SOURCES, especially when we want nodist_*_HEADERS. Since all the generated headers are made by configure we don't even need to use BUILT_SOURCES or other tricks. Also see automake docs 9.4.1 Built Sources Example: case "Build bindir.h from configure" Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | include/debug: introduce __UL_INIT_DEBUG_FROM_STRING()Karel Zak2018-01-171-1/+1
| | | | | | | | | | | | | | Let's make it possible to use debug.h without environment variables. Suggested-by: J William Piggott <elseifthen@gmx.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* | include/debug: don't print pointer address for SUID programsKarel Zak2018-01-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * introduce new flag __UL_DEBUG_FL_NOADDR to suppress pointer address printing * use __UL_DEBUG_FL_NOADDR when SUID * move ul_debugobj() to debugobj.h, and require UL_DEBUG_CURRENT_MASK to provide access to the current mask from ul_debugobj(). It's better than modify all ul_debugobj() calls and use the global mask as argument. * remove never used UL_DEBUG_DEFINE_FLAG Reported-by: halfdog <me@halfdog.net> Signed-off-by: Karel Zak <kzak@redhat.com>
* | libblkid: Add support for stratisTony Asleson2018-01-114-0/+108
| | | | | | | | | | | | | | | | | | | | Initial support for stratis, ref. https://github.com/stratis-storage [kzak@redhat.com: - remove C++ comment] Signed-off-by: Tony Asleson <tasleson@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* | libblkid: (bcache) cleanup magic string definitionKarel Zak2017-12-181-12/+8Star
| | | | | | | | | | Reported-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* | lib/md5: use ul_/UL_ prefixKarel Zak2017-12-121-7/+9
| | | | | | | | | | | | | | The symbols names are too generic. Addresses: https://github.com/karelzak/util-linux/issues/548 Signed-off-by: Karel Zak <kzak@redhat.com>
* | libblkid: add debug messages when ignore useless devicesKarel Zak2017-12-071-2/+6
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | libblkid: Add VDO superblock information into blkidSweet Tea Dorminy2017-12-074-0/+51
|/ | | | | | | [kzak@redhat.com: - add tests/expected/blkid/low-probe-vdo - enlarge the image (must be > 1024)] Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'master' of https://github.com/pali/util-linuxKarel Zak2017-11-211-1/+3
|\ | | | | | | | | * 'master' of https://github.com/pali/util-linux: libblkid: udf: Fix parsing UDF revision
| * libblkid: udf: Fix parsing UDF revisionPali Rohár2017-11-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UDF revision is stored as decimal number in hexadecimal format. E.g. number 0x0150 is revision 1.50, number 0x0201 is revision 2.01. Apparently all UDF test images have number which has same representation in decimal and hexadecimal format, so problem was not detected. This patch adds new test image with UDF revision 1.50. Internally number is stored as 0x0150. In decimal format it is (incorrectly) 1.80, but in hexadecimal correct 1.50. $ dd if=/dev/zero of=udf-hdd-mkudffs-1.3-8.img bs=1M count=10 $ mkudffs -r 0x150 -b 512 udf-hdd-mkudffs-1.3-8.img Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
* | libblkid: Mark char* params to blkid_dev_set_search as constAndy Grover2017-11-212-2/+2
|/ | | | | | They are not changed by the function. Signed-off-by: Andy Grover <agrover@redhat.com>
* libblkid: udf: Update copyrightPali Rohár2017-11-161-0/+1
| | | | Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
* libblkid: udf: Use UDF revision field from LVD domain id "*OSTA UDF ↵Pali Rohár2017-11-161-7/+19
| | | | | | Compliant" as a fallback value for ID_FS_VERSION when LVIDIU is missing Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
* Merge branch 'master' of https://github.com/pali/util-linuxKarel Zak2017-11-161-39/+35Star
|\ | | | | | | | | | | * 'master' of https://github.com/pali/util-linux: libblkid: udf: Stop scanning Volume Descriptors after we found Terminating Descriptor libblkid: udf: Really try to read only first LVID
| * libblkid: udf: Stop scanning Volume Descriptors after we found Terminating ↵Pali Rohár2017-11-151-0/+3
| | | | | | | | | | | | | | | | | | | | Descriptor Terminating Descriptor is the last descriptor in Volume Descriptor Sequence. After it there can be unrecorded or empty sectors which we do not have to scan. Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
| * libblkid: udf: Really try to read only first LVIDPali Rohár2017-11-151-39/+32Star
| | | | | | | | | | | | We do not want to scan whole LVID sequence. Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
* | libblkid: Add support for Micron mpool formatted drivesJohn Groves2017-11-164-1/+70
|/ | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: udf: Fix parsing LVID locationPali Rohár2017-11-141-2/+11
| | | | And add comment about Logical Volume Integrity Sequence that we do not scan it fully.
* libblkid: udf: Fix reading Logical Volume Integrity Descriptor ↵Pali Rohár2017-11-131-8/+17
| | | | | | | | | | | | | Implementation Use (LVIDIU) LVIDIU is stored at the end of Logical Volume Integrity Descriptor (LVID), after two variable length array of partitions. And number of partitions is stored in LVID, not in Logical Volume Descriptor (LVD). Length of LVIDIU is also stored in LVID, so add check that LVIDIU has enough size. Fixes commit db316767434c2c451ec1732861256d5729143e89.
* Merge branch 'udf' of https://github.com/pali/util-linuxKarel Zak2017-11-131-37/+64
|\ | | | | | | | | | | * 'udf' of https://github.com/pali/util-linux: test: Add UDF hdd image with final block size 4096 created by Linux mkudffs 1.3 libblkid: udf: Optimize and fix probing when block size > 2048 bytes
| * libblkid: udf: Optimize and fix probing when block size > 2048 bytesPali Rohár2017-11-121-37/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Optimize probing and detecting for UDF. Do not read and try to detect VRS (Volume Recognition Sequence) on same blocks more times. For specific VSD (Volume Structure Descriptor) length do it only once. Fix probing of devices which has block size larger then 2048 bytes. It is not truth that VSD is always 2048 bytes long. Its size is minimum of the disk block size and 2048 bytes. See ECMA-167 sections 2/8.4 and 2/9.1. Therefore when block size is larger then 2048 bytes, VRS needs to be scanned again. In commit 501aeb60a4914d8e4b273eb1529d70bc6ffaa077 was removed check for empty VSD identifier because it caused that UDF image with block size of the 4096 bytes was not detected. Reason was that VRS was improperly scanned as VSD was 4096 bytes long, with 2048 bytes zero padding. Now when processing of devices with block size larger then 2048 bytes is fixed we can correctly stop scanning VRS at first invalid VSD as specified in ECMA-167 section 2/8.3.1.
* | Merge branch 'master' of https://github.com/pali/util-linuxKarel Zak2017-11-131-0/+2
|\ \ | |/ |/| | | | | * 'master' of https://github.com/pali/util-linux: libblkid: vfat: Fix reading labels which starts with byte 0x05
| * libblkid: vfat: Fix reading labels which starts with byte 0x05Pali Rohár2017-11-091-0/+2
| | | | | | | | | | | | | | | | When FAT directory entry has leading byte 0x05 it is interpreted as byte 0xE5. This is how FAT stores file name which starts with byte 0xE5 as leading byte in 0xE5 in FAT directory entry means that file slot is empty. Fixes: #533
* | libblkid: improve FreeBSD partitions parsingKarel Zak2017-11-101-1/+10
|/ | | | | | | FreeBSD since version 10 uses relative offsets for nested partitions. Based on Richard Narron changes in kernel:block/partitions/msdos.c. Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: Add support for LUKS2 and new LABEL attributes.Milan Broz2017-10-231-4/+38
| | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for detection of a LUKS2 superblock. LUKS2 is new version of Linux Unified Key Setup for encrypted block devices. LUKS2 contains a binary header and then JSON area for metadata. Blkid should only parse the binary part, including newly available optional LABEL and SUBSYSTEM fields. LABEL is similar to filesystem label. The SUBSYSTEM field is in principle, just a second label and can be used for specific udev rules (for example if you have some 3rd party system that activates volumes automatically, you can mark devices using this attribute). Both labels are optional. The magic string and UUID location are intentionally on the same offset as LUKS v1, so even unpatched blkid now recognizes LUKS2. Anyway, the code should not parse other versions of the header, so we now explicitly check for header version and support only version 1 and 2. Signed-off-by: Milan Broz <gmazyland@gmail.com>
* libfdisk: (sun) make math more robust [coverity scan]Karel Zak2017-10-111-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* misc: cleanup UUID_STR_LEN definitionsKarel Zak2017-09-154-12/+6Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* misc: replace magic number 37 with UUID_STR_LENPhilip Prindeville2017-09-055-6/+14
| | | | Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
* libblkid: udf: Define magic constantsPali Rohár2017-08-201-4/+9
|
* libblkid: fix compiler warning [-Wformat-truncation=]Karel Zak2017-08-161-1/+1
| | | | | | | | | The MBR partition pseudo-UUID is generated from table ID and partition partno. The final UUID size limit is 37 bytes. The table ID has to be restricted to keep compiler happy (for MBR the table ID is 8 bytes as string). Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: mark UBI as RAIDKarel Zak2017-08-032-2/+2
| | | | | | | | | UBI is volume manager rather than filesystem. Note that libblkid has optimized RAIDs probing (don't search for another filesystems is RAID detected). We also don't search for RAIDs on very small devices, but this optimization is ignored for UBI char devices (size=1byte). Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: add support for UBI superblockRafał Miłecki2017-08-034-0/+54
| | | | | | | | | | | | | | | | | | UBI is a volume management system that can be used on a raw flash partition for providing multiple logical volumes. Detecting UBI superblock may be useful for tools wanting to simplify or automate attaching UBI. Please note it's not directly related to the ubifs support which is just a filesystem working on top of UBI volume. In other words: UBI can be used on MTD partition (e.g. /dev/mtdblock0) while ubifs can be used on UBI volume (e.g. /dev/ubi0_0). This patch adds simple code reading UBI version and unique number and setting it in the blkid_probe. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* libblkid: add HPE extended-XFS to known filesystemsMark Tinguely2017-07-204-0/+190
| | | | | | | | | | | | | | The HPE (formerly SGI) enhanced XFS has changed its magic version number to allow the use of EXFS and community XFS filesystems at the same time. This patch adds HPE EXFS support to libblkid. [kzak@redhat.com: - removed EXFS log prober, it uses the same magic string as XFS log] Signed-off-by: Mark Tinguely <mark.tinguely@hpe.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: Add dm-integrity superblock signatureMilan Broz2017-07-183-0/+40
| | | | | | | | | | Since the kernel version 4.12 there is a new dm-integrity module that provides an emulated per-sector metadata format for storing data integrity. This patch adds dm-integrity magic signature to blkid to recognize such a block device. Signed-off-by: Milan Broz <gmazyland@gmail.com>
* build-sys: don't use non-existing UUID_LIBSRuediger Meier2017-07-181-1/+1
| | | | | | | We've added UUID_LIBS in f77a4d1087 but I don't see what it was good for. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* libblkid: don't use CDROM_GET_CAPABILITY ioctl for DM devicesKarel Zak2017-07-122-2/+6
| | | | | | | | | For some reason kernel commit e980f62353c697cbf0c4325e43df6e44399aeb64 add extra warning when the ioctl is used for DM devices. It seems we can avoid this ioctl when the device has dm/uuid. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1469532 Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'master' of https://github.com/pali/util-linuxKarel Zak2017-07-111-45/+90
|\ | | | | | | | | | | | | | | * 'master' of https://github.com/pali/util-linux: tests: update UDF test, add ID_FS_VERSION libblkid: udf: Add support for ID_FS_VERSION libblkid: udf: Fix types libblkid: udf: De-duplicate code for dstring decoding
| * libblkid: udf: Add support for ID_FS_VERSIONPali Rohár2017-07-051-1/+66
| | | | | | | | Set ID_FS_VERSION to Minimum UDF Read Revision.