Commit Graph

10385 Commits

Author SHA1 Message Date
Benno Schulenberg e906ab3c6a libfdisk: (bsd) fix spelling in warning message
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-16 10:39:36 +01:00
Benno Schulenberg cb19f5479b fdisk, cfdisk, sfdisk: improve the grammar of three messages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-16 10:39:35 +01:00
Benno Schulenberg 1a60a5ecb0 sfdisk: improve the wording of seven error messages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-16 10:39:34 +01:00
Ruediger Meier 72e948094b tests: fix fdisk/bsd for alpha
There are special __alpha__ ifdefs in libfdisk/src/bsd.c
Regarding 565964a9 and a80886e9.

BTW it was a bad idea to use md5sum. In case of failure it
would be much easier to debug hexdump diffs. Now it's nearly
impossible to collect all these exotic hexdumps.

CC: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-16 10:39:34 +01:00
Karel Zak 641350fe82 lscpu: keep lscpu usable on snapshots
This patch reverts 3ac03fe4d2 for
snapshots (--sysroot).

Yeah, poor-man solution. It would be really nice to have runtime
detection to support model overwriting also on snapshots.

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-15 14:23:59 +01:00
Sami Kerola 4cd4b68795 vipw: print only one new line when asking about shadow file
Commit 11b86e1733 changed printf() to puts() in favour of more simple
function, but forgot that puts() adds a new line to end of string.  That new
line is neither needed, or expected, so use fputs() that is both a simple
printing function and comes without new line side effect.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-03-15 14:12:31 +01:00
Karel Zak 40f00b4f8e libmount: improve conversion from root= to the devname
Currently the code supports /dev/name or PARTUUID= only. We also
need to support 'maj:min' and 'hexhex' notations.

Reported-by: George Spelvin <linux@horizon.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-15 14:07:34 +01:00
Karel Zak 12f5cbe159 swapon: remove unnecessary assert
Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=818252
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-15 11:38:01 +01:00
Karel Zak 83a77afb31 travis: let's ignore apt-get return code
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-14 17:01:25 +01:00
Karel Zak 7830e50df7 docs: add note about libsmartcols Python binding
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-14 16:58:21 +01:00
Vasant Hegde 3ac03fe4d2 lscpu: Fix model and model name on Power Systems
On Power System, lspcu presently displays system model number instead of
processor model name. 'model' tag in cpuinfo contains system model name,
not processor model. Instead it uses 'cpu' tag for processor model name.
Also it uses 'revision' tag for processor model.

Fix lspcu so that it displays processor model number. Also display processor
model name.

cpuinfo output on Power System:
  ...
  ...

  processor	: 127
  cpu		: POWER8E (raw), altivec supported
  clock		: 4322.000000MHz
  revision	: 2.1 (pvr 004b 0201)

  timebase	: 512000000
  platform	: PowerNV
  model		: 8286-42A
  machine	: PowerNV 8286-42A
  firmware	: OPAL

Output without this patch:
  Architecture:          ppc64le
  Byte Order:            Little Endian
  CPU(s):                128
  On-line CPU(s) list:   0-127
  Thread(s) per core:    8
  Core(s) per socket:    4
  Socket(s):             4
  NUMA node(s):          4
  Model:                 8286-42A
  ...
  ...

Output with this patch:
  Architecture:          ppc64le
  Byte Order:            Little Endian
  CPU(s):                128
  On-line CPU(s) list:   0-127
  Thread(s) per core:    8
  Core(s) per socket:    4
  Socket(s):             4
  NUMA node(s):          4
  Model:                 2.1 (pvr 004b 0201)
  Model name:            POWER8E (raw), altivec supported
  ...
  ...

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
2016-03-14 16:17:19 +01:00
Karel Zak 79d8593fd7 unshare: tiny change
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-14 16:15:04 +01:00
Karel Zak 0ed6e43925 unshare: fix incomplete sentence in man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-14 16:13:23 +01:00
Benno Schulenberg de0f3763c7 unshare: improve wording and formatting in the man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-14 16:11:09 +01:00
Benno Schulenberg 295a7aa323 docs: improve grammar and wording in the 2.28 release notes
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-14 16:11:07 +01:00
Benno Schulenberg 99b3fb9eba unshare: replace a special character in the man page with a space
Reported-by: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-14 16:11:05 +01:00
Benno Schulenberg 47f9b35ef4 fallocate: improve synopsis and spelling in man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-14 16:11:04 +01:00
Benno Schulenberg 0167ca8215 fallocate: restore man-page content that was deleted in commit 5b033bfd
Reported-by: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-14 16:11:02 +01:00
Karel Zak 11b86e1733 vipw: use puts() when formatting unnecessary
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-14 16:02:17 +01:00
Karel Zak 785539baa3 Merge branch 'travis-osx' of https://github.com/rudimeier/util-linux
* 'travis-osx' of https://github.com/rudimeier/util-linux:
  travis: add OSX build
  travis: switch to Ubuntu 14.04 Trusty
  build-sys: improve uuidd and script build conditions
  build-sys: use AC_PROG_MKDIR_P and remove a few gnuisms
  build-sys: add missing "not found" strings
  build-sys: fix again UL_SCANF_TYPE_MODIFIER
  tests: don't use system's mount commands
  tests: improve skipping of old btrfs-tools
  tests: remove invalid argument in libmount/debug
  tests: skip old socat silently
  misc: fix icc/clang compiler warnings
  misc: fix printf i386 compiler warnings
