Commit Graph

642 Commits

Author SHA1 Message Date
Milan Broz c57dca6877 findmnt: support -o +<attr> for adding attribute to output fields.
Signed-off-by: Milan Broz <mbroz@redhat.com>
2012-07-27 09:56:54 +02:00
Milan Broz 43bca82786 lsblk: support -o +<attr> for adding attribute to output fields.
Signed-off-by: Milan Broz <mbroz@redhat.com>
2012-07-26 16:37:03 +02:00
Sami Kerola 2cd5bc5a40 ddate: russian manual missing from package
This manpage causes more trouble than its worth.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-26 13:51:36 +02:00
Karel Zak af842d142e whereis: fix shadow declaration
misc-utils/whereis.c:191:7: warning: declaration of 'dirp' shadows a global declaration [-Wshadow]
misc-utils/whereis.c:134:42: warning: shadowed declaration is here [-Wshadow]

Reported-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-26 13:27:06 +02:00
Sami Kerola e35c4a12e1 lslocks: fix shadow declaration
misc-utils/lslocks.c:157:49: warning: declaration of 'pid' shadows a global declaration [-Wshadow]
misc-utils/lslocks.c:80:14: warning: shadowed declaration is here [-Wshadow]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-26 13:18:35 +02:00
Karel Zak 980358f1ef lsblk: add not about unstable default output
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-26 11:44:59 +02:00
Sami Kerola f5ee44b17a blkid: fix shadow declaration
misc-utils/blkid.c:402:15: warning: declaration of 'usage' shadows a global declaration [-Wshadow]
misc-utils/blkid.c:63:13: warning: shadowed declaration is here [-Wshadow]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-26 11:10:02 +02:00
Milan Broz 150db7a956 lsblk: add read-ahead column.
Signed-off-by: Milan Broz <mbroz@redhat.com>
2012-07-26 10:55:05 +02:00
Karel Zak abb7b98ca3 wipefs: use err_exclusive_options()
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-26 09:24:50 +02:00
Karel Zak 98f2dc7a2b lsblk: use err_exclusive_options()
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-26 09:24:36 +02:00
Karel Zak f1622b5705 findmnt: use err_exclusive_options()
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-26 09:24:21 +02:00
Karel Zak a8e458b971 blkid: use err_exclusive_options()
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-26 09:23:58 +02:00
Karel Zak 9e9bceeb50 lsblk: fix dm_name usage
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-25 18:04:10 +02:00
Karel Zak eabfd72f30 kill: fix compiler warning [-Wmissing-prototypes]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-16 18:36:27 +02:00
Karel Zak c642a6aaae Merge branch '2012wk28'
* 2012wk28:
  translation: unify file open error messages
  translation: unify stat error messages
  utmpdump: use help and version output macros
  su: align with howto-usage-function
  fdisk: make if clause easier to read
  look: remove extra semicolon
  utmpdump: remove unused variable
  swapon: remove unused variables
  lib/loopdev: minor bug fix: add missing semicolon
  lib/pager: minor compiler warning fixes
  libblkid: remove duplicate entries in symbols
