summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* libmount: use mnt_fs for mtab APIKarel Zak2011-01-032-85/+71Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: fix datatype for mountflagsKarel Zak2011-01-033-12/+14
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: remove unnecessary options containerKarel Zak2011-01-035-1630/+2Star
| | | | | | | It seems that we are able to be happy with option strings only. The mnt_optls stuff was over-engineering. Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add support for mtab managmentKarel Zak2011-01-034-11/+968
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lib: fix mange() and unmangle() to handle NULLKarel Zak2011-01-031-0/+9
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: correctly use "none" valuesKarel Zak2011-01-033-15/+25
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* findmnt: add support for fs-root (subvolumes and bind mounts)Karel Zak2011-01-032-2/+20
| | | | | | | | | | | | | | | | | | | | | This patch modifies the default output for SOURCE column. All btrfs subvolume mountpoints and all bind-mount (where source is not root of FS) will be printed as: SOURCE TARGET /dev/sda1[/aaa] /mnt/test where /aaa is subvolume name or fs root for bind mounts, it means: # mount -t btrfs /dev/sda1 /mnt/test -o subvol=aaa or: # mount --bind /aaa /mnt/test The info about fs-root is 4th column in /proc/self/mountinfo. Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add mnt_optstr_get_mountflags()Karel Zak2011-01-033-0/+74
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: improve mnt_get_fs_root() and mnt_get_mountpoint()Karel Zak2011-01-032-9/+17
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add uhelper=, improve mnt_split_optstr()Karel Zak2011-01-034-9/+29
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add unit test for mnt_copy_fs()Karel Zak2011-01-031-0/+29
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add utils to get FS root/mountpointKarel Zak2011-01-032-0/+94
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add mnt_copy_fs() and mnt_fs_set_root()Karel Zak2011-01-033-1/+92
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add unmangle/mangle() functions to APIKarel Zak2011-01-035-6/+38
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: remove fs and tab printf functionsKarel Zak2011-01-035-219/+2Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add {start,end}swith() functionsKarel Zak2011-01-033-1/+57
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add mnt_get_writable_mtab_path()Karel Zak2011-01-033-1/+42
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: clean up lock.cKarel Zak2011-01-031-52/+62
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add mnt_tab_parse_mtab()Karel Zak2011-01-038-2/+115
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add mnt_split_optstr()Karel Zak2011-01-035-26/+152
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: don't return old data from optls iteratorKarel Zak2011-01-031-0/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: clean up mount.sym fileKarel Zak2011-01-031-10/+6Star
| | | | | | | The API is not stable yet, so it's possible to increment the current API version rather than create a new version. Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add mnt_fs_get_root()Karel Zak2011-01-035-6/+24
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* findmnt: add /etc/fstab.d supportKarel Zak2011-01-032-3/+23
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add /etc/fstab.d supportKarel Zak2011-01-036-2/+115
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lib: add wrappers for "at" functionsKarel Zak2011-01-034-1/+126
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add mnt_tab_parse_stream()Karel Zak2011-01-033-34/+52
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: don't store filename to mnt_tabKarel Zak2011-01-034-70/+48Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: improve parser return codesKarel Zak2011-01-032-10/+26
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: remove mnt_tab_strerr()Karel Zak2011-01-036-155/+12Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add mnt_tab_set_parser_errcb()Karel Zak2011-01-034-11/+35
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: use PRId64 in PT parserKarel Zak2011-01-011-7/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* hwclock: allow setting of RTC when it contains invalid dataPeter Tyser2010-12-311-4/+16
| | | | | | | | | | | | | | | | | | | | | | In some cases the date/time stored in an RTC can be corrupted, eg due to loss of power, before its been initially set, etc. When this occurs the RTC_RD_TIME ioctl can fail since the Linux kernel determines that the RTC contains invalid data. Currently, when setting an RTC using hwclock, hwclock performs a number of RTC_RD_TIME ioctls before setting the RTC. When one of these ioctls fails, hwclock bombs out and the corrupted RTC data can't be overwritten. Thus once an RTC is corrupted, it can't be fixed via hwclock*. To work around the above issue we can make hwclock not exit when a RTC_RD_TIME failure occurs during the process of setting the RTC. This allows the RTC to be set even when it contains an invalid value, although it is not synchronized to a clock tick before it is set. * 'hwclock --utc --noadjfile --set --date="11/23/10 17:19:00' currently works to fix a corrupted RTC, but a user couldn't determine this without digging through the source code. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* lscpu: avoid len = 0 as a consequence of maxcpus = 0Gerrit Renker2010-12-311-1/+2
| | | | | | | | | | | | | | | | | | | This problem was observed on an x86_64 Mobile AMD Sempron 3700+ where kernel_max returned "0" as the index of the highest CPU. As a consequence, several variables in lscpu, which relied on maxcpus >= 1 (in particular the 'len' value) were set to 0, resulting in the following errors: host>./lscpu lscpu: failed to read: /sys/devices/system/cpu/online: No such file or directory host> cat /sys/devices/system/cpu/kernel_max 0 The fix used by this patch is to interpret kernel_max as an index and maxcpus as a count >= 1, tested to work. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Signed-off-by: Karel Zak <kzak@redhat.com>
* partx: fix authors section in man pageDavidlohr Bueso2010-12-311-1/+1
| | | | Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* cfdisk: close the program when terminal isn't presentFrancesco Cosoleto2010-12-301-6/+17
| | | | | | | | | | | cfdisk was getting characters without checking ERR return code, causing an endless while loop in do_curses_fdisk() or in other functions when the terminal is lost. [kzak@redhat.com: - fix coding style, remove CR macro] Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* wipefs: fail if more device arguments specifiedMilan Broz2010-12-301-0/+3
| | | | | | | | Currently wipefs process only first device argument and silently ignores remaining. Print error instead because it can be quite confusing. Signed-off-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* hexdump: remove od functionality in favor to GNU coreutils odSami Kerola2010-12-306-358/+8Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* libblkid: fix endian conversion bug in NILFSKarel Zak2010-12-301-1/+1
| | | | | Reported-by: Andrew Nayenko <resver@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: remove unnecessary headerKarel Zak2010-12-291-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: remove generated po/POTFILES.inKarel Zak2010-12-294-264/+11Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck: returns proper code on exec() errorKarel Zak2010-12-271-4/+6
| | | | | | | | | | | | | | | | | # fsck -t foo /dev/sda1; echo $? fsck: fsck.foo: not found /sbin/fsck: Error 2 while executing fsck.foo for /dev/sda1 0 new version: # fsck -t foo /dev/sda1; echo $? fsck: fsck.foo: not found fsck: Error 2 while executing fsck.foo for /dev/sda1 8 Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=619139 Signed-off-by: Karel Zak <kzak@redhat.com>
* lsblk: rename "RA" column to "RE"Karel Zak2010-12-261-4/+4
| | | | | | | The RA abbreviation is usually used for readahead, the column in lsblk(8) means removable. Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: use canonicalized names for -l (and sfdisk -d)Karel Zak2010-12-174-23/+32
| | | | | | | .. no more /dev/dm-X in "fdisk -l" and "sfdisk -d" output, always use /dev/mapper/<name>. Signed-off-by: Karel Zak <kzak@redhat.com>
* swpaon: use canonicalized devnames on -s outputKarel Zak2010-12-171-10/+28
| | | | | | | | | | | | | | Old version Filename Type Size Used Priority /dev/sda3 partition 2353516 76 -1 /dev/dm-1 partition 409596 0 -2 New version: Filename Type Size Used Priority /dev/sda3 partition 2353516 76 -1 /dev/mapper/VUL-lvol0 partition 409596 0 -2 Signed-off-by: Karel Zak <kzak@redhat.com>
* swapon: Canonicalize swap deviceAlexey Gladkov2010-12-171-1/+7
| | | | | | | | | | | | | | | | | | | | | | | Swapon checks whether a swap device is active by searching for the device name in /proc/swaps. /proc/swaps always specifies the path to real device file, even if the path to real device file, even if symlink was passed to the swapon() system call. This differs from /proc/mounts semantics where each string contains exactly the same device name as it was passed to the mount*() system call. If a swap partition resides on lvm, libblkid returns a name in form /dev/mapper/*, but now there are symlinks pointing to device files /dev/dm-*, resulting to /proc/swaps containing /dev/dm-*, but swapon still looks for /dev/mapper/* and tries to activate the swap partition again. [kzak@redhat.com: - remove unnecessary changes from is_in_proc_swaps()] Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com> Tested-by: Petr Uzel <petr.uzel@suse.cz> Signed-off-by: Karel Zak <kzak@redhat.com>
* lsblk: add --nodepsKarel Zak2010-12-162-1/+14
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lib: [tt] fix alignment of the last tree childKarel Zak2010-12-161-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mesg: change error exit code from 1 to >1Francesco Cosoleto2010-12-101-9/+15
| | | | | | According to POSIX and mesg(1) error exit code should be >1. Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* docs: update DEPRECATED fileKarel Zak2010-12-101-4/+1Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>