2016-03-14 15:59:10 +01:00
Karel Zak 0bb5d3a043 tests: make libmount/lock optional
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-14 13:24:54 +01:00
Karel Zak 3d0cf042b0 sulogin: fix sigset_t initialization
Reported-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-14 13:21:27 +01:00
Sami Kerola 3ff951f8f3 docs: update AUTHORS file
Former email address has not reached me since summer 2015.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-03-14 13:15:15 +01:00
Sami Kerola 074676470e bash-completion: lsns: add missing completion file
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-03-14 13:15:15 +01:00
Sami Kerola 372221e52b bash-completion: lslogins: add missing completion file
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-03-14 13:15:14 +01:00
Sami Kerola 061e41250f bash-completion: ipcmk: add missing completion file
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-03-14 13:15:14 +01:00
Sami Kerola 5f57e1420c bash-completion: fsck.cramfs, isosize: find files an argument
Earlier completion suggested only options for the command, this changes
options to be proposed when first character of an argument is dash.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-03-14 13:15:13 +01:00
Sami Kerola aeb9298d3e setsid: fix argument count bug
The below demonstrates what happen before this change.

$ setsid --wait
setsid: child 3252 did not exit normally: Success

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-03-14 13:15:13 +01:00
Sami Kerola 5a2ed45309 isosize: stop unmeaningful printing errno message
Earlier printout had strange looking 'Success'.

$ isosize --sectors /dev/urandom
isosize: /dev/urandom: might not be an ISO filesystem
isosize: 733error: le=-1971599244 be=1633181607: Success
...

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-03-14 13:15:12 +01:00
Sami Kerola 4e5411f623 logger: fix memory leak [ASAN and valgrind]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-03-14 13:15:09 +01:00
Richard Yao 1d01d13eda swapon: fix discard=pages docs
The documentation for discard=pages is ambiguous in that it could be
interpreted to mean either that the pages are discarded immediately
after being freed or that the pages are discarded immediately before
being reused by a write. Both implementations would satisfy the
statement "discard freed swap pages before they are avaliable for
reuse", but the kernel does the former.

Doing a discard operation (which is non-queued on SATA drives before
SATA 3.1) before a write operation to the same sector is pointless
unless using, pre-SATA 3.1 drives, where discard is detrimental because
ATA TRIM is a non-queued command.

Anyone who wants discard operations on swap and interprets the man page
as describing the incorrect behavior would opt for discard=once over
discard, when discard provides the behavior of both discard=once and
discard=pages, which is what they likely want.

Lets make a small change to the documentation to clarify the behavior.

Signed-off-by: Richard Yao <ryao@gentoo.org>
2016-03-14 12:26:28 +01:00
Ruediger Meier 668d6d2ef9 travis: add OSX build
Of course OSX is not an important target but since it's available on
travis we can (mis)use it to generally improve non-Linux and non-GNU
compatibility. People are using musl, busybox or whatever and
util-linux should work for them. Having OSX build running regularly
will help us to freeze the lately improved BSD compatibility and
to check code which is usually ifdef'ed.

We are using the most recent OSX 10.11.x / Xcode 7.3 though the older
travis OSX images are working too currently.

If it turns out that this OSX build is too annoying when we are about
to add support for latest Linux features then we could add:
  allow_failures:
    - os: osx
to let it fail silently.

Note I've tried hard to keep .travis-functions.sh readable for the
Linux case. I've removed --with-python because it's default anyway,
--enable-gtk-doc is still tested in discheck.

OSX root check would also work (almost, using another --prefix) but
would only run one more test yet (minix).

OSX distcheck would have some issues with conditionally built man
pages and does not work with default distcheck confopts. No need to
fix that because distcheck is more for maintainer machines.

BTW to increase travis build speed again we could remove some targets
from the matrix without losing tested scenarios:
 - nonroot for Linux seems to be waste of time
 - clang/Linux could be root check only
For now we keep it as is.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-13 21:51:18 +01:00
Ruediger Meier fc412fe4ce travis: switch to Ubuntu 14.04 Trusty
Now we have a reasonable recent build system with systemd, etc. We still
keep old Ubuntu 12.04 Precise to check backward compatibility but
remove the hack to install socat.

