Commit Graph

7633 Commits

Author SHA1 Message Date
Karel Zak 74bd28ad6e libsmartcols: add lines
Co-Author: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-04-03 12:29:16 +02:00
Karel Zak 1577b2592e libsmartcols: add columns
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-04-03 12:29:16 +02:00
Ondrej Oprala 6d1072696c libsmartcols: add cells
[kzak@redhat.com: - remove copy, free -- all have to be handled by lines]

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-04-03 12:29:16 +02:00
Ondrej Oprala b36992fb2a libsmartcols: add symbols
[kzak@redhat.com: - split scols_new_symbols() to regular getters functions]

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-04-03 12:29:16 +02:00
Ondrej Oprala 0b0ab9ff96 libsmartcols: add iterator
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-04-03 12:29:15 +02:00
Ondrej Oprala 1a4d989e22 libsmartcols: add basic files
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-04-03 12:29:15 +02:00
Ruediger Meier 94b559e08e mount: update mount.8 about barrier mount options defaults
This patch comes originally from Jan Kara <jack@suse.cz> and updates
the default behaviour of the kernel which has been changed some years
ago. See kernel docs
  Documentation/filesystems/ext3.txt
  Documentation/filesystems/ext4.txt
2014-04-01 18:43:33 +02:00
Karel Zak 412791a995 libfdisk: remove fdisk_colon()
It was unnecessary overkill to have colorized "foo:" prefix in fdisk
output.

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-04-01 14:39:13 +02:00
Karel Zak 0b6fbc2599 dmesg: don't use brow/yellow in output
The color used for subsystem prefix is useless on
while background. Let's use blue.

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-04-01 14:32:38 +02:00
Karel Zak 6b16909288 Merge branch 'fix-script-timing' of https://github.com/theonewolf/util-linux
* 'fix-script-timing' of https://github.com/theonewolf/util-linux:
  scriptreplay: no need to skip first time value or last bytes fixes #58
  script: time from end of read() call partially fixes #58
2014-04-01 11:45:19 +02:00
Karel Zak 8ff90edfc2 Merge branch 'travis' of https://github.com/rudimeier/util-linux
* 'travis' of https://github.com/rudimeier/util-linux:
  travis-ci: enable more features and update gettext
  tests: getting paraller_jobs more robust
2014-04-01 11:40:18 +02:00
Karel Zak b6a8cc0130 Merge branch 'pg-manual-page-long-options' of https://github.com/jaalto/util-linux
* 'pg-manual-page-long-options' of https://github.com/jaalto/util-linux:
  pg.1: Move (plus) options near (minus) option at the beginning
  pg.1: Add -h, --help, -V, --version
2014-04-01 11:37:06 +02:00
Ruediger Meier b9396cbe90 travis-ci: enable more features and update gettext
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-03-29 01:13:13 +01:00
Ruediger Meier 6163259cbd tests: getting paraller_jobs more robust
This patch fixes several issues:
 1. lscpu may not exist on all systems.
 2. Option -b is not always available but we can skip it because it's
    the documented default for -p.
 3. Some old lscpu versions print --help output to stdout in case of
    error. So in case 2. it would count all the help lines as CPUs,
    which could be really bad on slow single core machines.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-03-29 01:13:13 +01:00
Karel Zak 5b575d4381 libblkid: fix partitions probing
* PART_ENTRY_* stuff is optional and should not overwrite
   previous probing result in partitions_probe()

 * missing minix parental partition is not error

 * blkid_probe_is_vfat() usage has to be more robust

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-03-28 15:07:17 +01:00
Ondrej Oprala cbe9202781 libmount: silence some docs warnings
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
2014-03-28 11:25:40 +01:00
Karel Zak b430d630d3 Merge branch 'fix-ppc-tests' of https://github.com/rudimeier/util-linux
* 'fix-ppc-tests' of https://github.com/rudimeier/util-linux:
  tests: fix last for bigendian
  tests: fix utmpdump/ipv6tobin for bigendian
  tests: fix utmpdump/to-binary for bigendian
  tests: fix utmpdump/ipv6totxt for bigendian
  tests: fix utmpdump/to-text for bigendian
  tests: swaplabel needs to respect pagesize
