summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* agetty: make username-in-uppercase feature optional (off by default.)Hamish Coleman2008-03-062-5/+14
| | | | | | | | | | | | | | The following patch makes the username-in-upper-case feature optional. I have chosen to make it default to off since this feature was designed to cater for serial terminals that were last sold almost 30 years ago, thus the likelyhood that anyone will need this feature turned on is vanishingly small. Addresses-Debian-Bug: 156242 Signed-off-by: Hamish Coleman <hamish@zot.org> Signed-off-by: LaMont Jones <lamont@debian.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* fdformat: install to /usr/sbin instead to /usr/binKarel Zak2008-03-041-1/+2
| | | | | | | | It should be in usrsbinexecdir, since formatting is usually a privileged util-linux operation (like mkfs). Reported-By: Jan Engelhardt <jengelh@computergmbh.de> Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: allow auto-destruction of loop devicesBernardo Innocenti2008-02-194-10/+50
| | | | | | | | | | This allows a flag to be set on loop devices so that when they are closed for the last time, they'll self-destruct. The kernel part has been submitted to lkml by David Woodhouse. Signed-off-by: Bernardo Innocenti <bernie@codewiz.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add "sort" to cramfs testKarel Zak2008-02-182-2317/+2317
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: use pkg-config to find the libs for static buildStepan Kasal2008-02-181-5/+17
| | | | Signed-off-by: Stepan Kasal <skasal@redhat.com>
* build-sys: do not add -luuid to BLKID_LIBSStepan Kasal2008-02-181-1/+1
| | | | | | | * configure.ac: Do not include -luuid in BLKID_LIBS, the library dependencies handle this. Signed-off-by: Stepan Kasal <skasal@redhat.com>
* build-sys: add --enable-static-programsStepan Kasal2008-02-184-4/+105
| | | | | | | | Add support for static versions of mount, umount, losetup, fdisk, and sfdisk. Co-Author: Karel Zak <kzak@redhat.com> Signed-off-by: Stepan Kasal <skasal@redhat.com>
* fdisk: use more readable "GPT" name rather than "EFI GPT"Robert Millan2008-02-181-1/+1
| | | | | | | | | | | Although GPT is defined in EFI spec, it is widely used without EFI, as it reserves space for the MBR and works fine on PC/BIOS systems provided the bootloader supports it. This is in fact the way everyone seems to be following to overcome the 2 TiB limitation with MSDOS partition table. Signed-off-by: Robert Millan <rmh@aybabtu.com>
* mount: use canonicalize in getfs_by_devnameKarel Zak2008-02-181-0/+13
| | | | | | | | Fixes a problem when you define a device via a persistent udev device name in /etc/fstab but use the real block device name on mount invocation. Signed-off-by: Karel Zak <kzak@redhat.com>
* rtcwake: fix typo SATE -> STATEMike Frysinger2008-02-151-3/+3
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* rtcwake: include libgen.h for basename prototypeMike Frysinger2008-02-151-0/+1
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* mkswap: set UUID for swap space (add -U option)Martin Schulze2008-02-152-3/+22
| | | | | | | | | | | | | | A friend of mine is looking into the possibility of cloning Debian (and other) systems automatically and stomped over swap partitions getting assigned new UUIDs every time the new harddisk is partitioned and swap is created. It's essential when partitions are to be recognised by their uuid and not by their old device path anymore. Addresses-Ubuntu-Bug: #66637 Signed-off-by: LaMont Jones <lamont@debian.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: "can't create lock file" message sometimes means failure, sometimes notMark McLoughlin2008-02-143-7/+15
| | | | | | | | | | | | | | | | | | | | What the patch does is goes from the situation where: 1) If /etc/mtab doesn't exist and /etc is read-only, you get the "can't create lock file" message and the mount fails 2) If /etc/mtab does exist and /etc is read-only,you get the same message but the mount succeeds Clearly, the failure to update /etc/mtab should either cause the mount to fail or not ... sometimes causing it to fail, and sometimes not (each with the same message) is not useful. This patch sets the same behaviour for create and update mtab. In both cases it prints error message and the mount succeeds. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* setterm: add -blan [force|poke] options for TIOCL_{BLANKED,BLANK}SCREENSamuel Thibault2008-02-083-11/+61
| | | | | | | | | | Linux has some interface to force an immediate blank (TIOCL_BLANK/UNBLANKSCREEN) or get the blank status (TIOCL_BLANKEDSCREEN), which is useful e.g. for blind people. Co-Author: Karel Zak <kzak@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* rtcwake: fix UTC time usageDavid Brownell2008-02-081-1/+11
| | | | | | | | | | | | Timezone handling is broken in this version since it's always passing UTC time into the kernel, even on systems where the RTC uses the local timezone. I think that bug must come from bugs in how the system used to to originally develop this code handled the RTC timezone. Both RTCs should have been kept in UTC ... but only one of them was. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* losetup: add --associated optionKarel Zak2008-02-082-21/+68
| | | | | | | | | | | | | | | | | | | | | | | losetup -j | --associated <file> [-o <num>] This new option lists all loop devices associated with given file (and optionally file offset). Examples: # losetup -a /dev/loop0: [0807]:21921808 (/foo/vfat-mbr.img) /dev/loop1: [0807]:21921808 (/foo/vfat-mbr.img), offset 100 /dev/loop2: [0807]:21921802 (/bar/ext3.img) # losetup -j /foo/vfat-mbr.img /dev/loop0: [0807]:21921808 (/foo/vfat-mbr.img) /dev/loop1: [0807]:21921808 (/foo/vfat-mbr.img), offset 100 # losetup -j /foo/vfat-mbr.img -o 100 /dev/loop1: [0807]:21921808 (/foo/vfat-mbr.img), offset 100 Signed-off-by: Karel Zak <kzak@redhat.com>
* losetup: support unlimited number of loopsKarel Zak2008-02-081-109/+318
| | | | | | | | | | | | | | | | | | | | | | | | | | Old implementation: - supports 256 loop devices only - doesn't support gaps in list of loop devices (e.g. loop0, loop1, loop3 -- loop3 is invisible) Kernel 2.6.21 removes artificial maximum 256 loop device. Now the maximum of loop devices could be really huge (depends on limit of MINOR numbers). It means we need a better way how work with loop devices than blindly call stat(2) for all 0-1048575 devices. This patch uses three methods: a) scan /sys/block/loopN (used for losetup -a only). This method is probably the fastest way how found used loop device on machine with huge number of devices in /dev. b) classic way, stat(2) for all loop[0-7] devices (default number of loop devices). This cheap method is sufficient for 99% of all machines. c) scan all /dev/loopN or /dev/loop/N Signed-off-by: Karel Zak <kzak@redhat.com>
* ipcs: add information about POSIX compatibility to ipcs.1Karel Zak2008-02-081-0/+14
| | | | | Addresses-Suse-Bug: #274338 Signed-off-by: Karel Zak <kzak@redhat.com>
* renice: detect errors in arguments, add -v, -h and long optionsLaMont Jones2008-01-292-26/+55
| | | | | | | | | | | | | | | | | | * renice was using atoi(), which does no error detection, meaning that: "renice +20 blah" was accepted as valid. * add -h | --help * add -v | --version * add long options for -p, -u and -g * cleanup coding style Addresses-Debian-Bug: #385245 Co-Author: Karel Zak <kzak@redhat.com> Signed-off-by: LaMont Jones <lamont@debian.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* kill: man page is missing a description of "kill -0"Karel Zak2008-01-281-0/+2
| | | | | Addresses-Red-Hat-Bugzilla: #429559 Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: better fallback for get_random_id()H. Peter Anvin2008-01-281-1/+4
| | | | | | | | When /dev/urandom is not available, we have to use some kind of a hack to generate a random MBR identifier. Use a better fallback that incorporates the clock down to microsecond granularity. Signed-off-by: H. Peter Anvin" <hpa@zytor.com>
* login: fix a small memory leak and remove unnecessary zeroingKarel Zak2008-01-281-2/+6
| | | | | | | | | This patch fix a small memory leak (rh#251539) and also remove unnecessary pam_set_item(). We needn't to zeroing PAM_USER when the value is already NULL, it doesn't make sense. Addresses-Red-Hat-Bugzilla: #251539 Signed-off-by: Karel Zak <kzak@redhat.com>
* umount: don't print duplicate error messagesKarel Zak2008-01-281-0/+13
| | | | | | | | | | | | umount(8) is trying to umount a device two times to prevent some obscure scenarios. It's maybe a nice feature, but it also produces duplicate error messages. # umount /home umount: /home: device is busy umount: /home: device is busy Signed-off-by: Karel Zak <kzak@redhat.com>
* umount: add hint about lsof & fuserKarel Zak2008-01-281-1/+4
| | | | | | | | This patch adds a hint about lsof and fuser to the "device is busy" error message. Addresses-Red-Hat-Bugzilla: #145844 Signed-off-by: Karel Zak <kzak@redhat.com>
* cal: fix weekday alignment for certain localesPádraig Brady2008-01-174-93/+116
| | | | | | | | | | | | | | | For example this had too much padding: LANG=zh_CN.utf8 cal -j while this had too little padding: LANG=hu_HU.utf8 cal This had invalid chars: LANG=li_BE.utf8 cal This had too few chars: LANG=si_LK.utf8 cal Note some locales may display with slightly worse alignment (fa_IR.utf8 for example), but that is only because the terminal is not merging the combining characters. This happens on gnome-terminal-2.18.3-1.fc8 at least. Signed-off-by: Pádraig Brady <P@draigBrady.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: calculate +size{K,M,G} in 2^NKarel Zak2008-01-141-23/+49
| | | | | | | | | | | | | | | | | | | | fdisk(8) does not calculate partition size (+sizeM or +sizeG) in MiB or GiB correctly. It uses 10^N instead 2^N. This patch cleanups +sizeX to: +sizeK -- KiB (2^10) +sizeKB -- KB (10^3) +sizeM -- MiB (2^20) +sizeMB -- MB (10^6) +sizeG -- GB (10^9) +sizeGB -- GiB (2^30) This patch also fixes the "Last cylinder..." hint message. The "+number" without any suffix is not a size at all. It's number of cylinders/sectors. Note, the 10^N suffixes are not proposed to end-uses in the hint message. Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: add more details to the --version outputKarel Zak2008-01-141-2/+18
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* sys-utils: correct setarch.8 manpage link creationFrédéric Bothamy2008-01-141-2/+2
| | | | | | | | | | | | | | | At least on Debian, .so commands are relative to the man directory (e.g., /usr/share/man), not to the subdirectory: % man i386 man: can't open /usr/share/man/setarch.8: No such file or directory No manual entry for i386 See also http://bugs.debian.org/453245 Addresses-Debian-Bug: #453245 Signed-off-by: Frédéric Bothamy <frederic.bothamy@free.fr> Signed-off-by: LaMont Jones <lamont@debian.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: add AC_CANONICAL_HOSTMiklos Szeredi2008-01-081-0/+1
| | | | | | This seems to be needed in certain environments. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
* docs: mark vipw(1) is deprecated in favor of vipw from shadow-utilsKarel Zak2008-01-071-0/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: disable syscall fallbacks for non-linux systemsKarel Zak2008-01-031-11/+13
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* swapon: add sundries.hKarel Zak2008-01-031-2/+1Star
| | | | | | so we can compile with -fno-common. Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: "nofail" mount optionMatthias Koenig2008-01-032-4/+20
| | | | | | | | | | | It would be nice to have a mount option "nofail" indicating that mount should not return an error if the device does not exit. This is useful for hotpluggable devices which are configured in fstab and __might__ not exist at boot time. Co-Author: Karel Zak <kzak@redhat.com> Signed-off-by: Matthias Koenig <mkoenig@suse.de> Signed-off-by: Karel Zak <kzak@redhat.com>
* cfdisk: define portable {DEFAULT,ALTERNATE}_DEVICESamuel Thibault2008-01-031-0/+8
| | | | | | Set DEFAULT_DEVICE and ALTERNATE_DEVICE for GNU/Hurd and FreeBSD Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* setterm: remove unnecessaty ifndef TCGETSSamuel Thibault2008-01-031-5/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* more: replace CBAUD with cfgetispeed()Samuel Thibault2008-01-031-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* login: replace termio with termios interfaceSamuel Thibault2008-01-031-3/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: replace termio with termios interfaceSamuel Thibault2008-01-031-77/+54Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tailf: non-linux supportSamuel Thibault2007-12-181-0/+2
| | | | | | Include <sys/inotify.h> only when inotify_init() was detected Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* include: <stdint.h> provides everythingSamuel Thibault2007-12-181-1/+0Star
| | | | | | Do not include <linux/posix_types.h> as <stdint.h> provides everything. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* partx: use swab macros from bitops.hKarel Zak2007-12-171-62/+62
| | | | | | | | | Clean up GPT code: - remove C++ comments - tailing white-spaces - use cpu_to_ swab macros from bitops.h Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: use swab macros from bitops.hKarel Zak2007-12-171-20/+2Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* include: add bitops.h with swab{16,32,64} macrosKarel Zak2007-12-171-2/+20
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* include: add bitops.h with swab{16,32,64} macrosKarel Zak2007-12-172-1/+52
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: fix building for AVR32 and CRISImre Kaloz2007-12-171-1/+3
| | | | | | | The following simple patch fixes fdisk compilation for the AVR32 and CRIS architectures. Signed-off-by: Imre Kaloz <kaloz@openwrt.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: build arch(1) during distcheckStepan Kasal2007-12-171-1/+1
| | | | | Signed-off-by: Stepan Kasal <skasal@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: simplify code around RDEV_LINKS and SETARCH_LINKSStepan Kasal2007-12-174-18/+9Star
| | | | Signed-off-by: Stepan Kasal <skasal@redhat.com>
* build-sys: use portable $(VAR:=) instead of gmake-specific $(addsuffix)Stepan Kasal2007-12-171-1/+1
| | | | Signed-off-by: Stepan Kasal <skasal@redhat.com>
* build-sys: use dist_man_MANS instead of man_MANSStepan Kasal2007-12-1712-38/+38
| | | | Signed-off-by: Stepan Kasal <skasal@redhat.com>
* shutdown: use _PATH_MOUNTED instead of _PATH_MTABStepan Kasal2007-12-171-2/+2
| | | | Signed-off-by: Stepan Kasal <skasal@redhat.com>