| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
# 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>
|
|
|
|
|
|
| |
to avoid things like strcmp(tab->type, "gpt") in generic code.
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>
|
|
|
|
|
| |
Reported-by: "Richard W.M. Jones" <rjones@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
The standard format is to seperate each entry with a comma, and
for each one to be on a line by itself. Most util-linux pages
follow this, but a few do not.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fstab entry:
FOO= / btrfs defaults 1 1
Program received signal SIGABRT, Aborted.
0x00007f016ccd8819 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
(gdb) bt
at ../sysdeps/unix/sysv/linux/libc_fatal.c:196
Reported-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
| |
... forgot in the previous commit to the swap prober.
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>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
| |
It seems that on-disk MINIX FS superblock is native-endian.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=833841
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
# wipefs /dev/sdd1
offset type
----------------------------------------------------------------
0x65000 zfs_member [raid]
LABEL: zm1
UUID: 18067835215330778964
and "wipefs -o 0x65000 /dev/sdd1" seems to run in an endless loop.
Reported-by: Helmut Hullen <Hullen@t-online.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
... the BLKID_DEBUG= is not more supported.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These functions are already marked extern in header file.
libblkid/src/dev.c:70:19: warning: function 'blkid_dev_devname' with external linkage has definition
libblkid/src/dev.c:128:26: warning: function 'blkid_dev_iterate_begin' with external linkage has definition
libblkid/src/dev.c:148:12: warning: function 'blkid_dev_set_search' with external linkage has definition
libblkid/src/dev.c:175:12: warning: function 'blkid_dev_next' with external linkage has definition
libblkid/src/dev.c:196:13: warning: function 'blkid_dev_iterate_end' with external linkage has definition
libblkid/src/tag.c:84:12: warning: function 'blkid_dev_has_tag' with external linkage has definition
libblkid/src/tag.c:282:26: warning: function 'blkid_tag_iterate_begin' with external linkage has definition
libblkid/src/tag.c:303:12: warning: function 'blkid_tag_next' with external linkage has definition
libblkid/src/tag.c:322:13: warning: function 'blkid_tag_iterate_end' with external linkage has definition
libblkid/src/tag.c:336:18: warning: function 'blkid_find_dev_with_tag' with external linkage has definition
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
disk-utils/fsck.minix.c:511:9: warning: mixing declarations and code
fdisks/sfdisk.c:982:5: warning: mixing declarations and code
fdisks/sfdisk.c:1254:5: warning: mixing declarations and code
fdisks/sfdisk.c:1564:5: warning: mixing declarations and code
lib/mbsalign.c:279:7: warning: mixing declarations and code
libblkid/src/devname.c:378:17: warning: mixing declarations and code
libfdisk/src/alignment.c:219:9: warning: mixing declarations and code
term-utils/wall.c:111:9: warning: mixing declarations and code
text-utils/col.c:418:19: warning: non-ANSI function declaration of function 'flush_blanks'
text-utils/col.c:553:12: warning: non-ANSI function declaration of function 'alloc_line'
text-utils/rev.c:105:9: warning: mixing declarations and code
text-utils/tailf.c:245:9: warning: mixing declarations and code
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
|
| |
- use stderr only
- use BLKID_ prefix for debug masks
- don't use \n in in messages and don't use printf(),
but use generic blkid_debug().
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>
|
|
|
|
|
|
|
|
|
| |
MFT_RECORD_ATTR_VOLUME_NAME = cpu_to_le32(0x60),
^
./include/bitops.h:94:36: error: braced-group within expression
allowed only inside a function
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
* don't teach people C by header files, so use warn_unused_result
attribute only on places where we return allocated memory (to avoid
leaks in applications).
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>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
In UDF, Volume Structure Descriptors are always 2048 bytes long (ECMA-167,
3rd ed., §2/9.1), while filesystem sectors are the same size as the sectors
of the underlying media (e.g., UDF 2.01 §1.3.2). Before this commit, the
block size was estimated from VSD offsets, which gives incorrect answers for
non-optical media. Now, the UDF probe uses the device block size by default,
falling back to 2048-byte sectors for the case of optical-disk images.
Signed-off-by: Zachary Catlin <z@zc.is>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
Add blkid_parttable_get_id() function.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I have seen blkid failing to report any meaningful data on some of UDF
volumes I have (Windows installer media):
$ ./blkid -p -o udev en_windows_7_professional_with_sp1_x64_dvd_u_676939.iso
ID_FS_LABEL=UDF_Volume
ID_FS_LABEL_ENC=UDF\x20Volume
ID_FS_TYPE=udf
Also, once my patches to expose more of ISO9660 info get merged, we'd
also need the same info to be exposed for UDF volumes.
This patch adds ISO9660 probing to UDF volumes and here is the result I
see on my example UDF volume (together with my pending patch to expose
more ISO9660 information):
$ ./blkid -p -o udev en_windows_7_professional_with_sp1_x64_dvd_u_676939.iso
ID_FS_PUBLISHER_ID=MICROSOFT CORPORATION
ID_FS_APPLICATION_ID=CDIMAGE 2.54 (01/01/2005 TM)
ID_FS_UUID=2011-04-12-02-38-58-00
ID_FS_UUID_ENC=2011-04-12-02-38-58-00
ID_FS_BOOT_SYSTEM_ID=EL TORITO SPECIFICATION
ID_FS_LABEL=GSP1RMCPRXFRER_EN_DVD
ID_FS_LABEL_ENC=GSP1RMCPRXFRER_EN_DVD
ID_FS_TYPE=iso9660
$ ./blkid -p -o udev en_windows_xp_professional_with_service_pack_3_x86_cd_x14-80428.iso
ID_FS_PUBLISHER_ID=MICROSOFT CORPORATION
ID_FS_APPLICATION_ID=CDIMAGE 2.52 (03/09/2004 TM)
ID_FS_UUID=2008-04-14-12-00-00-00
ID_FS_UUID_ENC=2008-04-14-12-00-00-00
ID_FS_BOOT_SYSTEM_ID=EL TORITO SPECIFICATION
ID_FS_LABEL=GRTMPFPP_EN
ID_FS_LABEL_ENC=GRTMPFPP_EN
ID_FS_TYPE=iso9660
Before anyone asks, Yes! The UDF media I have is all legal and downloaded
directly from MSDN. :)
[kzak@redhat.com: - read LABEL from UDF only if not found anything
useful in ISO9660]
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to kill libosinfo's infamous udev rule[1], we need to make blkid
report the following information as udev properties on IS09660 media so
that libosinfo can make use of that for detection:
1. Volume ID (already exposed as label).
2. System ID.
3. Publisher ID.
4. Application ID.
5. Boot record's boot system ID, (almost always 'EL TORITO
SPECIFICATION' if boot record is present).
Example use:
$ blkid -p -o udev Fedora-17-x86_64-DVD.iso
ID_FS_SYSTEM_ID=LINUX
ID_FS_APPLICATION_ID=GENISOIMAGE ISO 9660/HFS FILESYSTEM CREATOR (C)
1993 E.YOUNGDALE
ID_FS_UUID=2012-05-22-20-55-32-00
ID_FS_UUID_ENC=2012-05-22-20-55-32-00
ID_FS_BOOT_SYSTEM_ID=EL TORITO SPECIFICATION
ID_FS_LABEL=Fedora_17_x86_64
ID_FS_LABEL_ENC=Fedora\x2017\x20x86_64
ID_FS_TYPE=iso9660
ID_PART_TABLE_TYPE=dos
[1] https://fedorahosted.org/libosinfo/ticket/1
[kzak@redhat.com: - add blkid_ltrim_whitespace() and use it together
with blkid_rtrim_whitespace() to trim white spaces
- enlarge blkid values to 128 bytes
- add generic blkid_probe_set_id_label() function
- always terminate all _ID with \0
- don't export the _IDs to blkid cache]
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
| |
We were reading the same sector over and over again when parsing ISO9660.
This patches fixes it.
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
* count checksum from superblock
* new (correct) superblock definition from dmraid
Reported-by: Frank Hirtz <fhirtz@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is stupid bug, when libblkid probe for partition table on
whole-disk device with old 0.90 Linux RAID then it creates clone of
the struct blkid_probe to avoid collisions with the original probing
setting.
If the cloned prober is unnecessary then it's deallocated by
blkid_free_probe() ... and this function also closes the file
descriptor if the device has been opened by blkid_new_probe_from_filename().
Fortunately we usually use open() + blkid_probe_set_device(), ...
except wipefs(1).
Reported-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
This adds support for detecting Flash-Friendly File System (f2fs) to libblkid.
Based on work by Sven-Göran Bergh at http://www.mail-archive.com/busybox@busybox.net/msg17874.html
Signed-off-by: Alejandro Martinez Ruiz <alex@nowcomputing.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It seems that blkid_do_probe() is too high-level solution for some
mkfs programs (for example ext4 mkfs supports "undo" so all write
operations has to be implemented by filesystem specific functions).
The new function blkid_probe_step_back() resets internal libblkid
buffers and move probing stuff one step back. It means that the
previously used probing function will be called again in the next
blkid_do_probe() call. This allows to modify on-disk data and check
for backup superblocks or alternative magic strings. Something like:
while (blkid_do_probe(pr) == 0) {
... get SBMAGIC_OFFSET and SBMAGIC len ...
... use your private seek & write() ...
blkid_probe_step_back(pr);
}
References: https://bugzilla.redhat.com/show_bug.cgi?id=902512
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now libblkid (the cache based part) tries to probe for the cached
filesystem firstly. This optimization is broken, because:
* new another superblock could be on the device and the original
is already obsolete
* we still need to probe for partitions and raids
* the code was too fragile
The patch also suggests lsblk --fs in blkid.8 for end users. lsblk
read information from used db.
Reported-by: Andreas Hofmeister <andi@collax.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|