2014-03-28 11:10:09 +01:00
Karel Zak 742b128523 Merge branch 'fix-ipcs-q-fallback' of https://github.com/rudimeier/util-linux
* 'fix-ipcs-q-fallback' of https://github.com/rudimeier/util-linux:
  travis-ci: abort if make check fails
  ipcs: fix memleak in ipc_*_get_info functions
  ipcs: fix ipc_sem_get_info fallback case
  ipcs: fix ipc_shm_get_info fallback case
  ipcs: fix ipc_msg_get_info fallback case
  tests: add basic test case for ipcs -m -i n
  tests: add basic test case for ipcs -s -i n
  tests: add basic test case for ipcs -q -i n
  tests: quote generated arguments for ipcrm
  ipcs: cleanup jumplabel stlyes
2014-03-28 10:51:17 +01:00
Karel Zak 32ebf7e04e Merge branch 'fix-lscpu-cache' of https://github.com/rudimeier/util-linux
* 'fix-lscpu-cache' of https://github.com/rudimeier/util-linux:
  tests: cleanup, remove unused lscpu output
  tests: add lscpu dump for ppc cpu with no cache size
  lscpu: cleanup, use _PATH_SYS_CPU/NODE
  lscpu: don't abort if cache size is unknown
2014-03-28 10:41:44 +01:00
Karel Zak c48508c2fa findfs: add ability to work with PART{UUID,LABEL}= too
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-03-28 10:36:05 +01:00
Ruediger Meier 0517fbf357 tests: cleanup, remove unused lscpu output
All these files are not used since a292bbde or 0d86c70a.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-03-27 11:35:06 +01:00
Ruediger Meier 50a3a60490 tests: add lscpu dump for ppc cpu with no cache size
Taken from qemu-system-ppc (qemu 1.7) machine with installed
debian 7.4 wheezy, kernel 3.2.0-4-powerpc.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-03-27 11:30:15 +01:00
Ruediger Meier 1d56b55ea1 lscpu: cleanup, use _PATH_SYS_CPU/NODE
This make most lines shorter than 80 chars again (tab-witdh 4).

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-03-27 09:25:47 +01:00
Ruediger Meier 10d927ab3b lscpu: don't abort if cache size is unknown
There are systems where the size file does not exist. Most badly even
lscpu -p would abort allthough it does not use the size:
$ lscpu -p
lscpu: error: cannot open
/sys/devices/system/cpu/cpu0/cache/index0/size: No such file or directory

