Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Reported-by: Andrew Nayenko <resver@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Reported-by: Hugh Eaves <hugh@hugheaves.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
The new swsuspend signature has been added by commit
3624eb04c24861ab296842414f9752a393e68372 to kernel 2.6.37-rc1.
Reported-by: "Dr. David Alan Gilbert" <linux@treblig.org>
Addresses: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/682176
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Add the "FAT " magic to vfat. There are devices that use this magic
in their FAT filesystem.
Addresses: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/491476
Signed-off-by: Jeroen Oortwijn <oortwijn@gmail.com>
|
|
Add 0x41645252 to the list of valid signatures of the FAT32 fsinfo
block. It isn't a valid signature, but there are devices that use this
signature in their FAT32 filesystem.
Addresses: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/589369
Signed-off-by: Jeroen Oortwijn <oortwijn@gmail.com>
|
|
- move all FAT code to superblocks/vfat.c only
- add a generic function to verify FAT superblock and use it
in FAT prober as well as in MBR parser
- add a more robust FAT cluster_count check
(it seems that iPod contains an "almost valid" FAT superblock before MBR)
Reported-by: Davidlohr Bueso <dave.bueso@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Add searching for the be:volume_id attribute in the attributes directory
of the root directory. UUID is now always set when the root directory
contains the be:volume_id attribute.
Signed-off-by: Jeroen Oortwijn <oortwijn@gmail.com>
|
|
The side effect of this bug is that wipefs(8) does not report LUKS...
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
commit 2d12ea54c70c9e6a2b77ca6f7b6a786309a22fa7
Author: Valerie Aurora <vaurora@redhat.com>
Date: Thu Jul 29 12:47:35 2010 -0700
libblkid: remove dead code section (duplication of ext* constants)
Signed-off-by: Valerie Aurora <vaurora@redhat.com>
|
|
An CDROM can contain both HFS and ISO9660 views on the same filesystem.
This confuses mount/KDE/Gnome.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
The correct filesystem name is nilfs2, not nilfs.
Signed-off-by: Jiro SEKIBA <jir@unicus.jp>
|
|
This patch implements nilfs2_idinfo to proble nilfs2 partition.
The patch probes uuid, label, version and verify crc check sum of
superblock.
Signed-off-by: Jiro SEKIBA <jir@unicus.jp>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Add exFAT file system <http://en.wikipedia.org/wiki/ExFAT> detection support.
Signed-off-by: Andrew Nayenko <resver@gmail.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>
|
|
We don't have to check for collision between partition table and RAID
on all RAIDs. This problem is specific to MD, where underlying device
could be a partition. The RAIDs like via, intel, ... always use
whole-disks only.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=592958
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
TuxOnIce stores its signature at the beginning of the swap, rather than
at the end of the first page like swsusp does.
[kzak@redhat.com: - use macro for TOI magic string,
- check for TOI in swap probing function to avoid
collision between swap and TOI]
Signed-off-by: Chow Loong Jin <hyperair@ubuntu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Reported-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
The RAID signature is usually at end of the block device. We have to
differentiate between:
- RAID signature at the end of disk, and
- RAID signature at the end of the last partition
The position of the signature is same in both cases... It means we have
to the parse partition table and check if the area where is RAID signature
is covered by any partition. If yes, then the RAID signature belongs to the
partition and has to be ignored during whole-disk probing.
The second problem are RAID1 underlaying disks (=raid members). The
RAID device could be partitioned, in such a case the partition table
is visible from underlaying devices. These partition tables has to be
ignored. The libblkid ignores partition tables on raid members now.
Note that all these changes are implemented for blkid_do_safeprobe()
only. The others functions allow to access all detected superblocks or
partition tables.
Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=543749
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
The library provides detected magic strings by SBMAGIC= and offsets of
the magic strings by SBMAGIC_OFFSET= variables. This patch allows to
support this feature for RAIDs and filesystems where the magic string
is not on fixed position.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
The API is used only internally.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
RAID probing of CD/DVD can yield errors because of well-known problem
in reading the end of the disk with some disk/drive combinations.
Borrow CD detection method from udev and skip the RAID tests for
these devices.
[kzak@redhat.com: - check for linux/cdrom.h in ./configure
- add #ifdef around the ioctl call
- call the ioctl for block devices only]
Signed-off-by: Mark Colclough <m.s.colclough@bham.ac.uk>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
The superblocks probe bails out early with no results in some cases. If
this happens, blkid_do_probe needs to go to the next chain, rather than
entering an infinite loop calling superblocks_probe over and over again.
[kzak@redhat.com: - print debug message always when leaving
superblocks_probe()]
Addresses: https://bugs.launchpad.net/bugs/528073
Signed-off-by: Colin Watson <cjwatson@canonical.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Improve ZFS uberblock detection to loop over multiple uberblocks,
and detect at least 4 magic values, to avoid random collisions.
It doesn't yet probe the VDEV LABEL at the end of the device, though
it wouldn't be too hard to add it at this point if needed.
Add extraction of the pool name (as LABEL), the VDEV (block device)
guid as UUID_SUB, and pool_guid (volume) as UUID from the nvlist in
the VDEV LABEL. Do simple sanity checking on the nvlist data values
to avoid overflowing the buffer if they are corrupt in any way.
[kzak@redhat.com: - use %PRIu64 instead %llu]
Signed-off-by: Andreas Dilger <adilger@sun.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Prevent overflow by casting values to blkid_loff_t before applying
block shift.
Signed-off-by: Jeroen Oortwijn <oortwijn@gmail.com>
|
|
Unfortunately, it's still possible to interpret some parts of ext3
filesystem as minix superblock ;-(
So, the most robust is to check for the extN magic string in minix
probing function.
Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=570606
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Fix the ZFS device detection by looking at multiple uberblocks to see
if any are present, rather than looking for the ZFS boot block which
is not always present.
There may be up to 128 uberblocks, but the first 4 are not written to
disk on a newly-formatted filesystem so check several of them at
different offsets within the uberblock array.
[kzak@redhat.com: - port e2fsprogs patch to util-linux-ng]
Signed-off-by: Andreas Dilger <adilger@sun.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Currently, the library does not allow to initialize blkid_probe if the
file (or block device) is empty. The empty file is reported as an
error. That's wrong. The empty file should be interpreted as a file
without any FS or PT. It means that
blkid_do_{probe,safeprobe,fullprobe}()
have to return 1 ("nothing").
Reported-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
The library does not reset the probing result (e.g. LABEL, VERSION)
when the probing function failed (return value != 0). We have to be
absolutely sure that the FS has been properly detected before we set
LABEL or VERSION or so.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Add probing function for the Be File System to libblkid. It sets LABEL,
VERSION and UUID. But UUID is only set if the be:volume_id attribute is
found in the small_data area of the i-node of the root directory.
[kzak@redhat.com: - add .minsz = 1024*1440 to avoid BeFS probing on
very small devices]
Signed-off-by: Jeroen Oortwijn <oortwijn@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Add initial support for detection of the Be File System
<http://en.wikipedia.org/wiki/Be_File_System> to libblkid.
Signed-off-by: Jeroen Oortwijn <oortwijn@gmail.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Check if blkid_probe_get_buffer() returns NULL to avoid dereferencing
a zero pointer resulting in a segfault.
Signed-off-by: Matthias König <mk@phasorlab.de>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
The library does not use any buffer with fixed size any more. The new
version calls read() for necessary data only.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
.. and don't probe for swap or ext. journal on tiny disks.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
- don't read the begin (69kB) of the device by one large read()
- fill in the SB buffer dynamically
- use extra buffer for FATs root dir entries (FAT FS label)
on small devices to avoid large reads
Detect FAT12 on 1.4MB device (number of bytes):
Old version:
$ strace -e read blkid -p floppy.img 2>&1 | \
awk -F ' = ' 'BEGIN {x=0} /read/ && !/.*ELF/ {x += $2} END { print x }'
73292
New version:
$ strace -e read blkid -p floppy.img 2>&1 | \
awk -F ' = ' 'BEGIN {x=0} /read/ && !/.*ELF/ {x += $2} END { print x }'
8192
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
- don't ignore @size in blkid_probe_set_device()
- ignore extremely small devices (<= 1024 bytes, e.g. extended partitions)
- don't use safe probing for small devices
- don't probe for RAIDs on small devices
Signed-off-by: Karel Zak <kzak@redhat.com>
|