summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* losetup: missing EBUSY error hint messageKarel Zak2008-09-301-5/+16
| | | | | | | | | | | | | | | old version: # losetup /dev/loop0 /foo.img # losetup /dev/loop0 /bar.img; echo $? 2 new version: # losetup /dev/loop0 /foo.img # losetup /dev/loop0 /bar.img; echo $? losetup: /dev/loop0: device is busy 2 Signed-off-by: Karel Zak <kzak@redhat.com>
* login: fix compiler warning (int32 time() arg)Karel Zak2008-09-291-1/+7
| | | | | | | | | | | | | | | | | login.c: In function ‘dolastlog’: login.c:1438 warning: passing argument 1 of ‘time’ from incompatible pointer type Unfortunately, on-disk lastlog format is always 32bit, bits/utmp.h: struct lastlog { #if __WORDSIZE == 64 && defined __WORDSIZE_COMPAT32 int32_t ll_time; #else __time_t ll_time; #endif Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck.cramfs: fix compiler warningKarel Zak2008-09-291-1/+1
| | | | | | | fsck.cramfs.c: In function ‘main’: fsck.cramfs.c:676 warning: ‘length’ may be used uninitialized in this function Signed-off-by: Karel Zak <kzak@redhat.com>
* umount: no checking mount point removalSigned-off-by: Guan Xin2008-09-291-25/+4Star
| | | | | | | | | | | No longer checks if mount point has been renamed or removed. Linux reports EBUSY for these actions, so this check is redundant. [kzak@redhat.com: - remove the check rather than "#if 0" - remove unnecessary mnt_err2 stuff] Signed-off-by: Guan Xin <guanx.bac@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: fix typoGuan Xin2008-09-291-1/+1
| | | | Signed-off-by: Guan Xin <guanx.bac@gmail.com>
* umount: check for overlaid mountsGuan Xin2008-09-291-1/+20
| | | | | | | | | | Linux cannot umount a device whose mount point is hidden by subsequent mount(s). i.e. We must umount the devices associated to a mount point in the reverse order of when they were mounted. If umount was called violating this rule, report error and exit. Signed-off-by: Guan Xin <guanx.bac@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: add info about /proc/mounts to mount.1Karel Zak2008-09-291-1/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: fix typoKarel Zak2008-09-251-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* chrt: add NLS support, clean error messages and return codesKarel Zak2008-09-231-105/+69Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* chrt: support CFS SCHED_IDLE priority and document itMartin Steigerwald2008-09-232-3/+33
| | | | | Signed-off-by: Martin Steigerwald <ms@teamix.de> Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: add -luuid to BLKID_LIBSKarel Zak2008-09-171-1/+1
| | | | | | | | The libblkid is always linked with libuuild, so this indirect dependence in BLKID_LIBS is not a problem. This change helps to people who compile util-linux-ng with non-standard prefix, ..etc. Signed-off-by: Karel Zak <kzak@redhat.com>
* partx: don't redeclare daddr_tmaximilian attems2008-09-161-2/+1Star
| | | | | | | | klibc porting fix, use proper include, nuke redefinition. solaris.c:8: error: redefinition of typedef ‘daddr_t’ /usr/lib/klibc/include/sys/types.h:29: error: previous declaration of ‘daddr_t’ was here Signed-off-by: maximilian attems <max@stro.at>
* ipcmk: add NLS supportKarel Zak2008-09-102-10/+17
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* ipcmk: fix error codes and error messagesKarel Zak2008-09-101-14/+32
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* ipcmk: new commandHayden James2008-09-106-3/+185
| | | | | | | | | | | Small patch to create an application that can easily create ad-hoc ipc resources, along with man page. [kzak@redhat.com: - rename from ipccreat to ipcmk - minor coding style changes] Signed-off-by: Hayden James <hayden.james@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* ionice: add strtol() checks, cleanup usage text and man pageKarel Zak2008-09-062-21/+45
| | | | | | | | | | | | | | | | | | | * cleanup usage() output * check strtol(); don't ignore wrong command line options The original ionice design was a little broken, because it was possible to specify a PID and also a COMMAND: ionice -c2 -p 123 /bin/foo but the command /bin/foo was executed without requested scheduling class. That's stupid behaviour. Now you have to use "-p PID" **or** COMMAND, but not both. Nothing is ignored and all options are checked. Signed-off-by: Karel Zak <kzak@redhat.com>
* ionice: let -p handle multiple PIDsStephan Maka2008-09-052-30/+57
| | | | | | | | | | Makes ionice -p usable like renice, this time backwards compatible [kzak@redhat.com: - fix coding style - add ioprio_setpid()] Signed-off-by: Stephan Maka <stephan@spaceboyz.net> Signed-off-by: Karel Zak <kzak@redhat.com>
* login: fix warning "dereferencing type-punned pointer will break ↵Karel Zak2008-09-011-4/+17
| | | | | | | | | strict-aliasing rules" This patch fix problems with odd pam_get_iten( ..., void **) API. (tested by gcc-4.1.2-42.el5.i386) Signed-off-by: Karel Zak <kzak@redhat.com>
* losetup: remove dependence on minor numbersKarel Zak2008-08-211-0/+4
| | | | | | | | | | | The latest kernel supports partitioned loop devices (kernel commit 476a4813cfddf7cf159956cc0e2d3c830c1507e3). Unfortunately, this change makes minor numbers useless, because mirror number does not match with loop device name (loop<N>). We have to follow loop device names only. Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: round reported sizes rather than truncateKarel Zak2008-08-201-4/+8
| | | | | | | | | | | | | Exmaples (-old, +new): - Disk /dev/mapper/bar: 266.6 GB, 266666666496 bytes + Disk /dev/mapper/bar: 266.7 GB, 266666666496 bytes - WARNING: The size of this disk is 2.1 TB (2199023255552 bytes). + WARNING: The size of this disk is 2.2 TB (2199023255552 bytes). Reported-by: Stepan Kasal <skasal@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* ipcs: adjust some field positions and widths for correct alignmentBenno Schulenberg2008-08-201-5/+5
| | | | | | | | | | [kzak@redhat.com: - note that "ipcs -m -t" did not work correctly on terminal with 80 columns - the change of output alignment should be mentioned in the Release Notes] Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* ipcs: ungettextize the spacing of the table headersBenno Schulenberg2008-08-201-15/+15
| | | | | | | | It makes no sense to allow translators to adjust the spacing when they cannot adjust the spacing of the actual data too. Adjusting such spacing is not really a translator's task. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* fdisk: don't check for GPT when asked for disk size onlyKarel Zak2008-08-191-1/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: warn users about 2.2TB dos partition limitKarel Zak2008-08-191-0/+12
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* swapon: -a has to complain, fix leaksKarel Zak2008-08-191-15/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The "swapon -a" command (without "-e" option) has to complain always when LABEL or UUID does not exist. Test: # grep foo /etc/fstab LABEL=foo swap swap defaults 0 0 Old version: # swapon -a; echo $? 0 Fixed version: # swapon -a; echo $? swapon: cannot find the device for LABEL=foo 255 # swapon -a -e; echo $? 0 This version also fix two memory leaks. Signed-off-by: Karel Zak <kzak@redhat.com>
* hwclock: don't open /dev/rtc repeatedlyKarel Zak2008-08-181-22/+30
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: remove obsolete information from man pageKarel Zak2008-08-181-20/+10Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lscpu: regression testsCai Qian2008-08-141217-0/+2805
| | | | | | | | | This patch added regression tests for lscpu. It tests lscpu for 3 architecutres, i386, x86_64 and ia64, with data from 3 different machines each. Signed-off-by: Cai Qian <qcai@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: detect libvolume_id when mount(8) is compiledKarel Zak2008-08-141-3/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lscpu: --sysroot option and stable cache outputCai Qian2008-08-141-34/+60
| | | | | | | | | This patch added a --sysroot command-line option for testing purpose. It also sorted cache names, and displayed cache information in a sorted manner instead of randomly before. In addition, it had some other minor fixes. Signed-off-by: Cai Qian <qcai@redhat.com>
* docs: TODO updateKarel Zak2008-08-141-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* ionice: cleanup error messages, add NLS supportKarel Zak2008-08-141-25/+29
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* ionice: cleanup man pageKarel Zak2008-08-141-24/+17Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* scriptreplay: new implementation is out-of-syncKarel Zak2008-08-131-1/+4
| | | | | | | | | | | | | | | | | Reproduction steps: 1. Run "script -t 2>timing". 2. When the prompt comes up, hit return. 3. New prompt. Wait several seconds, then type "true" and hit return. 4. Repeat (3) as desired, then exit scripted shell. 5. Run "scriptreplay timing". You'll find on the replay that, rather than waiting several seconds between the prompt and true, the wait will actually occur after the first "t" of true. Reported-by: Micah Cowan <micah@cowan.name> Signed-off-by: Karel Zak <kzak@redhat.com>
* hwclock: read_hardware_clock_rtc() need to return error codesKarel Zak2008-08-131-3/+3
| | | | | | We shouldn't ignore RTC_RD_TIME/RTCGET error codes. Signed-off-by: Karel Zak <kzak@redhat.com>
* hwclock: delay loop in set_hardware_clock_exactKalev Soikonen2008-08-131-8/+12
| | | | | | | | | | | - Avoid delaying 1.5 seconds when 0.5 will do. - Guard for forward time resets as well. [kzak@redhat.com: - fix the "Delaying.." debug message - add comments] Signed-off-by: Kalev Soikonen <ksop@hot.ee> Signed-off-by: Karel Zak <kzak@redhat.com>
* hwclock: use time limit for synchronization busy waitKarel Zak2008-08-133-12/+14
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* hwclock: use carefully synchronize_to_clock_tick() return codesKarel Zak2008-08-131-3/+8
| | | | | | | | | | | | | | | | | * It seems that rtc-isl1208 0-006f: chip found, driver version 0.3 rtc-isl1208 0-006f: rtc core: registered rtc-isl1208 as rtc0 rtc-isl1208 0-006f: rtc power failure detected, please set clock. causes that hardware clock returns persistent time and synchronization is impossible. The hwclock(8) has to ignore this problem and allows to set clock anyway. * synchronize_to_clock_tick() shouldn't to print the "...got clock tick" debug message in case of failure. Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: add docs about utf8=0 for vfatKarel Zak2008-08-121-3/+4
| | | | | Addresses-Red-Hat-Bugzilla: #454354 Signed-off-by: Karel Zak <kzak@redhat.com>
* hwclock: remove x86_64-specific bogonDavid Brownell2008-08-121-1/+1
| | | | | | | | | | I was puzzled why "hwclock" wrongly reported my x86_64 sytem didn't support RTC update interrupts. Bogus #ifdef, that's why ... added by the 2.11y patch (from 2.11t). Probably this whole #ifdef should just vanish ... if the kernel rejects UIE_ON, the program ought to just cope with it. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
* build-sys: tgets is not in ncurses but in tinfoArkadiusz Miskiewicz2008-08-081-2/+2
| | | | | | | | ncurses library can be build with terminal related functions landing in separate libtinfo library. Check for ncurses function when testing ncurses library existence. Signed-off-by: Arkadiusz Miśkiewicz <arekm@maven.pl>
* sfdisk: print version should end with a newlineDenis ChengRq2008-08-081-1/+1
| | | | Signed-off-by: Denis ChengRq <crquan@gmail.com>
* hwclock: cleanup help output and man pageKarel Zak2008-08-062-65/+42Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* hwclock: unshadow a diagnostic printfKalev Soikonen2008-08-061-5/+3Star
| | | | | | | | | | - Bogus if test means one message is never produced. - Avoid needless passing of a global variable (debug). The --test option flag ought to be a global as well (and perhaps -n/--dry-run). Signed-off-by: Kalev Soikonen <ksop@hot.ee>
* rtcwake: cleanup return codesKarel Zak2008-08-061-14/+14
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* rtcwake: prefer RTC_WKALM_SET over RTC_ALM_SETGabriel Burt2008-08-061-18/+17Star
| | | | | | | | rtcwake: Prefer RTC_WKALM_SET over RTC_ALM_SET, fixing bug with not waking up with new RTCs. Also, return error if unable to set the alarm. Signed-off-by: Gabriel Burt <gburt@novell.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* script: don't flush input when starting scriptAndrew McGill2008-08-051-3/+3
| | | | | | | | script currently flushed the input buffer when starting up. This undocumented behaviour prevents typeahead when starting up (e.g. as part of .profile). Rather retain queued input. Don't discard queued output either. Signed-off-by: Andrew McGill <andrew@lunch.za.net>
* Fix dmesg.1 installationAlexey Gladkov2008-08-051-1/+1
| | | | Signed-off-by: Alexey Gladkov <legion@altlinux.org>
* losetup: looplist_* refactoring, remove scandir()Karel Zak2008-08-042-149/+154
| | | | | | | | | | | | | | | | | | | | | | | | | This patch replaces scandir-based implementation with readdir(). The readdir(3) is less expensive and more portable (to non-glibc environment). The patch also replaces sysfs-based solution with simpler /proc/partitions parsing. The /proc/partitions includes all used loop devices on all systems (include 2.4). This solution seems faster than scandir(/sys/block/) too. Summary, the losetup (with this patch) uses three methods to found a loop device: a) parse /proc/partitions to found already used loop devices (for loserup -a) b) stat(2) for all loop[0-7] devices (default number of loop devices). This is classic method from util-linux <= 2.13. This method is good enough for standard Linux machines with default number of loop devices. c) scan all /dev or /dev/loop/ for loop devices. This is useful for crazy people who need more than 8 loop devices. Signed-off-by: Karel Zak <kzak@redhat.com>
* use getpagesize()maximilian attems2008-07-305-9/+5Star
| | | | | | | | | | | | getpagesize() is said to be more portable than sysconf(_SC_PAGESIZE) to anything Linux. this patch helps klibc porting effort as the sysconf multiplex API is not supported there. also remove comment of the switch to sysconf in mkswap.c. Signed-off-by: maximilian attems <max@stro.at>