This patch does not abort in this case and prints "unknown size" in
human-readable case. For examle on this qemu pcc test machine:
$ lscpu
Architecture:          ppc
CPU op-mode(s):        32-bit
Byte Order:            Big Endian
CPU(s):                1
On-line CPU(s) list:   0
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             1
Model:                 Power Macintosh
BogoMIPS:              33.25
L1d cache:             unknown size
L1i cache:             unknown size

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-03-27 09:11:57 +01:00
Sami Kerola 753d9bb2ec findfs: use symbolic exit values, and tell about them in manual
[[kzak@redhat.com: - move return codes to findfs.c]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-03-26 12:17:36 +01:00
Sami Kerola f7bac5731b mcookie: add --max-size option
Just in case someone wants to add entropy from device with invocation
demonstrated below.

$ mcookie --file /dev/urandom --max-size 64k

[kzak@redhat.com: - use all-io.h]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-03-26 12:08:57 +01:00
Sami Kerola 46ae163a8e mcookie: use control structure, and fix usage()
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-03-26 11:03:51 +01:00
Sami Kerola a3030b8ad3 mcookie: use same variable type consistently
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-03-26 10:36:18 +01:00
Sami Kerola cdf0c32596 mcookie: allow --file option be defined multiple times
Earlier only the last option argument took effect.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-03-26 10:36:18 +01:00
Sami Kerola 0720d60cc1 mcookie: use lib/randutils
The mcookie should reuse existing code, and there is definitely no need
to prefer /dev/random for this utility.  See reference for explanation
about later statement.

References: http://www.2uo.de/myths-about-urandom/
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-03-26 10:36:18 +01:00
Karel Zak caf1ba11a3 flock: use nfs4 fallback on EBADF too
The kernel regression (probably v3.4, commit 55725513) introduces a
new errno for O_RDONLY on NFS. Now it returns EBADF rather than EIO.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1078618
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-03-24 11:26:21 +01:00
Ruediger Meier 765e6dc3d3 tests: fix last for bigendian
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2014-03-23 15:45:14 +00:00
Karel Zak 9c72131065 Merge branch 'fix-compile-color-cfdisk' of https://github.com/theonewolf/util-linux
* 'fix-compile-color-cfdisk' of https://github.com/theonewolf/util-linux:
  cfdisk: fix compile-time error fixes #59
2014-03-21 15:21:16 +01:00
Karel Zak 32be26a076 Merge branch 'cfdisk-fix-typo' of https://github.com/rudimeier/util-linux
* 'cfdisk-fix-typo' of https://github.com/rudimeier/util-linux:
  cfdisk: fix typo (undeclared variable since b1f58330)
2014-03-21 15:11:25 +01:00
Karel Zak b5ce1c5642 Merge branch 'master' of https://github.com/rudimeier/util-linux
* 'master' of https://github.com/rudimeier/util-linux:
  tests: try hard to create swaplabel's test image
  build-sys: libmount/python/__init__.py is always a dist file
  tests: return error if failures file not usable
  tests: write tests/failures to build- instead of srcdir
2014-03-21 15:02:29 +01:00
Karel Zak e146ae4edb libfdisk: properly implement read-only mode
Don't use fallback to read-only mode in fdisk_context_assign_device(),
it's application responsibility open the device in the right mode.

The commands fdisk and cfdisk check (and report) read-only mode now.

Reported-by: Maciej Małecki <me@mmalecki.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-03-21 14:04:59 +01:00
Karel Zak d71bd2f0d6 libfdisk: clean up debug output
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-03-21 13:33:37 +01:00
Karel Zak 881410671f libfdisk: use new debug functions
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-03-21 12:35:21 +01:00
Karel Zak c62a6311ee libblkid: use new debug functions
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-03-21 12:34:50 +01:00
Karel Zak 83a783320b libmount: use new debug functions
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-03-21 12:34:39 +01:00
Karel Zak e7b49879ad include/debug: add another debug macros
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-03-21 12:04:12 +01:00
Karel Zak d282c88df5 include/debug: fix coding style
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-03-21 11:21:56 +01:00
Karel Zak 9a7769141a Merge branch 'common_debug' of https://github.com/ooprala/util-linux
* 'common_debug' of https://github.com/ooprala/util-linux:
  clean up redundant macros and defines
  libfdisk: use include/debug.h
  libblkid: use include/debug.h
  libmount: further debug.h integration
  libcommon: don't mention lib versions in debug macros
  libcommon: define more debugging macros
  libmount: use macros from include/debug.h
  libcommon: add common debugging routines
2014-03-21 10:59:58 +01:00
Karel Zak 0576dbd3ea build-sys: gettexts 0.18 -> 0.18.2 due to MKDIR_P
The autopoint is designed to not use the latest installed bug fix
release, if you specify

	AM_GNU_GETTEXT_VERSION([0.18])

in your configure.ac then it really uses 0.18, rather than also
installed 0.18.2 or 0.18.3. It means that bug fix update has no any
effect. Oh...

The AM_PROG_MKDIR_P is deprecated for years, unfortunately still used
in 0.18 gettext m4 stuff. This problem should be fixed in 0.18.2 where
is the correct AC_PROG_MKDIR_P macro.

If you do not have gettext 0.18.2 (or 0.18.3) then update.

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-03-21 10:30:22 +01:00
Karel Zak 621047fa81 Merge branch 'fix-unshare-defines' of https://github.com/rudimeier/util-linux
* 'fix-unshare-defines' of https://github.com/rudimeier/util-linux:
  unshare: include libmount.h to provide missing MS_* defines
2014-03-21 09:19:01 +01:00
Hannes Reinecke 37f4060225 blkid: convert superblocks to new calling convention
With the previous patch the scanning functions were
modified to return a differentiated return code.
To correctly abort scanning when an I/O error occurs
we need to differentiate between 'error' (= -1) and
'not found' (= 1) in the probe functions.
This patch updates all superblock scanning functions
to the new calling convention.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-03-20 15:26:48 +01:00
Hannes Reinecke 296d96e20e blkid: stop scanning on I/O error
Whenever we fail to read from a device it's pointless to
continue with probing; we should be failing immediately.
Otherwise the system will continue logging I/O errors.

This patch updates the probe functions to return the
negative error number on error and BLKID_PROBE_NONE
if not found.

[kzak@redhat.com: - fix s/return errno/return -errno/]

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-03-20 13:43:40 +01:00
Wolfgang Richter a21f7ec91d scriptreplay: no need to skip first time value or last bytes fixes #58 2014-03-19 22:47:11 -04:00
Wolfgang Richter b0d6b85720 script: time from end of read() call partially fixes #58 2014-03-19 22:45:48 -04:00
Wolfgang Richter 03f2226e8b cfdisk: fix compile-time error fixes #59
+ For compile to work also needs pull request #56 applied
2014-03-19 22:42:40 -04:00