summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* more: use xalloc for memory allocationDavidlohr Bueso2010-11-011-10/+6Star
| | | | Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* pg: use xalloc for memory allocationDavidlohr Bueso2010-11-011-17/+3Star
| | | | Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* mount: use utimensat(AT_FDCWD) rather than open()+futimens()Karel Zak2010-10-291-10/+3Star
| | | | | | Thanks to Kay Sievers. Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: add note about agetty to TODOKarel Zak2010-10-291-1/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* remove free() from atexit() callbacksKarel Zak2010-10-292-13/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* chrt: Add noreturn attribute to show_usage() functionMarek Polacek2010-10-291-1/+1
| | | | Signed-off-by: Marek Polacek <mmpolacek@gmail.com>
* use _exit() instead of exit() in sighandlersMarek Polacek2010-10-295-5/+5
| | | | Signed-off-by: Marek Polacek <mmpolacek@gmail.com>
* agetty: fix -s option (baud rate setup)Karel Zak2010-10-261-7/+26
| | | | | | | | | | | | | | | | | | The problem is pretty visible in strace output: broken version: ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 opost isig icanon echo ...}) = 0 [...] ioctl(0, SNDCTL_TMR_START or TCSETS, {B0 -opost -isig -icanon -echo ...}) = 0 ^^^ fixed version: ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 opost isig icanon echo ...}) = 0 [...] ioctl(0, SNDCTL_TMR_START or TCSETS, {B115200 -opost -isig -icanon -echo ...}) = 0 Reported-by: Jon Masters <jcm@redhat.com> Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=645640 Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck: add support for whole-disk locking (-l option)Karel Zak2010-10-263-10/+123
| | | | | | | | | | | | | | | | | This feature allows to call multiple independent fsck instances rather than use only one "fsck -A" process. The lock uses LOCK_EX flock(2). The lock request is ignored if the whole-disk is non-rotating disk. The verbose mode (-V) provides information about disk locking. Note that "fsck -l" does not care if the device is stacked, for example if you want to call "fsck -l /dev/md0" and "fsck -l /dev/md1" then the underlying devices will not be locked. The traditional "fsck -A" does not run in parallel for stacked devices. Requested-by: Lennart Poettering <lennart@poettering.net> Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: optimize blkid_devno_to_devname()Karel Zak2010-10-251-23/+65
| | | | | | | | The brutal force /dev directory scanning should be used as a fallback solution only. Currently, almost all systems use udev and we can read the name from /sys/block/<maj>:<min> symlink. Signed-off-by: Karel Zak <kzak@redhat.com>
* swapon: add support for "nofail" fstab mount optionKarel Zak2010-10-252-3/+11
| | | | | | | | | This option is already supported by mount(8) and fsck(8), there is no reason to have any exception for swap devices. Note that the --ifexists command line option applies to all swap devices, the "nofail" setting is per device. Signed-off-by: Karel Zak <kzak@redhat.com>
* umount: umount -r segfaultKarel Zak2010-10-251-5/+10
| | | | | | | | | | | | | | | | | | | | umount(8) segfaults when update incomplete mtab file after remount to read-only (-r). For example autofs does not store info about mountpoint to /etc/mtab file. # mount /dev/sda1 /mnt/test # sed -i -e 's:/dev/sda1 .*::g' /etc/mtab # cd /mnt/test # umount -r /mnt/test umount: /mnt/test busy - remounted read-only Segmentation fault The command "umount -r" should not care about /etc/mtab if the related mtab entry does not exist. Reported-by: Paul Crawford <psc@sat.dundee.ac.uk> Addresses: https://bugs.launchpad.net/bugs/579858 Signed-off-by: Karel Zak <kzak@redhat.com>
* lib: add test program to canonicalize.cKarel Zak2010-10-252-1/+16
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: remove warning about FS detection from mount.1Karel Zak2010-10-211-5/+0Star
| | | | | | | The warning is from util-linux 2.7.1 (year 1996)... the filesystems detection is pretty generic now. Signed-off-by: Karel Zak <kzak@redhat.com>
* man: add russian translation of ddate.1Karel Zak2010-10-214-0/+132
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* ctrlaltdel: use err() instead of fprintf() and exit()Marek Polacek2010-10-211-29/+18Star
| | | | | | | | [kzak@redhat.com: - remove unnecessary program name from err(), - use program_invocation_short_name] Signed-off-by: Marek Polacek <mmpolacek@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* look: fix conflict between locally defined err() and glibc's versionDavidlohr Bueso2010-10-211-40/+10Star
| | | | | Signed-off-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* misc-utils: use new xmalloc() wrapperDavidlohr Bueso2010-10-214-17/+8Star
| | | | Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* xalloc: general purpose memory allocation handling wrappersDavidlohr Bueso2010-10-211-0/+46
| | | | | | | [kzak@redhat.com: - use %zu for size_t] Signed-off-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: fix memory leakIgor Bazhitov2010-10-211-0/+2
| | | | | | | | search_type and search_handle fields of blkid_dev_iterate iterator are not being freed after usage. Add cleanup code. Signed-off-by: Igor Bazhitov <igor.bazhitov@gmail.com>
* column: code readability improvementsSami Kerola2010-10-211-53/+57
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* column: error messaging & exit codesSami Kerola2010-10-211-8/+12
| | | | | | | Human understandable error messages along with symbolic exit codes to comply with coding standard. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* column: EOF handling bugSami Kerola2010-10-211-2/+3
| | | | | | | | | | | | | | | | | | For the last line of the file lenght of line should be determined where the EOF is instead of new line. Old output was $ printf "1 2\n3" | column -t column: line too long 1 2 which this commit will change to $ printf "1 2\n3" | column -t 1 2 3 Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: fix MBR detection on iPod and cleanup vfat codeKarel Zak2010-10-155-196/+192Star
| | | | | | | | | | | - 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>
* libblkid: consolidate magic strings detection codeKarel Zak2010-10-154-49/+46Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* partx: integrate support for mac and sun partitions, based on kpartx.Davidlohr Bueso2010-10-085-7/+6Star
| | | | | | | | [kzak@redhat.com: - remove unnecessary members from struct slice, - fix gcc warnings] Signed-off-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* partx: add sun partition table supportDavidlohr Bueso2010-10-081-0/+134
| | | | Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* partx: add mac partition table supportDavidlohr Bueso2010-10-081-0/+74
| | | | Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* docs: update TODOKarel Zak2010-10-071-29/+11Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: don't canonicalize "spec" with --no-canonicalize optionMiklos Szeredi2010-10-071-1/+1
| | | | | | | "Spec" was still canonicalized despite --no-canonicalize. This resulted in a hang during login with pam_encfs (Debian Bug#593336). Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
* tests: update namei regression testKarel Zak2010-10-071-1/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* cal: use EXIT_* and program_invocation_short_nameKarel Zak2010-10-071-13/+9Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lscpu: really use 'mode' argument in path_fopen()Petr Uzel2010-10-071-1/+1
|
* flock: use more useful example in flock.1Jakob Unterwurzacher2010-10-071-1/+1
| | | | | | | | The example in the man page does not prevent concurrent execution, as it obtains a shared lock. More useful is taking an exclusive lock, i.e. remove "-s". Additionally, IMO most people want the script to exit when the lock cannot be acquired, so adding "-n".
* findmnt: fix support for -a optionMilan Broz2010-10-071-1/+1
| | | | Signed-off-by: Milan Broz <mbroz@redhat.com>
* sfdisk: save errno before calling perrorForest Bond2010-10-071-1/+4
| | | | | | | | | | | | errno is saved into a local variable to avoid it getting trampled by perror before it is checked to determine the return value. This issue seems quite rare, but I have seen it when running sfdisk via gksudo and using the --quiet command-line option. From what I can tell, this combination triggers loading of translations in perror, which (at least on my machine) ends up changing the value of errno. Signed-off-by: Forest Bond <forest@alittletooquiet.net>
* column: update manual page to match column switchesSami Kerola2010-10-071-63/+36Star
| | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* column: getopt_long and new help outputSami Kerola2010-10-071-14/+36
| | | | | | | [kzak@redhat.com: - remove __progname, cleanup usage()] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* fallocate: fix build failure with old linux headersMike Frysinger2010-10-071-1/+5
| | | | | | | | If linux/falloc.h does not exist, the build system still enables the fallocate util, but ultimately fails when it tries to include the header and use a define from it. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* fsck: inform about nonexistent devices in verbose modeKarel Zak2010-10-071-3/+10
| | | | | Reported-by: Serafeim Zanikolas <sez@debian.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: add searching in attributes dir to BeFSJeroen Oortwijn2010-10-071-60/+323
| | | | | | | | 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>
* swapon: warn if file owner is not rootKarel Zak2010-10-071-0/+4
| | | | | Reported-by: Bernhard Voelker <bernhard.voelker@siemens-enterprise.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* umount: use strtosize() for offset=Karel Zak2010-10-072-4/+8
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* namei: parse all path arguments when an optarg path will failSami Kerola2010-10-011-11/+26
| | | | | | | | | | | | | | | | | | | | | | | | Old implementation of namei listed path all the way to non-existing file or directory, something like: f: /usr/bin/nxdir/file d / d usr d bin ? nxdir - No such file or directory (2) whiles the current implementation prints: namei: failed to stat: /usr/bin/nxdir/file: No such file or directory The new output it's not helpful. I am especially interested see where the path is broken when a path is symlink to other path with symlink, and few more like that, and something somewhere is broken. [kzak@redhat.com: - coding style changes] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* taskset: proper numbers parsingKarel Zak2010-09-306-35/+61
| | | | | Reported-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: eliminate redundant call to open()Markus Rinne2010-09-301-8/+8
| | | | | | | Don't use open() in get_boot() if it's called with an argument try_only, because the file has already been opened by the caller. Signed-off-by: Markus Rinne <markus.ka.rinne@gmail.com>
* mount: Don't call canonicalize_*(SPEC) for 9pSven Eckelmann2010-09-301-1/+2
| | | | | | | | | | | | | | | When calling "mount -t 9p -o trans=virtio foobar /mnt/bar" and foobar exists in the current path, the 9p virtio transport driver will be called with $CWD/foobar and fail with "9p: no channels available". Similar problems exist with remote file servers "mount -t 9p 23.42.08.15 /mnt/bar" and Plan 9 From User Space applications "mount -t 9p -o trans=unix,uname=$USER `namespace`/acme /mnt/bar" A similar exception like for nfs, cifs and smbfs must be added for 9p. Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
* mount: avoid starting a man page line with a single quoteChris Frost2010-09-301-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: fix mount.8, shortname=mixed is now default for vfatPetr Uzel2010-09-301-2/+2
| | | | | | | | Since Linux kernel commit 955234755ce4a2c33cfc558912aa8f2148cc1fc6, the default mode for vfat filesystem is 'shortname=mixed'. Reported-by: Harald Koenig <koenig@linux.de> Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* ddate: revert man page typoKarel Zak2010-09-301-2/+2
| | | | | | | | | | On Sat, Sep 18, 2010 at 03:10:52AM +0300, Anssi Hannula wrote: > According to wikipedia [1] 'Holyday' was the correct spelling, I > guess the first hunk should be reverted. > > [1] http://en.wikipedia.org/wiki/Discordian_calendar Signed-off-by: Karel Zak <kzak@redhat.com>