2012-07-16 18:19:08 +02:00
Sami Kerola 289dcc9023 translation: unify file open error messages
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-16 18:18:22 +02:00
Sami Kerola add1b8afd0 translation: unify stat error messages
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-16 18:18:22 +02:00
Sami Kerola fad05c68e6 look: remove extra semicolon
The both macro SKIP_PAST_NEWLINE and location where macro is used will
not need semicolon at the end of line.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-16 18:18:21 +02:00
Ville Skyttä ddfc5ed6f2 docs: man page syntax fixes
Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
2012-07-16 18:09:21 +02:00
Karel Zak 815427c72e build-sys: add missing files
Reported-by: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-11 18:00:09 +02:00
Sami Kerola 11935cd3fc uuidd: use configured run state directory in manual etc
[kzak@redhat.com: - minor clean up in configure.in]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-10 13:04:02 +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
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
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 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 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 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 f9a20f0b58 build-sys: move getopt to misc-utils/
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:48:23 +02:00
Karel Zak 37b88bfcd7 build-sys: convert misc-utils/ to module
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:48:23 +02:00
Karel Zak 25206ba67b whereis: cleanup man page, add note about $PATH
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=835211
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 09:53:51 +02:00
Karel Zak 32c67d2c58 lsblk: check sysfs_read_u64 return code [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-21 13:08:18 +02:00
Karel Zak 9c53a49c44 lsblk: check ioctl result [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-21 11:58:39 +02:00
Karel Zak 2dc03af7f0 lsblk: fix usage, improve exclude/include lists parsing
Reported-by: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-19 17:41:35 +02:00
Karel Zak 2ef4e8ba1a lsblk: add --include option
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-19 16:06:22 +02:00
Karel Zak 8acc8979c4 Merge branch '2012wk24' of git://github.com/kerolasa/lelux-utiliteetit
* '2012wk24' of git://github.com/kerolasa/lelux-utiliteetit: (24 commits)
  more: fix pointer wrap around compiler warnings
  more: fix search repetition regression
  lscpu: values in /proc/bus/pci/devices are always unsigned
  scriptreplay: fix compiler format warning
  lib/mbsalign: abort() when non-expected case is encountered
  mkfs.cramfs: disallow unknown command line options
  fsck.cramfs: disallow unknown command line options
  setarch: disallow unknown command line options
  hexdump: print sensible message when all input file arguments fail
  mount: (new) use exclusive_option()
  dmesg: use exclusive_option()
  wipefs: use exclusive_option()
  wdctl: correct manual section reference
  wdctl: use exclusive_option()
  prlimit: use exclusive_option()
  lscpu: use exclusive_option()
  losetup: use exclusive_option()
  chcpu: use exclusive_option()
  lsblk: use exclusive_option()
  findmnt: use exclusive_option()
  ...
2012-06-19 13:01:29 +02:00
Bernhard Voelker f6da50d49b lsblk: permit option --exclude more than once
Previously, `lsblk -e 8 -e 11` did not exlude maj:8 as requested.

Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
2012-06-19 11:06:48 +02:00
Sami Kerola 58f0252a18 wipefs: use exclusive_option()
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-06-17 17:59:59 +02:00
Sami Kerola 0518765347 lsblk: use exclusive_option()
This commit fixes exclusions which where meant to happen, but where not
successful.  For example

lsblk -r -l	# did exclude
lsblk -l -r	# did not exclude

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-06-17 17:59:59 +02:00
Sami Kerola fb9a004206 findmnt: use exclusive_option()
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-06-17 17:59:59 +02:00
Sami Kerola 72b99fc53b blkid: use exclusive_option()
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-06-17 17:59:59 +02:00
Karel Zak 9d738ff822 lsblk: use fallback for TYPE
... bug introduced by 1edd8af70b

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-15 13:13:40 +02:00
Sami Kerola 1edd8af70b lsblk: use blkdev_scsi_type_to_name()
Replace inline version of similar, but less complete, functionality
with the lib/blkdev.c function.  The function will inform if a type is
unknown, which appears as hex string value.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-06-11 22:06:06 +02:00
Sami Kerola 4f0537374f wipefs: use symbolic value for markup mode
In case mode value is found to be out of bounds program will crash.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-06-11 22:06:05 +02:00
Sami Kerola 0e9b73d3fb build: fix redundant redeclaration warnings
env.c:24:15: warning: redundant redeclaration of 'environ' [-Wredundant-decls]
su.c:81:15: warning: redundant redeclaration of 'environ' [-Wredundant-decls]

fstab.c:581:14: warning: redundant redeclaration of 'strsignal' [-Wredundant-decls]

kill.h:1:13: note: previous declaration of 'get_pids' was here
kill.c:152:13: warning: redundant redeclaration of 'get_pids' [-Wredundant-decls]

kill.c:142:5: warning: redundant redeclaration of 'main' [-Wredundant-decls]
getopt.c:89:5: warning: redundant redeclaration of 'main' [-Wredundant-decls]

agetty.c:536:15: warning: redundant redeclaration of 'optarg' [-Wredundant-decls]
agetty.c:537:13: warning: redundant redeclaration of 'optind' [-Wredundant-decls]
script.c:161:13: warning: redundant redeclaration of 'optind' [-Wredundant-decls]
wall.c:96:13: warning: redundant redeclaration of 'optind' [-Wredundant-decls]

libmount.h:362:26: note: previous declaration of 'mnt_update_get_fs' was here
libmount.h:454:26: note: previous declaration of 'mnt_context_get_fs' was here
mountP.h:383:26: warning: redundant redeclaration of 'mnt_context_get_fs' [-Wredundant-decls]
mountP.h:398:26: warning: redundant redeclaration of 'mnt_update_get_fs' [-Wredundant-decls]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-06-11 19:51:35 +02:00
Sami Kerola 7244ad8c09 uuidd: use output redirection which works [checkbashisms]
possible bashism in misc-utils/uuidd.rc line 52 (should be >word 2>&1):
	if pidofproc -p $PIDFILE $DAEMON >& /dev/null ; then

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-06-11 19:50:40 +02:00
Sami Kerola 41420120a8 blkid: fix realloc memory leak [cppcheck]
[misc-utils/blkid.c:367]: (error) Common realloc mistake: 'str' nulled but not freed upon failure

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-06-11 19:50:35 +02:00
Dave Reisner 283d626b36 logger: use memcpy instead of bcopy
bcopy is marked legacy in POSIX.1-2001 and should not be used.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-05-29 09:33:14 +02:00