Note the new env variable PRECISE="yes" is only there to see it on travis
website.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-13 21:48:21 +01:00
Ruediger Meier 651b25cd7f build-sys: improve uuidd and script build conditions
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-13 21:48:16 +01:00
Ruediger Meier 18336d16d9 build-sys: use AC_PROG_MKDIR_P and remove a few gnuisms
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-13 21:48:09 +01:00
Ruediger Meier 9dd55a048e build-sys: add missing "not found" strings
Otherwise configure output looks like this:
  configure: WARNING:  not found; not building cfdisk

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-13 21:48:06 +01:00
Ruediger Meier 544d406921 build-sys: fix again UL_SCANF_TYPE_MODIFIER
This reverts commit c8494d88:
  "build-sys: fix UL_SCANF_TYPE_MODIFIER for icc"

plus fix the check prog, because it found "%as" to be valid on
systems where "%a" is used for float conversion.

icc warns about "%ms" but it works anyways. Our AC_RUN_IFELSE prog
should do it right now regardless of compiler warnings.

Note "%ms" is POSIX.1-2008 standard but still not available on
many systems. Maybe it's time to remove "%as" fallback for old
glibc which is even less portable.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-13 21:47:57 +01:00
Ruediger Meier 0693589b7a tests: don't use system's mount commands
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-13 21:47:42 +01:00
Ruediger Meier 131e543794 tests: improve skipping of old btrfs-tools
Older Linux distributions came with differently incomplete
btrfs-tools 0.19+git versions (2009-2013). Old mkfs.btrfs
needs minimum device size 256M.

Note the most simple way to skip btrfs-tools < 3.14 would be
  btrfs property --help 2>&1 || ts_skip "btrfs too old"
but I want to include 3.12 because of Ubuntu Trusty on travis.

This patch partly reverts/rewrites the following commits:
7e604f3c - tests: don't skip case "output undefined"
076153f8 - tests: don't compare btrfs mount options
370d31f7 - tests: skip btrfs tests if version too old

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-13 21:47:38 +01:00
Ruediger Meier 616b534f4f tests: remove invalid argument in libmount/debug
This was usually no problem because of unsafe strtoul(3) usage in
test prog libmount/src/init.c. But musl's strtoul sets errno if
no digit was found in the argument.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-13 21:47:35 +01:00
Ruediger Meier e486622991 tests: skip old socat silently
I've seen enough logs with verbose socat output for now. Let's
make it quiet.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-13 21:47:32 +01:00
Ruediger Meier 58c87bd045 misc: fix icc/clang compiler warnings
clang warning:
libmount/src/tab.c:1833:6: warning: variable 'rc' is used uninitialized whenever
      'if' condition is true [-Wsometimes-uninitialized]
        if (!mpc)
            ^~~~

icc printf warnings:
    libmount/src/monitor.c(348): warning #2279: printf/scanf format not a string literal and no format arguments
            DBG(MONITOR, ul_debugobj(mn, status == 1 ? " success" : " nothing"));
            ^
    login-utils/vipw.c(348): warning #2279: printf/scanf format not a string literal and no format arguments
                           : _("You are using shadow passwords on this system.\n"));
                                                                                  ^

icc enum warnings:
    disk-utils/fdisk-menu.c(150): warning #188: enumerated type mixed with another type
            .exclude = FDISK_DISKLABEL_GPT | FDISK_DISKLABEL_BSD,
                       ^
    libsmartcols/src/table_print.c(750): warning #188: enumerated type mixed with another type
                            &width, align,
                                    ^

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-13 21:47:27 +01:00
Ruediger Meier e1a15f8f68 misc: fix printf i386 compiler warnings
Still a few printf warnings found on i386 Linux:

libfdisk/src/alignment.c: In function 'fdisk_align_lba':
libfdisk/src/alignment.c:115:3: warning: format '%ju' expects argument of type 'uintmax_t', but argument 6 has type 'long unsigned int' [-Wformat]
sys-utils/lsns.c: In function ‘add_namespace’:
sys-utils/lsns.c:346:2: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘ino_t’ [-Wformat]
sys-utils/lsns.c: In function ‘add_process_to_namespace’:
sys-utils/lsns.c:362:2: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘ino_t’ [-Wformat]
sys-utils/lsns.c: In function ‘add_scols_line’:
sys-utils/lsns.c:440:4: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘ino_t’ [-Wformat]

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-12 11:28:03 +01:00
Karel Zak 8c97556ecf build-sys: release++ (v2.28-rc1)
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-11 11:41:05 +01:00
Karel Zak ec9538250c docs: update v2.28-ReleaseNotes
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-11 11:39:28 +01:00
Karel Zak 074c921a4f docs: update AUTHORS file
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-10 15:28:28 +01:00
Karel Zak b5ef147282 po: merge changes
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-10 15:19:25 +01:00
Wylmer Wang befa46018e po: update zh_CN.po (from translationproject.org) 2016-03-10 14:39:45 +01:00
Evgeniy Yakushev 7f7915632f po: update ru.po (from translationproject.org) 2016-03-10 14:39:45 +01:00
Rafael Fontenelle 761352568e po: update pt_BR.po (from translationproject.org) 2016-03-10 14:39:45 +01:00