Commit Graph

680 Commits

Author SHA1 Message Date
Karel Zak ed61acc254 dmesg: add --syslog to force to old syslog(2) interface
... just for debugging or for people who somehow depends on syslog(2)
behavior.

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-19 18:35:20 +02:00
Karel Zak 7af230601a dmesg: refactoring for kmsg support
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-19 18:33:20 +02:00
Karel Zak 7ff1f63f15 dmesg: unify internal APIs
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-19 17:25:22 +02:00
Karel Zak e6471b9fc5 dmesg: cleanup, move more stuff to control struct
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-19 17:01:05 +02:00
Karel Zak 9b3a698427 dmesg: move filename to control struct
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-19 16:33:08 +02:00
Karel Zak aedeaa40d1 mount: (new) add --source and --target
In some cases (for example if only one mount argument is given) may be
mount request ambivalent:

	# mount /foo

and fstab:

	/dev/sda5	/foo	rw	0	0
	/foo		/bar	bind	0	0

the new options allows to be more explicit

        # mount --target /foo		(mounts /dev/sda5)

	# mount --source /foo		(binds /foo to /bar)

It's possible to use the options together

	# mount --source /dev/sda2 --target /home

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-17 22:02:35 +02:00
Karel Zak e5d262eec5 eject: fix compiler warning [-Wmissing-prototypes]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-16 18:55:39 +02:00
Karel Zak d91757a0f9 ldattach: fix compiler warning [-Wmissing-prototypes]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-16 18:53:11 +02:00
Karel Zak 583f14ccbd lscpu: fix compiler warning [-Wmissing-prototypes]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-16 18:52:30 +02:00
Karel Zak 5b90f817d8 setarch: fix compiler warning [-Wmissing-prototypes]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-16 18:51:27 +02:00
Karel Zak 9f38129eff cytune: fix compiler warning [-Wmissing-prototypes]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-16 18:50:39 +02:00
Karel Zak d918c13c4c ipcmk: fix compiler warning [-Wmissing-prototypes]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-16 18:49:36 +02:00
Karel Zak 93f90e1332 hwclock: fix compiler warning [-Wmissing-prototypes]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-16 18:43:53 +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 b9136477e6 swapon: remove unused variables
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-16 18:18:21 +02:00
Petr Uzel 4c46af85e7 swapon: kill unused variables in show_table()
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2012-07-16 18:09:21 +02:00
Eryu Guan 6934547d76 mount: ext4 option inode_readahead should be inode_readahead_blks in mount.8
Mount option inode_readahead should be inode_readahead_blks. Also the
value should be a power of 2.

Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2012-07-16 18:08:43 +02:00
Sami Kerola 0aec470c2f swapon: fix --summary output regression
Commit 64b588814e changed --summary
header alignment, and usage of spaces vs tabs in output.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-10 13:45:31 +02:00
Sami Kerola 7ae8b469ad swapon: make --show size to be human readable by default
Cc: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-10 13:45:04 +02:00
Sami Kerola e076b5526f swapon: add --show option
The --show uses lib/tt.c, which allows user to specify columns he is
interested of, and avoids using hard coded field sizes which may be
problematic when system has large enough swap.

[kzak@redhat.com: - improve usage(), remove unused code]

Cc: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-10 13:41: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 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 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 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 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 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 c7f753901f build-sys: move hwclock to sys-utils/
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:48:23 +02:00
Karel Zak 8772f8d7ee build-sys: convert sys-utils/ to module
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:48:22 +02:00
Karel Zak 434b07a090 build-sys: default to new sys-utils/mount.c, add --enable-deprecated-mount
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:48:22 +02:00
Karel Zak 97209c2be1 tunelp: check fstat return code [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-21 13:11:08 +02:00
Karel Zak defa0710b6 lib/loopdev: use warn_unused_result forimportant functions
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-21 10:40:43 +02:00
Karel Zak 140014a424 lscpu: fix compiler warning [-Wsign-compare]
lscpu.c: In function ‘has_pci_device’:
lscpu.c:425:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
lscpu.c:425:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-19 13:14:20 +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
Karel Zak 12b41eacf5 mount: (new) add note about unsupported 'ignore' fstype to fstab.5
Reported-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-19 12:04:03 +02:00
Sami Kerola 13cf6fc8d9 lscpu: values in /proc/bus/pci/devices are always unsigned
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-06-17 18:00:00 +02:00
Sami Kerola edf1cf0af5 setarch: disallow unknown command line options
Exit with instruction to run --help if unknown option is encountered.
Before the following example printed error, but resulted to an attempt
to run argument.

$ x86_64 -x ls

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-06-17 17:59:59 +02:00
Sami Kerola 38483b86e3 mount: (new) use exclusive_option()
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-06-17 17:59:59 +02:00
Sami Kerola 9492013429 dmesg: use exclusive_option()
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-06-17 17:59:59 +02:00
Sami Kerola 62b4528a8b wdctl: correct manual section reference
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-06-17 17:59:59 +02:00
Sami Kerola e6dbcc4a20 wdctl: use exclusive_option()
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-06-17 17:59:59 +02:00
Sami Kerola 73e1d7fb02 prlimit: use exclusive_option()
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-06-17 17:59:59 +02:00
Sami Kerola 41a8940d43 lscpu: use exclusive_option()
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-06-17 17:59:59 +02:00
Sami Kerola 96801c4826 losetup: use exclusive_option()
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-06-17 17:59:59 +02:00
Sami Kerola 264a6b0ab7 chcpu: use exclusive_option()
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-06-17 17:59:59 +02:00
Karel Zak d5f9b6e5fb Merge branch '2012wk23' of git://github.com/kerolasa/lelux-utiliteetit
* '2012wk23' of git://github.com/kerolasa/lelux-utiliteetit:
  lsblk: use blkdev_scsi_type_to_name()
  blkdev: add blkdev_scsi_type_to_name()
  wipefs: use symbolic value for markup mode
  eject: inform if CD-ROM drive is not ready
  docs: clean up partx.8 manual
  include: fix void pointer arithmetics warnings
  sysfs: fix printf format warnings
  build: fix unused parameter warnings
  build: fix redundant redeclaration warnings
  include: fix spurious list.h warnings
  uuidd: use output redirection which works [checkbashisms]
  blkid: fix realloc memory leak [cppcheck]
  setarch: do not use -1 as array index [cppcheck]
2012-06-15 12:44:17 +02:00
Bernhard Voelker b4479ffaa8 setsid: fix off-by-one error in execvp call
Bug introduced during --ctty implementation by v2.21-112-g8a2f04d.

Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
2012-06-15 11:42:43 +02:00