| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
... to avoid misinterpretation by gtk-docs.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
# mkntfs -Q -F /dev/sdc
old version:
# ./blkid -p /dev/sdc
/dev/sdc: UUID="0E9E8C5F2F718479" TYPE="ntfs" USAGE="filesystem" PTTYPE="dos"
new version:
# ./blkid -p /dev/sdc
/dev/sdc: UUID="0E9E8C5F2F718479" TYPE="ntfs" USAGE="filesystem"
Reported-by: Mike Fleetwood <mike.fleetwood@googlemail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
| |
We do not need all the metadata and it seems the extra padding is
problematic in some cases. Let's keep is simple and use fixed offset
for the metadata rather than sizeof().
References: https://github.com/karelzak/util-linux/pull/820
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With aligned attribute many blkid tests fail with following error. So
instead of aligning to 4K add padding that makes the struct same size
without causing asan trip over.
libblkid/src/superblocks/drbd.c:179:6: runtime error: member access
within misaligned address 0x55913d7e6958 for type 'struct
meta_data_on_disk_9', which requires 4096 byte alignment
In zfs structure it seems compiler is adding padding, that does not mix well
with be32_to_cpu() and other bit operations.
libblkid/src/superblocks/zfs.c:109:23: runtime error: load of misaligned
address 0x7ff6406540e4 for type 'uint32_t' (aka 'unsigned int'), which
requires 8 byte alignment
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
| |
Without this running test_blkid_save without arguments will cause a crash
when strdup() refers to none-exiting file name.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
| |
Kernel 5.2 can use superblock version 3 for dm-integrity.
Let's remove the explicit version check to be compatible
with future extensions.
Signed-off-by: Milan Broz <gmazyland@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This started as fix to following warning.
libblkid/src/superblocks/bcache.c:33:3: warning: ISO C99 doesn’t
support unnamed structs/unions [-Wc99-c11-compat]
But when sent to review Karel told out rather than getting rid of warnings
lets get rid of everything unnecessary.
[kzak@redhat.com: - use original struct member names rather than 'padN']
Reference: https://github.com/karelzak/util-linux/pull/802
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
[-Waddress-of-packed-member]
Let's keep compilers and static analyzers happy. The idea is to use
memcpy() to copy from buffer to variable and use all label as unsigned
char rather than vectorize by uint16_t.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If blkid_verify deems that device revalidation is not needed since BLKID_PROBE_MIN
seconds haven't elapsed since the last revalidation of the device it returns
a blkid_dev. However, if this device has been read from the cache file on disk then
it wont' have BLKID_BID_FL_VERIFIED bit set. This in turn could lead to a later
call to blkid_dev_get free this device in case its part of a multi device
configuration. This is particularly relevant to btrfs raid configurations.
Namely this was exhibited by btrfs-progs which use blkid for device enumeration.
In case of a multi-device filesystem (i.e raid10) running xfstest btrfs/011
would fail sporadically since cached devices read from cache were not revalidated
due to being recently validated (according to timestamp in the cache file) at
the same time their in-memory blkid_dev structures didn't have BLKID_BID_FL_VERIFIED
set. This lead to their untimely removal from the cache from blkid_get_dev.
Fix this by setting the BLKID_BID_FL_VERIFIED when returning from blkid_verify
with a valid device irrespective of whether full revalidation was performed or
the device is deemed valid due to being recently validated.
[kzak@redhat.com: - remove also check for BLKID_BID_FL_VERIFIED, the
function needs to check for elapsed time only]
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
That constant is set to 200 seconds and is already check in probe_all().
It essentially controls how often blkid_probe_all can do a full cache
revalidation. Since blkid_verify is called from within probe_all() iff at least
BLKID_PROBE_INTERVAL seconds have elapsed it makes no sense to check this value
in blkid_verify.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
|
|
|
|
|
| |
Reference: https://github.com/codespell-project/codespell
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
| |
This change fixes "warning: variable 'var' may be uninitialized when used
here [-Wconditional-uninitialized]" warnings reported in various files.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Currently we use libuuid to print UUID only. This code is possible to replace
by one snprintf(). It seems better to duplicate this one snprintf than force
all distros to keep libuuid together with libblkid.
Note, this scenario has been already supported on --disable-libuuid.
Reported-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
blkid(8) in high-level mode checks partitions and unpartitioned
whole-disk devices from the file /proc/partitions.
The current heuristic assumes that partition name ends with a digit.
Unfortunately, this is not correct -- for example md0 or nvme0n1 are
whole-disk devices.
This commit uses sysfs_devno_is_wholedisk() to make sure the device is
a partition (according to kernel or DM). It's probably more expensive,
because this way requires more syscalls (to read stuff from /sys etc.).
The patch also adds more information to the blkid(8) man page.
Addresses: https://github.com/karelzak/util-linux/issues/728
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
libblkid/src/superblocks/ntfs.c:80:2: warning: ISO C restricts enumerator
values to range of 'int' (4294967295 is too large) [-Wpedantic]
Addressed: https://github.com/karelzak/util-linux/pull/732
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|\
| |
| |
| |
| |
| |
| | |
* 'master' of https://github.com/kvanals/util-linux:
Removed BlueStore VERSION information as it is gibberish
Updated BlueStore expected result
Added BlueStore test image
|
| | |
|
| |
| |
| |
| | |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|\|
| |
| |
| |
| |
| | |
* 'master' of https://github.com/kvanals/util-linux:
Finished up BlueStore support
Added support for detecting Ceph BlueStore Block Devices
|
| | |
|
| | |
|
|/
|
|
|
|
|
| |
Stratis superblock is little endian, ensure we retrieve the
number of sectors and initialization time correctly.
Signed-off-by: Tony Asleson <tasleson@redhat.com>
|
|
|
|
|
|
|
| |
This adds the according meta-data structs + defines and an additional
function to detect DRBD9 magics.
Signed-off-by: Roland Kammerer <roland.kammerer@linbit.com>
|
|
|
|
|
|
| |
Spelling error spotted by lintian.
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
|
|
|
|
|
|
|
| |
Some new features in Linux kernel 4.19 for dm-integrity use metadata
format version 2, patch adds it to detection.
Signed-off-by: Milan Broz <gmazyland@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Let's use standardized names for licenses. The names used by SPDX
makes things more obvious at first glance. For complete list see:
https://spdx.org/licenses/
Note, this commit does not change any license or so...
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
It's probably unnecessary change as blkid_parttable_set_id() is used
by MBR code and we use proper buffer size there, but better safe than
sorry.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
* use "const" in functions where we don't modify arguments
* use "const" when cast from const buffer to any struct (superblock etc.)
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds search for a secondary LUKS2 header,
if the primary one is corrupted.
This patch is primarily needed for wipefs that should wipe
both signatures (otherwise LUKS2 header recovery can use
secondary header and revert wipefs action).
Signed-off-by: Milan Broz <gmazyland@gmail.com>
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|\
| |
| |
| |
| | |
* 'master' of https://github.com/pali/util-linux:
libblkid: udf: Fix reporting UDF 2.60 revision
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
According to the UDF 2.60 specification, the Minimum UDF Read Revision
value shall be at most #0250 for all media with a UDF 2.60 file system.
So in this case use Minimum UDF Write Revision as ID_FS_VERSION to
distinguish between UDF 2.50 and UDF 2.60 discs.
This commit also adds a testing Blu-Ray Recordable image with UDF revision
2.60 created by Nero which really sets Minimum UDF Read Revision to 2.50.
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
|
|/
|
|
|
| |
Addresses: https://github.com/karelzak/util-linux/issues/641
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Windows 10 Creators edition has extended the ntfs cluster limit to
2MB. As a consequence blkid does not identify recent partitions with
clusters beyond 65K as ntfs ones.
Addresses: https://github.com/karelzak/util-linux/issues/641
Signed-off-by: Karel Zak <kzak@redhat.com>
Co-Author: Jean-Pierre André <jean-pierre.andre@wanadoo.fr>
|
|
|
|
|
| |
Reported-by: L A Walsh <lkml@tlinx.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Supported:
* WinVista version
* Win7 and later versions (based on NTFS)
* BitLockerToGo (for removable media; based on FAT32)
Unfortunately, it's without LABEL and UUID. It seems BitLocker does
not use volume_label and volume_serial stuff from NTFS header.
Addresses: https://github.com/karelzak/util-linux/issues/617
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
| |
The current prober is based on signature only (two bytes!). It seems
pretty fragile. Linux kernel also checks for allocation size in the
superblock, let's use it too... it's better than nothing.
Reported-by: Milan Broz <gmazyland@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|\
| |
| |
| |
| |
| |
| | |
* 'master' of https://github.com/pali/util-linux:
tests: Add tests for FAT32 labels
blkid: Encode any field which starts with LABEL in same way as LABEL field
libblkid: vfat: Change parsing label in special cases
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Use only label from the root directory and do not fallback to the label
stored in boot sector. This is how MS-DOS 6.22, MS-DOS 7.10, Windows 98,
Windows XP and also Windows 10 behave. Moreover Windows XP and Windows 10
do not touch label in boot sector anymore, so removing FAT label on those
Windowses leads to having old label still stored in boot sector (which
MS-DOS and Windows fully ignore).
* Label entry "NO NAME" in root directory is treated as label "NO NAME"
instead of empty label. In root directory it has no special meaning.
String "NO NAME" has a special meaning (empty label) only for label
stored in boot sector.
* Label from the boot sector is now stored into LABEL_FATBOOT field. So if
there are applications which depends or needs to read this label, they
have ability.
After this change LABEL always correspondent to the label from the root
directory and LABEL_FATBOOT to the label stored in the boot sector. If some
of those labels is missing or is not present (e.g. "NO LABEL" in boot
sector) then particular field is not set.
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
[kzak@redhat.com: - tiny coding style changes]
References: 20e1c3dc03399d6988ef35dedc1364cfc12e9263
Signed-off-by: Tony Asleson <tasleson@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The current code mix partitions as defined on disk with partitions
from partlist (as recognized by libblkid). It seems better to follow
partlist only.
Reported-by: Vaclav Dolezal <vdolezal@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
| |
| |
| |
| | |
Reported-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
| |
| |
| |
| |
| | |
Some more funny typos, please review carefully.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|