summaryrefslogtreecommitdiffstats
path: root/sys-utils
Commit message (Collapse)AuthorAgeFilesLines
* lscpu: fix cpuid code on x86/PICMike Frysinger2009-05-111-3/+13
| | | | | | | | | | | | If we build lscpu as PIE, we currently get a build failure: lscpu.c: In function 'main': lscpu.c:333: error: can't find a register in class 'BREG' while reloading 'asm' lscpu.c:333: error: 'asm' operand has impossible constraints make[2]: *** [lscpu.o] Error 1 So we need a little bit of register shuffling to keep gcc happy. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* flock: add NLS support, remove tailing white-spacesKarel Zak2009-03-111-18/+24
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* flock: fix printf format error in usage()Karel Zak2009-03-111-5/+5
| | | | | | | flock.c: In function ‘usage’: flock.c:75: warning: too few arguments for format Signed-off-by: Karel Zak <kzak@redhat.com>
* flockc: segfaults when file name is not givenKarel Zak2009-03-111-1/+8
| | | | | | | | | | | | | | | | $ flock -s Segmentation fault ltrace: __libc_start_main(0x8048870, 2, 0xbfe9f404, 0x8049070, 0x8049060 <unfinished ...> getopt_long(2, 0xbfe9f404, "+sexnouw:hV?", 0x80494e0, 0xbfe9f354) = 115 getopt_long(2, 0xbfe9f404, "+sexnouw:hV?", 0x80494e0, 0xbfe9f354) = -1 strtol(0, 0xbfe9f34c, 10, 0x80494e0, 0xbfe9f354 <unfinished ...> --- SIGSEGV (Segmentation fault) --- +++ killed by SIGSEGV +++ Addresses-Red-Had-Bugzilla: #489672 Signed-off-by: Karel Zak <kzak@redhat.com>
* renice: add -n option for compatibility with POSIXKarel Zak2009-03-092-4/+15
| | | | | | The -n option is required by POSIX.1-200x. Signed-off-by: Karel Zak <kzak@redhat.com>
* rtcwake: add mising .RE to the man pageKarel Zak2009-01-291-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* rtcwake: explain supported modes in rtcwake.8Karel Zak2009-01-261-3/+26
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* rtcwake: support not suspendingMarco d'Itri2009-01-262-6/+10
| | | | | | | | | | People usually want to use pm-utils to suspend the system instead of the raw kernel interface, so I added an option to just exit after configuring the wakeup time. Actually I think that all the suspend code should be removed from rtcwake, since it does not really belong there. Signed-off-by: Marco d'Itri <md@linux.it>
* dmesg: Add -r (raw) option.Adam Jackson2009-01-162-3/+10
| | | | | | | Useful for debugging which kernel messages are ruining your quiet bootup. Signed-off-by: Adam Jackson <ajax@redhat.com>
* flock: Allow lock directoryAlexey Gladkov2008-12-032-4/+11
| | | | | | | | | | With this patch, you can lock directory. Additionally, lockfile opens with O_NOCTTY. Try to open file with O_CREAT flag first, and without it if open fails with EISDIR. Suggested by H. Peter Anvin. Signed-off-by: Alexey Gladkov <legion@altlinux.org>
* rdev: cleanup includesKarel Zak2008-11-261-10/+8Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* pivot_root: clean upKarel Zak2008-11-191-15/+16
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: move pivot_root(8) to sys-utilsKarel Zak2008-11-194-14/+120
| | | | | | | | This patch moves pivot_root.{8,c) from mount/ to sys-utils/ directory. There is not ant relation between pivot_root source code and the rest of code in the mount. Signed-off-by: Karel Zak <kzak@redhat.com>
* lscpu: return EXIT_SUCCESS at the endMatthias Koenig2008-10-221-1/+1
| | | | Signed-off-by: Matthias Koenig <mkoenig@suse.de>
* lscpu: add Hypervisor detectionKarel Zak2008-10-222-20/+166
| | | | | | | | | | | | | | | This patch adds two new fields: * "Hypervisor vendor" -- based on CPUID and hypervisor specific PCI devices. lscpu(1) supports KVM, XEN, Microsoft HV now. * "Virtualization type" - "none" = Xen dom0 - "full" = full virtualization (KVM, Xen, ...) - "para" = Xen paravirtualization Co-Author: Ky Srinivasan <ksrinivasan@novell.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* ipcs: fix exit codes, remove tailing white-spacesKarel Zak2008-10-071-76/+61Star
| | | | | Addresses-Red-Hat-Bugzilla: #465911 Signed-off-by: Karel Zak <kzak@redhat.com>
* readprofile: several strings without gettext callsPedro Ribeiro2008-10-031-3/+3
| | | | | Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* ipcmk: add NLS supportKarel Zak2008-09-101-10/+16
| | | | 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>
* 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>
* 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>
* 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>
* Fix dmesg.1 installationAlexey Gladkov2008-08-051-1/+1
| | | | Signed-off-by: Alexey Gladkov <legion@altlinux.org>
* use getpagesize()maximilian attems2008-07-301-1/+1
| | | | | | | | | | | | 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>
* remove CVS keywordsmaximilian attems2008-07-283-3/+1Star
| | | | | | | | this patch removes old CVS keywords from comments. mount(8) works for newer Linux then 0.99 ;) Signed-off-by: maximilian attems <max@stro.at>
* dmesg: nuke old glibc 5 supportmaximilian attems2008-07-281-13/+2Star
| | | | | | | | | | | | dmesg.c:42: error: expected declaration specifiers or ‘...’ before ‘klogctl’ dmesg.c:42: error: expected declaration specifiers or ‘...’ before ‘type’ dmesg.c:42: error: expected declaration specifiers or ‘...’ before ‘b’ dmesg.c:42: error: expected declaration specifiers or ‘...’ before ‘len’ without belows compat section dmesg just compiles fine against klibc. as bonus reorder the includes. Signed-off-by: maximilian attems <max@stro.at>
* ldattach: don't compile for non-linux systemsSamuel Thibault2008-07-281-4/+4
| | | | | | | | There is just ldattach which doesn't compile because line disciplines are not implemented that way on the Hurd. Is TIOCSETD any kind of standard? Else I guess the patch below would be fine. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* build-sys: cleanup sys-utils/Makefile.amKarel Zak2008-07-221-19/+11Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lscpu: new commandCai Qian2008-07-184-2/+561
| | | | | | | | | | | | | | | Add a lscpu(1) utility program. [kzak@redhat.com: - indent by linux-2.6/scripts/Lindent - add lscpu.{c,1} to sys-utils/Makefile.am - add NLS suport - complete code refactoring ] Co-Author: Karel Zak <kzak@redhat.com> Signed-off-by: Cai Qian <qcai@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* rtcwake: fix the default mode to "standby"Paulius Zaleckas2008-06-091-1/+1
| | | | | | | | Writing "suspend" to /sys/power/state does nothing. Even "man rtcwake" says that default should be "standby" :) Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt> Signed-off-by: Karel Zak <kzak@redhat.com>
* setarch: add fallback for linux/personalityKarel Zak2008-05-131-0/+32
| | | | | | | | | | | | | | setarch.c:248: error: 'ADDR_NO_RANDOMIZE' undeclared (first use in this function) setarch.c:248: error: (Each undeclared identifier is reported only once setarch.c:248: error: for each function it appears in.) setarch.c:251: error: 'FDPIC_FUNCPTRS' undeclared (first use in this function) setarch.c:257: error: 'ADDR_COMPAT_LAYOUT' undeclared (first use in this function) setarch.c:260: error: 'READ_IMPLIES_EXEC' undeclared (first use in this function) Linux gzp1 2.4.36.1-gzp1 #1 SMP Tue Feb 19 10:23:48 CET 2008 i686 GNU/Linux Reported-By: Gabor Z. Papp <gzp@papp.hu> Signed-off-by: Karel Zak <kzak@redhat.com>
* setarch: provide backwards compatibilityDmitry V. Levin2008-04-161-1/+1
| | | | | | | | | | | | | | | | | | | | | The getopt_long(3) use introduced by commit 8df90dec2bfd8c876ddd4cea010f40550d4e24aa broke backwards compatibility. Old behavior: $ i386 uname -m i686 New behavior: $ i386 uname -m i386: invalid option -- m Linux Traditional method to fix it is to disable program arguments reordering by prefixing getopt_long's optstring with '+' character. Signed-off-by: Dmitry V. Levin <ldv@altlinux.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: update .gitignore filesKarel Zak2008-04-141-1/+23
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: ignore a bunch of generated files, mostly binariesJames Youngman2008-04-141-0/+16
| | | | | Signed-off-by: James Youngman <jay@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* ldattach: use glibc termiosKarel Zak2008-04-091-110/+36Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* ldattach: add NLS supportKarel Zak2008-03-251-14/+22
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* ldattach: new commandTilman Schmidt2008-03-103-2/+459
| | | | | | Add an ldattach(8) utility program similar to the one in OpenBSD. Signed-off-by: Tilman Schmidt <tilman@imap.cc>
* 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>
* 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>
* 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>
* 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: 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-171-5/+5
| | | | Signed-off-by: Stepan Kasal <skasal@redhat.com>
* setarch: add missing alpha subarchsOliver Falk2007-12-031-0/+4
| | | | | Signed-off-by: Oliver Falk <oliver@linux-kernel.at> Signed-off-by: Karel Zak <kzak@redhat.com>