Commit Graph

544 Commits

Author SHA1 Message Date
Sami Kerola f06b43285d build-sys: enhance readability of the autotools files
Several horizontal lists are turned to vertical, and sorted to
alphabetical order. Additionally spaces are converted to tabs where
ever possible.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-02-28 13:29:35 +01:00
Karel Zak 772cce373f libmount: allow empty source for mount(2) syscall
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=797438
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-02-28 00:02:30 +01:00
Karel Zak 16b73aae8c mount: (new) cleanup mount -a return codes
New return codes:

  0 : all mounted (or all ignored)
 64 : some mounted, some failed
 32 : all failed

Note that already mounted or ignored (filtered out by -t or -O)
filesystems don't affect the final return code.

The original mount(8) returns 0 instead of 64, so the situation
"some mounted, some failed" cannot be detected.

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-02-24 23:17:06 +01:00
Davidlohr Bueso f9bd085879 sys-utils: fix typos
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2012-02-24 14:15:40 +01:00
Petr Uzel 26c15246f2 losetup: add --detach-all to the list of options
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2012-02-24 14:13:47 +01:00
Sami Kerola 7cebf0bb4f docs: corrections to FSF license files, and postal address
The COPYING and Documentation/licenses/COPYING* files are being
replaced by files from GNU web site.

http://www.gnu.org/licenses/gpl-2.0.txt
http://www.gnu.org/licenses/lgpl-2.1.txt

Postal addresses to FSF in other files are updated to match with the
address in license files.

Reference: http://lists.gnu.org/archive/html/freefont-announce/2005-04/msg00001.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-02-24 14:13:35 +01:00
Petr Uzel 96cf9d07af cytune.8: fix formatting
W: manual-page-warning /usr/share/man/man8/cytune.8.gz 178: warning:
macro `chars',' not defined (possibly missing space after `ch')

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2012-02-22 11:52:04 +01:00
Karel Zak bc87f88512 unshare: add note about MS_SHARED to unshare.1
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-02-21 15:32:50 +01:00
Harald Hoyer 37305c65e7 setsid: add "+" to getopt_long()
otherwise setsid wants to interpret <program> arguments

$ setsid sh -i
setsid: invalid option -- 'i'

Usage:
 setsid [options] <program> [arguments ...]

