Sami Kerola
7346f2b61c
utmpdump: use inotify to when following file
...
Co-Author: Karel Zak <kzak@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-10 10:59:58 +02:00
Sami Kerola
e31926b443
utmpdump: fixes based on static analysis [cppcheck]
...
[utmpdump.c:82]: (style) The function 'unspace' is never used
[utmpdump.c:131]: (style) The scope of the variable 't' can be reduced
[utmpdump.c:167]: (warning) scanf without field width limits can crash with huge input data
[kzak@redhat.com: - don't use scanf field width limits for integers]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-10 08:56:22 +02:00
Karel Zak
657d9adb71
fix buffer overrun in some calls to sscanf
...
Reported-by: Sergei Antonov <saproj@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-09 22:26:27 +02:00
Sami Kerola
cd903a0eba
utmpdump: white space fix
...
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-09 18:04:37 +02:00
Sami Kerola
ea4ca239a5
docs: clean up utmpdump.1 manual
...
Align with Documentation/howto-man-page.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Conflicts:
login-utils/utmpdump.1
2012-07-09 18:01:41 +02:00
Karel Zak
641e3e2061
libblkid: cleanup _attribute__ usage
2012-07-09 17:26:15 +02:00
Karel Zak
0b781a1aa4
Merge branch 'master' of https://github.com/dankamongmen/util-linux
2012-07-09 17:17:59 +02:00
Björn Jacke
ea39af9a54
docs: mention the required mount options for journaled version 2 quota
2012-07-09 17:12:47 +02:00
Björn Jacke
7860d8f5da
docs: add quota mount option support description for ext2
2012-07-09 17:12:46 +02:00
Bernhard Voelker
4810de912a
utmpdump: document optional filename argument
...
Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
2012-07-09 17:11:00 +02:00
Bernhard Voelker
c370688f62
findmnt: fix typo in manpage
...
Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
2012-07-09 17:10:05 +02:00
Dave Reisner
fbd2620d4e
build-sys: ensure BUILD_CFDISK is always defined
...
This avoids an error when configuring without ncurses:
configure: error: conditional "BUILD_CFDISK" was never defined.
Usually this means the macro was only invoked conditionally.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-07-09 17:08:44 +02:00
Karel Zak
109c362f23
docs: remove unused config/texinfo.tex
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-09 17:03:19 +02:00
Bernhard Voelker
7007991f6f
docs: fix typos found by misspellings
...
The tool misspellings (https://github.com/lyda/misspell-check )
detected several typos. Command used:
$ git ls-files | grep -v ^po/ | misspellings -f -
* Documentation/releases/v2.18-ReleaseNotes: Fix typo in news entry.
* NEWS: Likewise.
* config/texinfo.tex: Fix typo in comments.
* libmount/src/context.c: Fix typo in comment.
* libmount/src/fs.c: Likewise.
* login-utils/login.c: Likewise.
* login-utils.su.1: Fix typo in man page.
* sys-utils/chcpu.c: Fix typo in error message.
Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
2012-07-09 16:56:30 +02:00
Karel Zak
ac11086af2
build-sys: add -Wredundant-decls
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-09 16:53:13 +02:00
Karel Zak
7bce71a3f9
build-sys: support separate libintl
...
Addresses: https://github.com/karelzak/util-linux/pull/13
Reported-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-09 16:44:25 +02:00
Karel Zak
dcdb349be7
build-sys: always use default $(LDADD)
...
The global variable $(LDADD) is always used if program_LDADD is
not specified. Let's use $LDADD everywhere to avoid exceptions for
people who need to specify global $LDADD.
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-09 16:23:51 +02:00
nick black
ffab21e128
use proper printf format spec %lu
2012-07-07 11:42:35 -04:00
nick black
330ff7edc4
use memcpy() to cope with possible misalignment
2012-07-07 11:42:17 -04:00
nick black
d8a5b55012
properly check for ansi c99 vsnprint truncation
2012-07-07 11:41:15 -04:00
nick black
28a47f13d9
use GCC format __attribute__ on sprinf
2012-07-07 11:40:45 -04:00
Karel Zak
839be2ba6b
hwclock: don't set time for --systz
...
Not sure why, but the current --systz uses non-NULL timeval for
settimeofday(). It means that build-in kernel warp clock mechanism is
not used and the system time is always modified.
The built-in kernel implementation allows to move the clock by
timezone only for very first settimeofday() call.
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-04 13:43:51 +02:00
Karel Zak
34f4d96163
utmpdump: use xalloc.h, minor coding style changes
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-29 17:34:12 +02:00
Karel Zak
c8a6af07e7
utmpdump: cleanup usage()
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-29 17:27:40 +02:00
Karel Zak
9e15c93d76
utmpdump: add long options
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-29 17:22:42 +02:00
Karel Zak
704bd903ec
utmpdump: use err.h stuff
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-29 17:09:51 +02:00
Karel Zak
23031b9904
utmpdump: add NLS and closestream support
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-29 16:59:32 +02:00
Karel Zak
a9eee87090
utmpdump: remove dead code
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-29 16:56:04 +02:00
Karel Zak
b89fc9151f
utmpdump: remove libc5 support
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-29 16:52:30 +02:00
Karel Zak
fa9baa80e8
utmpdump: cleanup comments, funcs definition lines
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-29 16:43:37 +02:00
Karel Zak
78d5ceacb1
utmpdump: new command, merge from sysvinit
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-29 16:34:46 +02:00
Karel Zak
7d8f4e0c4b
findmnt: add TID column
...
just in case we read from more mountinfo files.
For example get mountpoint from the current namespace which is invisible
for initd (PID=1):
# unsahre -m bash
# mount /dev/sdb /mnt/test
# echo $$
30070
# findmnt -n -o TARGET,TID,SOURCE --task 1 --task $$ | \
sort -u --key=1,1 | awk ' ($2 != 1) { print $0 }'
/mnt/test 30070 /dev/sdb
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-28 15:46:38 +02:00
Karel Zak
f7f29b5640
libmount: save task ID for mountinfo tiles
...
Add new function mnt_fs_get_tid() to get task ID for the given filesystem.
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-28 15:40:16 +02:00
Karel Zak
c7fcc8307d
findmnt: add --task <tid> option
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-28 13:51:34 +02:00
Karel Zak
aca72ac2f9
findmnt: don't use tree-like output if more -F options specified
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-28 13:20:31 +02:00
Dave Reisner
8b8cd87b21
findmnt: add FSROOT column
...
Provide this separately in an unambiguous format, mainly to avoid the
need for scripts to parse the source of a btrfs subvol or bind mount.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-06-28 12:59:57 +02:00
Karel Zak
59114ba325
swapon: fix typo
...
Reported-by: Manan Tuli <mt_void@yahoo.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-27 14:04:03 +02:00
Karel Zak
cdecbd2e73
docs: add note about non-recursive build-sys
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-27 11:27:36 +02:00
Karel Zak
44e0b7d9ee
build-sys: add sd-daemon.h to Makemodule.am
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 23:03:22 +02:00
Karel Zak
8d398470c0
build-sys: add pager.h to Makemodule.am
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:57:45 +02:00
Karel Zak
3274ee60ce
build-sys: fix swaplabel
...
Reported-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:50:54 +02:00
Karel Zak
b36a2f2d47
build-sys: create static uuid_generate_*.3 files
...
It seems more simple to create small three files with man page links
than generate the files on the fly.
Note that the libuuid/man directory is not in builddir by default so
you have to create proper directory and then create the man pages...
too complex task for this three tiny files.
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:50:54 +02:00
Karel Zak
31a938ac38
build-sys: enable libmount and libblkid docs
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:50:54 +02:00
Karel Zak
f38e5ff355
build-sys: cleanup .gitignore files
...
- move all binaries to top-level .gitignore
- remove unnecessary */.gitignore files
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:50:54 +02:00
Karel Zak
d77ab74af7
build-sys: convert lib/ to libcommon.la
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:50:53 +02:00
Karel Zak
fb55280aa6
build-sys: remove include-Makefile.am
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:50:53 +02:00
Karel Zak
50ea679509
build-sys: rename fdisk -> fdisks/, convert to module
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:50:53 +02:00
Karel Zak
ac73480a34
build-sys: convert tests/ to module
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:50:53 +02:00
Karel Zak
957bab4e91
build-sys: move partx to disk-utils/
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:50:18 +02:00
Karel Zak
54dbc8cf69
build-sys: convert disk-utils/ to module
...
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:48:23 +02:00