summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* docs: align colcrt.1 with howto-man-page.txtSami Kerola2011-10-031-66/+53Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: align col.1 with howto-man-page.txtSami Kerola2011-10-031-83/+97
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: align wall.1 with howto-man-page.txtSami Kerola2011-10-031-47/+45Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: align scriptreplay.1 with howto-man-page.txtSami Kerola2011-10-031-164/+31Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: align script.1 with howto-man-page.txtSami Kerola2011-10-031-98/+91Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: align renice.1 with howto-man-page.txtSami Kerola2011-10-031-104/+82Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: align logger.1 with howto-man-page.txtSami Kerola2011-10-031-82/+94
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: align vipw.8 with howto-man-page.txtSami Kerola2011-10-031-39/+37Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: fix return value table in fsck.8Sami Kerola2011-10-031-21/+37
| | | | | | Commint also has few alignments with howto-man-page.txt Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: chcpu and readprofile are sysadmin utilsSami Kerola2011-09-293-4/+3Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add loopdev libmount testKarel Zak2011-09-291-0/+12
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: support {offset,sizelimit}= foor loopdevsKarel Zak2011-09-291-18/+51
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add function to parse offsets/sizesKarel Zak2011-09-293-11/+25
|
* ipcrm: fix wrong subject in error messages for -m, -q, -s id optionsFrancesco Cosoleto2011-09-291-15/+8Star
| | | | | | This makes error messages print 'id' instead of 'key' using id options. Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* ipcrm: use ternary operator in "(key|id) failed" messageFrancesco Cosoleto2011-09-291-3/+1Star
| | | | Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* ipcrm: add static keyword to some functionsFrancesco Cosoleto2011-09-291-3/+3
| | | | Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* misc: use %m in format string instead of %s and strerror(errno)Petr Uzel2011-09-2721-79/+55Star
| | | | Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* docs: update TODOPetr Uzel2011-09-271-4/+0Star
| | | | | | TODO items already done by Sami Kerola Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* sfdisk: warn if partition exceeds partition table limitsPetr Uzel2011-09-271-3/+41
| | | | | | | | | | | Warn the user if the partition to be created exceeds limits imposed by the DOS partition table, which is: * partition has to start on sector < 2^32 * partition size has to be < 2^32 sectors For 512-byte logical sector size, these limits are ~2.2 TiB. Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* sfdisk: use unsigned long long to internally represent sector numberPetr Uzel2011-09-271-29/+29
| | | | | | | | | | Unsigned long is only 4 bytes long on i586, which is not enough to represent sector number on todays large disks. Use unsigned long long, which is 8 bytes long, to store the sector numbers internally, so that we could later make some sanity checks and warn the user if the sector numbers exceed the limits imposed by DOS partition table format. Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* sfdisk: introduce get_ull() functionPetr Uzel2011-09-271-0/+38
| | | | Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* sfdisk: get_disksize() returns long longPetr Uzel2011-09-271-3/+3
| | | | | | | unsigned long is 4 bytes long on i586, which is not enough for big HDD's with 512B sectors. Use unsigned long long, which is 8 bytes. Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* sfdisk: make the cylinder boundary check less fatalPetr Uzel2011-09-271-2/+4
| | | | | | | If the specified format is not cylinders, make the cylinder boundary check only print a warning and proceed anyways. Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* sfdisk: fix weird indentation in msdos_partition()Petr Uzel2011-09-271-6/+5Star
| | | | Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* sfdisk: file descriptor is of int typePetr Uzel2011-09-271-1/+1
| | | | Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* blkid: fix unfinished sentence for -l option in blkid.8Dave Reisner2011-09-271-1/+1
| | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* uuidd: Add missing break to option case statementEric Sandeen2011-09-271-0/+1
| | | | | | | | Specifying the "-n" option to uuidd would incorrectly fall through to the "-p" case, and assign that number to the pidfile_path. Signed-off-by: Eric Sandeen <sandeen@redhat.com>
* libmount: fix use of logical '&&' with constant operandFrancesco Cosoleto2011-09-272-2/+2
| | | | | | Found by clang. Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* lib,loopdev: fix use of logical '&&' with constant operandFrancesco Cosoleto2011-09-271-2/+2
| | | | | | Found by clang. Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* flock: make flock(1) work on NFSv4Petr Uzel2011-09-271-2/+5
| | | | | | | | | | | | | | To pleace an exclusive lock on a file, NFSv4 requires the file to be opened RW because of the emulation of flock() by fcntl(): http://www.spinics.net/lists/linux-nfs/msg18502.html So instead of O_RDONLY, open the file in O_RDWR if access() indicates it is possible (unless shared lock is requested). From: Michal Kubecek <mkubecek@suse.cz> Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* build-sys: add path.h to Makefile.amKarel Zak2011-09-271-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lscpu: stricter command line parsingHeiko Carstens2011-09-271-0/+4
| | | | | | | Disallow superfluous commands for lscpu like e.g. "lscpu bla" and let it fail print the help text instead. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
* lscpu: add --offline optionHeiko Carstens2011-09-272-15/+28
| | | | | | | | | | | | | | Implement "--offline" option which only prints offline cpus. As a side effect we can get rid of the internal "allcpus" flag, since if we want to print informations for online and offline cpus we simply set both flags. When reading sysfs attributes of cpus this is now done for all cpus, since e.g. the topology informations of the online cpus may influence the topology informations of the offline cpus. This mainly because online cpus may contain masks which include offline cpus while offline cpus have a missing topology directory. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
* lscpu: fix -e outputHeiko Carstens2011-09-271-3/+3
| | | | | | | | | The modifier mod->allcpus must be set earlier and also must be used earlier. The current code only reads sysfs attributes from online cpus but skips offline cpus. So initialize mod->allcpus earlier. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
* chcpu: provide better user feedbackHeiko Carstens2011-09-271-11/+40
| | | | | | | | | | Instead of printing error messages like "I/O resource busy" which are supplied by strerror, give better feedback if the reason of failure is known. E.g. taking the last cpu offline cannot succeed, therefore print a message that gives this "hint". Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
* lib,path: use write_all()Heiko Carstens2011-09-271-1/+2
| | | | | | | | | From: Heiko Carstens <heiko.carstens@de.ibm.com> Since write() doesn't necessarily write the complete buffer with one call we better use write_all() which takes care of this. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
* chcpu: convert to use lib/path.cHeiko Carstens2011-09-274-58/+46Star
| | | | | | | Use the common path access functions. In order to simplify chcpu also implement and use path_writestr() which writes a string to the path specified. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
* lib,path: move path access functions from lscpu into lib/path.cHeiko Carstens2011-09-274-177/+231
| | | | | | | A couple of these functions already have been copied to chcpu.c, so it makes sense to move these functions into an own file. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
* setarch: minor changes to usage()Karel Zak2011-09-271-6/+9
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* pivot_root: minor changes to usage()Karel Zak2011-09-271-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* ipcs: minor changes to usage()Karel Zak2011-09-271-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* ctrlaltdel: minor changes to usage()Karel Zak2011-09-271-1/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* arch: minor changes to usage()Karel Zak2011-09-271-3/+1Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'sys-utils' of https://github.com/kerolasa/lelux-utiliteetitKarel Zak2011-09-2717-573/+841
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'sys-utils' of https://github.com/kerolasa/lelux-utiliteetit: (29 commits) docs: add non-return function and if shorthand tips build-sys: fixes to USAGE_* macros ipcrm: check IPC syscalls ipcrm: add --verbose option ipcmk: allow high speed ipc creation ipcrm: add --all option docs: add long options to ipcs.1 man page docs: add long options to ipcrm.1 man page docs: add long options to ipcmk.1 man page docs: add --version to setarch.8 docs: mention long options in ctrlaltdel.8 ctrlaltdel: add version & help options docs: mention long options in pivot_root.8 pivot_root: add version & help option ipcs: comment & white space clean up ipcs: include-what-you-use header check ipcs: add long options ipcrm: include-what-you-use header check ipcrm: refactor new and old main to share code ipcrm: exit if unknown error occurs ...
| * docs: add non-return function and if shorthand tipsSami Kerola2011-09-171-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | Non-return functions should not be combined with `else' clause. The if shorthands `var = e ? t : f;' need to fit to single line, and if that does not look good use normal "if else" syntax. Both tips are mentioned in email bellow. http://www.spinics.net/lists/util-linux-ng/msg05152.html Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * build-sys: fixes to USAGE_* macrosSami Kerola2011-09-178-18/+16Star
| | | | | | | | | | | | | | | | | | | | | | The USAGE_BEGIN_TAIL is removed as unnecessary. In between command specific options and --help & --version USAGE_SEPARATOR is inserted. For now the separator is empty line. The USAGE_MAN_TAIL is changed to take an argument. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * ipcrm: check IPC syscallsDavidlohr Bueso2011-09-171-22/+24
| | | | | | | | | | | | | | | | | | | | It's not enough to check errno for errors as the variable is not reset, we also need to check the last syscall return value to verify a problem. This addresses bogus msgqueue errors when deleting keys. Signed-off-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * ipcrm: add --verbose optionSami Kerola2011-09-171-1/+14
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * ipcmk: allow high speed ipc creationSami Kerola2011-09-171-2/+4
| | | | | | | | | | | | | | | | | | This commit will allow user to create quickly plenty of ipc resources. Earlier the line bellow gave no satisfaction. for i in $(seq 0 42); do ipcmk -Q; done Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * ipcrm: add --all optionSami Kerola2011-09-172-3/+97
| | | | | | | | | | | | | | | | An --all option will remove all ipc entries. The option takes optional resource argument, which limits the removal to be applied only the given resource entries. Signed-off-by: Sami Kerola <kerolasa@iki.fi>