summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-03-15mount: more explicitly explain fstab usage in mount.8Karel Zak1-0/+28
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-15mount: report ambivalent FS detection, improve brute force detectionKarel Zak3-14/+34
The ambivalent probing result should be properly reported and user should be informed that the problem is possible to bypass by "-t <type>" or resolved by wipefs(8). The mount(8) command uses a brute force stage (calls mount(2) for all /{proc,etc}/fylesystems) if there is not any other way how to detect the filesystem type. The brute force stage should not be restricted by libblkid. It's possible that libblkid is not able to detect slightly corrupted filesystem, but kernel is able to mount such filesystem. Note that the brute force stage should not be used if libblkid returns ambivalent probing result. In this case user's intervention is required (e.g. mount -t <type>). Reported-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-15wipefs: cleanup usage() and man pageKarel Zak2-2/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-14tests: fix whitespacesKarel Zak4-15/+15
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-14ionice: fix typoPierre Hauweele1-1/+1
Signed-off-by: Pierre Hauweele <antegallya@gmail.com>
2010-03-14libblkid: fix infinite loop when probe chain bails out earlyColin Watson2-3/+7
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>
2010-03-11libblkid: remove "0x" prefix from DRBD UUIDKarel Zak1-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-11libblkid: improve ZFS detection and add LABEL and UUID extractionAndreas Dilger2-37/+183
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>
2010-03-11libblkid: prevent overflow in BeFSJeroen Oortwijn1-7/+7
Prevent overflow by casting values to blkid_loff_t before applying block shift. Signed-off-by: Jeroen Oortwijn <oortwijn@gmail.com>
2010-03-11umount: add --fake option to umount(8)Miklos Szeredi2-2/+19
Add --fake option to umount(8), which omits calling the actual umount syscall (and the loop device deletion) but modifies /etc/mtab. This is similar to the -f or --fake option to mount(8). This would allow some simplifications in fuse by allowing it to call the umount syscall and letting umount(8) just update mtab. [kzak@redhat.com: - initialize 'res' variable in umount_one() ] Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-11mount: properly ignore comments in /etc/filesystemsMike Frysinger1-2/+2
The POSIX spec for sscanf() says that whitespace may be matched against 0 bytes which means doing sscanf(" %s") against "#foo" will result in a match. You can see this behavior by using the verbose options on a garbage file: ... mount: you didn't specify a filesystem type for /dev/null I will try all types mentioned in /etc/filesystems or /proc/filesystems Trying # mount: mount(2) syscall: source: "/dev/null", target: "/", filesystemtype: "#", mountflags: -1058209792, data: (null) Trying #vfat mount: mount(2) syscall: source: "/dev/null", target: "/", filesystemtype: "#vfat", mountflags: -1058209792, data: (null) ... Reported-by: Dave Barton <dave.barton@comodo.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-11tests: update fdisk testsKarel Zak1-2/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-11mkswap: don't call blkdev_find_size()Karel Zak1-2/+0
.. it's already called by blkdev_get_size(). Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-11libblkid: don't use fstat() in blkid_get_dev_size()Karel Zak1-4/+0
We already use fstat() in blkdev_get_size(). Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-11lib: use fstat() as fallback in blkdev_get_size()Karel Zak1-0/+9
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-11mount: use unmangle/mangle() from libKarel Zak2-54/+3
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-10swapon: use unmangle() for filenames from /proc/swapsKarel Zak2-2/+4
linux kernel encodes all garbage in filenames by mangle() function. We need to unmagle() to get the real filenames. Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-10lib: add mangle.c for mtab (fstab or swaps) encodingKarel Zak4-1/+133
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-10swapon: remove " (deleted)" from filenames from /proc/swapsKarel Zak1-1/+15
The filenames in /proc/swaps are generated by seq_path() and this function uses __d_path() from fs/dcache.c. The filename could generated with " (deleted)" suffix. We need real filenames without the suffix. Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=562403 Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-10libblkid: add blkid_probe_get_{offset,fd} functionsKarel Zak3-2/+31
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-10liblkid: move getsize.c code to lib/Karel Zak4-196/+111
.. and cleanup blkdev_get_size() usage in libblkid. Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-10libblkid: reset BLKID_TINY_DEV flag in blkid_probe_set_devicePascal Terjan1-0/+1
Signed-off-by: Pascal Terjan <pterjan@mandriva.com>
2010-03-10libblkid: fix display of device sizeKarel Zak1-1/+1
blkid_loff_t is int64 so use %jd not %zd in debug Reported-by: Pascal Terjan <pterjan@mandriva.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-08libblkid: more robust minix probingKarel Zak1-0/+10
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>
2010-03-03libblkid: cleanup usage of empty topology valuesKarel Zak3-8/+7
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-03libblkid: support alignment_offset=-1Karel Zak7-60/+89
Unfortunately, Linux kernel uses "signed int" for alignment_offset and the offset could be -1 for devices with undefined alignment (if no compatible sizes and alignments exist for stacked devices). There is no way how libblkid caller can respond to the value -1, so we are going to hide this corner case... TODO: maybe we can export an extra boolean value 'misaligned' rather then complete hide this problem. We will see... Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-01mount: posix option of vfat is obsoleteYoshihiro Takahashi1-0/+1
Summary of changes from v2.5.42 to v2.5.43 [PATCH] removes posix option of fat (3/5) This removes the posix option of vfat. The current posix options works only as an alias of name_check=s. Signed-off-by: Yoshihiro Takahashi <ytakahashi@miraclelinux.com>
2010-03-01lscpu: fix cpuid opcode detectionHenne Vogelsang1-1/+1
Fixes commit c9239f23acdc8b50f8bcbfadf967c6a490fd4693. The author didn't care for matching constraints when resorting the register constraints. The eax register (with the cpuid opcode) is now in operand 1, not zero anymore. Signed-off-by: Henne Vogelsang <hvogel@opensuse.org>
2010-03-01ldattach: prints help to stdoutKarel Zak1-5/+7
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-01ldattach: add --iflag command line optionTilman Schmidt2-4/+68
Add a command line option '-i' / '--iflag' for setting or clearing input flags on the serial device before attaching the line discipline. [kzak@redhat.com: - use generic functions for work with iflags table - add list of iflags to usage/help output - move iflags parsing to separate function] Impact: added functionality Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: Karel Zak <kzak@redhat.com>
2010-03-01ldattach: create a generic functions for name=value tablesKarel Zak1-14/+29
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-26fdisk: fix 'p' output for sun labelKarel Zak2-9/+14
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-23wipefs: fix license (GPL -> GPLv2+)Karel Zak1-3/+4
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-19fdisk: swap VTOC values for warning messagesKarel Zak1-3/+3
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-19libblkid: improve Sun VTOCKarel Zak1-18/+30
It seems that for example GNU Parted is able to generate Sun VTOC with empty sanity, version and nparts fields. But there is still useful info about partition flags in such VTOC. This change makes libblkid Sun PT parser compatible with Sun PT parser in Linux kernel. Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-19blkid: fix blkid_probe_lookup_value() usageKarel Zak1-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-18blkid: encode PART_ENTRY_TYPEKarel Zak2-2/+3
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-18libblkid: add PART_ENTRY_{SCHEME,NUMBER}Karel Zak2-1/+12
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-18libblkid: add support for partition flags/attributesKarel Zak10-1/+42
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-18libblkid: add blkid_partition_set_type()Karel Zak11-24/+60
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-18sfdisk: make sure writes make it to disk in write_partitions()Bryn M. Reeves1-0/+5
Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=565946 Signed-off-by: Bryn M. Reeves <bmr@errorists.org> Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-18blkid: export ID_PART_ENTRY_* variables for udevKarel Zak1-5/+43
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-18libblkid: add support for PART_ENTRY_* valuesKarel Zak3-7/+131
blkid(8) will be replacement for devkit-disks-part-id, so we have to be able to found entry in partition table for requested partition. This functionality is enabled by BLKID_PARTS_ENTRY_DETAILS flag (see blkid_probe_set_partitions_flags() for more details). This patch also add a new public function blkid_partlist_devno_to_partition(). Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-18libblkid: don't probe for nested PT on tiny disks (<=1.44MiB)Karel Zak1-14/+15
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-18libblkid: add generic functions for sysfs attributesKarel Zak3-33/+55
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-17libblkid: fix ZSF detectionAndreas Dilger2-9/+19
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>
2010-02-16swapon: fix swapsize calculationKarel Zak1-1/+1
Reported-by: Peter Breitenlohner <peb@mppmu.mpg.de> Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-16blkid: report open() errors in low-level probingKarel Zak1-2/+4
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-15fdisk: don't use 1MiB grain on small devicesKarel Zak1-3/+6
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-15tests: update fdisk testsKarel Zak4-65/+65
Signed-off-by: Karel Zak <kzak@redhat.com>