summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* findmnt: improve --df outputKarel Zak2012-03-202-8/+32
| | | | | | | | * don't print pseudo-filesystems (except tmpfs) * add --all to disable built-in filters * don't overwrite --df --output=<list> with default columns Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add configfs to pseudofs listKarel Zak2012-03-201-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/tt: work more sensitive with large columnsKarel Zak2012-03-201-1/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* findmnt: use xasprintf()Karel Zak2012-03-201-5/+3Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* include/ttyutils.h: add include guardsDave Reisner2012-03-201-0/+4
| | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* findmnt: add -D, --df option to imitate df(1)Dave Reisner2012-03-202-2/+21
| | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* tunelp: remove old, now unneeded headerDave Reisner2012-03-201-1/+0Star
| | | | | | malloc and friends are provided by stdlib.h. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* findmnt: add FS size, avail, used, and use% columnsDave Reisner2012-03-202-1/+57
| | | | | | | Provide display of filesystem attributes from statvfs(3). These are all displayed in human readable format. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* checkxalloc: nudge regex, fix newfound instancesDave Reisner2012-03-204-16/+6Star
| | | | | | | | | | | | | | | | Using the -w flag with grep actually fought against us here, and hid some instances where xalloc functions weren't used. Discard it in favor of an explicit word boundary as a prefix to the function name, and extend our requirements on the trailing side of the pattern. This also fixes the few new instances that were overlooked because of the regex's deficiency. [kzak@redhat.com: - fix also newfound in findmnt - remove unnecessary checks after xallocs] Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* findmnt: add -P, --pairs to the man pageBill Pemberton2012-03-201-0/+2
| | | | Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
* setsid: cleanup usage()Karel Zak2012-03-201-8/+11
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* setsid: add option "-c" to set the controlling terminalHarald Hoyer2012-03-202-2/+20
| | | | | | [kzak@redhat.com: - use STDIN_FILENO rather than 0] Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: make the crosscompile path for scanf_cv_alloc_modifier cleverSebastian Andrzej Siewior2012-03-201-1/+17
| | | | | | | | | | | | | | | | | | | | | | | My earlier assumption was that scanf_cv_alloc_modifier is unused. This is not true as pointed out by Karel since it used befoe checking for libmount. Argh. So instead saying no I add a test to check for glibc >= 2.7 which provides %m. As of uClibc v0.9.32-rc3 the situation looks the following: | git grep _M_SPEC__ |libc/stdio/_vfprintf.c:/* #define __UCLIBC_HAS_PRINTF_M_SPEC__ */ |libc/stdio/_vfprintf.c:#ifdef __UCLIBC_HAS_PRINTF_M_SPEC__ |libc/stdio/_vfprintf.c:# ifdef __UCLIBC_HAS_PRINTF_M_SPEC__ |libc/stdio/_vfprintf.c:# endif /* __UCLIBC_HAS_PRINTF_M_SPEC__ */ |libc/stdio/_vfprintf.c:#ifdef __UCLIBC_HAS_PRINTF_M_SPEC__ |libc/stdio/_vfprintf.c:#ifdef __UCLIBC_HAS_PRINTF_M_SPEC__ |libc/stdio/_vfprintf.c:#ifdef __UCLIBC_HAS_PRINTF_M_SPEC__ |libc/stdio/_vfprintf.c:#ifdef __UCLIBC_HAS_PRINTF_M_SPEC__ |libc/stdio/old_vfprintf.c:#ifdef __UCLIBC_HAS_PRINTF_M_SPEC__ |libc/stdio/perror.c:#ifdef __UCLIBC_HAS_PRINTF_M_SPEC__ And other libc user have to bring their own stuff. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
* mount: (new) add missing xalloc.hKarel Zak2012-03-201-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fileutils: differentiate xmkstemp and xfmkstempSami Kerola2012-03-185-18/+29
| | | | | | | | | | | | Let developer to choose, case by case, what sort of return value is best in her code. The xmkstemp() is for users who want file descriptor as return value of the function, xfmkstemp() will return FILE pointer. Proposed-By: Karel Zak <kzak@redhat.com> CC: Davidlohr Bueso <dave@gnu.org> Reference: http://marc.info/?l=util-linux-ng&m=133129570124003&w=2 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* lslocks: use xasprintf for safe allocationSami Kerola2012-03-181-9/+9
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tools: add asprintf to checkxalloc scriptSami Kerola2012-03-181-1/+1
| | | | | Reported-By: Dave Reisner <d@falconindy.com> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* build-sys: fix chkdupexe regressionSami Kerola2012-03-181-0/+3
| | | | | | | Commit 2897f50a6a6d1aab653c7017f7542d26ac2a8a0b resulted breaking shebang substitution for chkdupexe. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* xalloc: use xasprintf in all filesSami Kerola2012-03-189-23/+25
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* include: add asprintf wrapperSami Kerola2012-03-181-0/+11
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: TODO removal, ldattach usage is doneSami Kerola2012-03-181-5/+0Star
| | | | | | Done at Nov 2011. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* pathnames: clean up various user database pathsSami Kerola2012-03-184-31/+5Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* vipw: use xmkstemp() and lckpwdf()Sami Kerola2012-03-184-94/+49Star
| | | | | | Get rid private locking schema and use libc instead. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* setpwnam: use xmkstemp() and lckpwdf()Sami Kerola2012-03-182-35/+20Star
| | | | | | Get rid private locking schema and use libc instead. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* wall: use xmkstemp for temporary fileSami Kerola2012-03-182-15/+6Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* lib: add fileutils function collectionSami Kerola2012-03-184-2/+66
| | | | | | | | | The fileutils contains xmkstemp function will create temporary file safe and reusable manner. Reference: http://www.dwheeler.com/secure-programs/Secure-Programs-HOWTO.html#TEMPORARY-FILES CC: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* chsh: use pathnames.h for pathsSami Kerola2012-03-182-11/+12
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* chfn: use pathnames.h for pathsSami Kerola2012-03-181-2/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: TODO removal, rpmatch task is doneSami Kerola2012-03-181-5/+0Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* vipw: use rpmatch to yes/no questionSami Kerola2012-03-181-2/+3
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* mesg: use rpmatch to yes/no questionSami Kerola2012-03-181-5/+9
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* sfdisk: use rpmatch to yes/no questionSami Kerola2012-03-181-10/+9Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: TODO removal, login-utils error printingSami Kerola2012-03-181-1/+0Star
| | | | | | Error printing was fixed at November 2010. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: add deprecation commentsSami Kerola2012-03-186-0/+54
| | | | | | | Markup deprecation to command header to avoid people wasting time in fixing these utilities. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* login: add USER to initial environmentDave Reisner2012-03-132-2/+4
| | | | | | | | | | Add this value from the passwd struct to the environment, as it is expected by shells, and generally useful to users. This also clarifies a poorly worded sentence in the vicinity of the manpage change. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* lsblk: RQ-SIZE is part of the --topology output (man page bugfix)Dave Reisner2012-03-131-1/+1
| | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* losetup: Fix setting of sizelimit on new loop devicesDaniel Drake2012-03-131-1/+1
| | | | | | | | "losetup --offset 10 --sizelimit 20 foo.img" was producing a loop device with offset 20 and no sizelimit. Looks like a typo, fix it. Signed-off-by: Daniel Drake <dsd@laptop.org>
* build-sys: add --diable-sulogin (enabled by default)Karel Zak2012-03-122-11/+24
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: note sulogin in configure helpKarel Zak2012-03-121-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* sulogin: share vc initialization with agettyKarel Zak2012-03-122-0/+34
| | | | | | | | | | The virtual console initialization has been removed by Dave's commit 5ec4a799c2a8d25c4c8260772363392f805b0a54. We already use this tty initialization for agetty, so reuse the same code. Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: move vc initialization to ttyutils.hKarel Zak2012-03-122-63/+80
| | | | | | ... to make the code usable for sulogin. Signed-off-by: Karel Zak <kzak@redhat.com>
* sulogin: add note about port to util-linux to the man pageKarel Zak2012-03-122-2/+9
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* sulogin: fix selinux buildKarel Zak2012-03-122-1/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* sulogin: parse timeout more carefullyKarel Zak2012-03-122-2/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* sulogin: initialize nls stuffKarel Zak2012-03-121-1/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* sulogin: check chdir and getcwd return values [-Wunused-result]Karel Zak2012-03-121-5/+13
| | | | | | | | | | sulogin.c: In function ‘sushell’: sulogin.c:338:7: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result [-Wunused-result] sulogin.c:359:8: warning: ignoring return value of ‘getcwd’, declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: Karel Zak <kzak@redhat.com>
* sulogin: add long optionsKarel Zak2012-03-122-22/+42
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* sulogin: use EXIT_*Karel Zak2012-03-121-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* sulogin: use err.h stuffKarel Zak2012-03-121-13/+9Star
| | | | | | and print "Login incorrect" to stderr like login(1). Signed-off-by: Karel Zak <kzak@redhat.com>
* sulogin: replace perror() with warx()Karel Zak2012-03-121-9/+9
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>