Signed-off-by: Harald Hoyer <harald@redhat.com>
2012-02-09 15:33:33 +01:00
Sami Kerola 0b077eab51 tunelp: free allocation, use xalloc
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-02-08 14:29:34 +01:00
Sami Kerola dd41e06795 switch_root: close open file after usage [cppcheck]
[sys-utils/switch_root.c:159]: (error) Resource leak: cfd

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-02-08 14:23:28 +01:00
Sami Kerola 4b11df2cf5 chcpu: use appropriate variable type [cppcheck]
[sys-utils/chcpu.c:251]: (style) Checking if unsigned variable 'maxcpus' is less than zero.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-02-08 14:17:29 +01:00
Paul Menzel 1f338fe170 flock: add missing word »be« to flock.1 2012-02-08 11:49:03 +01:00
Paul Menzel 387bae9350 flock: fix flock.1 grammar by removing »s« 2012-02-08 11:48:44 +01:00
Karel Zak ad655c88ff lscpu: fix fd leak
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-02-02 12:32:45 +01:00
Karel Zak 701e2b8e53 chcpu: check get_max_number_of_cpus() result properly
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-02-01 12:26:32 +01:00
Karel Zak f8ff4ebb15 swapon: add break to keep static analysers happy 2012-01-31 20:59:54 +01:00
Karel Zak 7e1b144664 umount: add missing break
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-31 20:58:30 +01:00
Karel Zak 960bf13048 lscpu: dereferencing NULL pointer [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-31 15:00:52 +01:00
Karel Zak 0f2d647611 umount: (new) fix resource leak [coverity scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-30 23:49:23 +01:00
Karel Zak 25609ee1be mount: (new) fix resource leak [coverity scan]
well, this is free-before-exit, but let's use mount(8) as test
application for libmount and keep it without leaks.

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-30 23:49:15 +01:00
Dave Reisner b8c0f4fba3 mount: define fallback selinux_warning macro with 2 params
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-01-30 12:32:00 +01:00
Karel Zak c633953cfe mount: (new) add more info about --stab to mount.8
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-24 11:40:15 +01:00
Karel Zak 9354fea342 libmount: remove fstab.d support
If you really need to store your configuration to a alternative files
then you have to explicitly specify the files or directories on
mount(8) command line by --fstab option.

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-24 11:16:53 +01:00
Karel Zak 60a2a323f5 mount: (new) add --fstab to the man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-23 20:52:19 +01:00
Karel Zak 64b6bc4ff0 mount: (new) add --fstab <path> option
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-23 20:31:23 +01:00
Karel Zak ac8ecab4be mount: add info about libmount features to --version output
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-23 12:28:05 +01:00
Karel Zak 73f9a11404 umount: (new) use the same exit codes as mount(8)
Note that old umount(8) uses 0 and 1 exit codes, and some
exceptions like 4 or 32.

The new umount(8) cleanups this mess and uses the same exit codes as
mount(8) (see mount(8) man page).

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-23 11:15:41 +01:00
Karel Zak 497d2ce7ea mount: (new) share exit codes by include/exitcodes.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-23 10:55:35 +01:00
Karel Zak 2e86597f83 mount: (new) add source/target to error messages
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-20 14:17:08 +01:00
Karel Zak d946359a5b mount: (new) improve mount -a exist codes and erroer messages
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-20 13:47:08 +01:00
Karel Zak 4e45dfb9a6 mount: (new) add selinux warning
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-20 13:14:26 +01:00
Karel Zak 1bbf820377 flock: fix sizeof usage [clang -Wsizeof-pointer-memaccess]
flock.c:90:23: warning: argument to 'sizeof' in 'memset' call is the
same expression as the destination; did you mean to dereference it?
      [-Wsizeof-pointer-memaccess]
        memset(sa, 0, sizeof sa);
               ~~            ^~

Reported-by: Francesco Cosoleto <cosoleto@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-19 19:30:31 +01:00
Karel Zak 8cfd1ffb7a dmesg: fix non-ANSI function declaration [smatch scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-17 16:50:17 +01:00
Karel Zak 56dec8b7f4 mount: fix compiler warnings [-Wunused-parameter -Wunused-variable]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-17 16:40:37 +01:00
Karel Zak a3b421dfac losetup: fix compiler warnings [-Wpointer-sign -Wformat]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-17 16:36:55 +01:00
Karel Zak 01663a53f1 mount: remove duplicate includes
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-17 16:22:11 +01:00
Dave Reisner aa397ce5e8 mount: avoid canonicalizing pseudofs paths
This fixes a display bug in the new mount wherein a psuedofs existing in
$PWD by name will be resolved and shown as a real mount point.

  $ cd /tmp; mkdir nfsd; mount | grep nfsd
  /tmp/nfsd on /proc/fs/nfsd type nfsd (rw,relatime)

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-01-17 11:11:20 +01:00
Karel Zak 374fd21add libmount: add MNT_OMODE_NOTAB
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-16 14:35:10 +01:00
Karel Zak 8b470b20d7 libmount: avoid duplicate loopdevs
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-16 11:28:05 +01:00
Karel Zak ce43340461 mount: (new) print error messages
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-13 16:29:21 +01:00
Karel Zak 9c79d48bd6 build-sys: suport static build for new [u]mount
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-11 17:54:04 +01:00
Karel Zak ecdba5ddfc build-sys: add --enable-new-mount
Now we have three versions of the mount(8) utility

 * old mount(8)
   --enable-mount [default]

 * old mount(8) linked with libmount
   This is this is necessary for systems without mtab file.
   --enable-libmount-mount

 - new mount(8)
   This is completely new pure-libmount based mount(8).
   --enable-new-mount

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-11 17:05:08 +01:00
Karel Zak 6af8d3d722 losetup: add note about non-root users to losetup.8
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-11 15:45:36 +01:00
Karel Zak 6c503d5916 losetup: move xgetpass() to lib/xgetpass.c
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-11 15:17:06 +01:00
Karel Zak 143635c91f build-sys: move swapon from mount/ to sys-utils/
... to make it independent on mount stuff.

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-11 12:14:29 +01:00
Karel Zak 916bf85e62 losetup: add --partscan option
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-09 23:28:50 +01:00
Davidlohr Bueso 756d79cd63 lscpu: fix compiler warnings
The string format is not being passed triggering:

    lscpu.c: In function ‘read_hypervisor’:
    lscpu.c:545:4: warning: format not a string literal and no format arguments
    lscpu.c: In function ‘get_cell_header’:
    lscpu.c:904:2: warning: format not a string literal and no format arguments
    lscpu.c:904:2: warning: format not a string literal and no format arguments

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2012-01-05 17:09:27 +01:00
Dave Reisner 8290a24952 lscpu: use xalloc libs
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-01-04 13:53:38 +01:00
Karel Zak 934df30dd0 losetup: cleanup headers, cmdline checks
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-12-22 12:20:07 +01:00