Commit Graph

4051 Commits

Author SHA1 Message Date
Karel Zak ede8a60e05 libmount: add "+" prefix for options pattern (e.g findmnt -O)
Examples:

 * findmnt --fstab -O noauto
   Returns all entries where is not "auto" option (including entries
   with "noauto" option.

 * findmnt --fstab -O +noauto
   Returns all entries where is literally "noauto" option.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=758457
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-12-01 18:28:42 +01:00
Karel Zak 190c342a83 libmount: add -a to umount(8) sample
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-12-01 16:47:26 +01:00
Karel Zak 085f163b52 libmount: add mnt_context_umount_next()
This is "umount -a" backend.

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-12-01 16:45:53 +01:00
Karel Zak b3f7a0ec3e libmount: improve verbose message
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-12-01 16:42:42 +01:00
Karel Zak 914c8b7102 Merge branch 'login-utils' of https://github.com/kerolasa/lelux-utiliteetit
* 'login-utils' of https://github.com/kerolasa/lelux-utiliteetit: (23 commits)
  last: fix few compiler warnings
  setpwnam: remove non-ANSI definitions [smatch scan]
  last: possible buffer overflow fixed [smatch scan]
  vipw: fix coding style
  setpwnam: fix coding style
  selinux_utils: fix coding style
  newgrp: fix coding style
  logindefs: fix coding style
  islocal: fix coding style
  chsh: fix coding style
  chfn: fix coding style
  chfn, setpwnam: let config.h be in control of extensions in use
  chfn, chsh: new file pamfail.h for error printing
  chsh: build bug: do not override config.h definition
  chfn, chsh, setpwnam: get true/false from stdbool.h
  login: add version printing option
  newgrp: add version and help options
  vipw: stop printing non-sense version string
  vipw: use libc error printing facilities
  chsh: use libc error printing facilities
  ...
2011-11-29 19:02:42 +01:00
Karel Zak db216e68fa libmount: add new exprimental umount(8)
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-11-29 19:02:27 +01:00
Karel Zak 732a631126 include,optutils: add option_to_longopt()
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-11-29 18:21:49 +01:00
Karel Zak e4c92d0617 libmount: use USAGE_* from mount(8) sample
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-11-29 18:06:21 +01:00
Sami Kerola 5818a4aa9e last: fix few compiler warnings
Calling abort() as default seems appropriate as the default should be
impossible to reach.

last.c:355:3: warning: switch missing default case [-Wswitch-default]

And simple line removals.

last.c:110:13: warning: redundant redeclaration of 'optind' [-Wredundant-decls]
last.c:111:15: warning: redundant redeclaration of 'optarg' [-Wredundant-decls]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-29 17:58:00 +01:00
Sami Kerola 0d13273180 setpwnam: remove non-ANSI definitions [smatch scan]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-29 17:58:00 +01:00
Sami Kerola 889df821e3 last: possible buffer overflow fixed [smatch scan]
last.c +447 ttyconv(11) error: buffer overflow '(arg)' 3 <= 3

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-29 17:58:00 +01:00
Sami Kerola 06eafe470d vipw: fix coding style
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-29 17:58:00 +01:00
Sami Kerola 7ff9c2aa8f setpwnam: fix coding style
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-29 17:58:00 +01:00
Sami Kerola fd2940f58d selinux_utils: fix coding style
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-29 17:58:00 +01:00
Sami Kerola b7cfaaf85b newgrp: fix coding style
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-29 17:58:00 +01:00
Sami Kerola 3f9c237dcb logindefs: fix coding style
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-29 17:58:00 +01:00
Sami Kerola 43b53f57c1 islocal: fix coding style
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-29 17:58:00 +01:00
Sami Kerola 0a065b7ae6 chsh: fix coding style
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-29 17:58:00 +01:00
Sami Kerola 3ca1029905 chfn: fix coding style
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-29 17:58:00 +01:00
Sami Kerola e55b7a8f2f chfn, setpwnam: let config.h be in control of extensions in use
The autotools will set _GNU_SOURCE which removes necessity to have
any _*_SOURCE definition in *.c files.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-29 17:58:00 +01:00
Sami Kerola 57b35f3ba7 chfn, chsh: new file pamfail.h for error printing
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-29 17:57:39 +01:00
Karel Zak 6189ace369 libmount: add sanitize_env() to mount(8) sample
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-11-29 17:36:39 +01:00
Karel Zak 2492f71341 libmount: remove magic constatnt from mount(8)
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-11-29 16:58:44 +01:00
Karel Zak 21fd9cb0d7 docs: add x-mount-mkdir to TODO file
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-11-29 14:57:28 +01:00
Dennis Jensen 9c62a2326e agetty: map NL to CR-NL on output in initial termiossettings
From: Jacoby Hickerson <hickersonjl@gmail.com>
Signed-off-by: Dennis Jensen <dennis.h.jensen@siemens.com>
2011-11-28 10:34:39 +01:00
Karel Zak 5018dc3d86 Merge branch 'master' of https://github.com/maurizio-lombardi/util-linux
* 'master' of https://github.com/maurizio-lombardi/util-linux:
  mkfs.minix: The total number of zones is limited to 65536 only on V1 filesystems
  mkfs.minix: Some bug fixes:
  mkfs.minix: The s_blocksize field of the MinixV3 superblock must be initialized with a valid block size, not the total number of blocks of the device!
  mkfs.minix: inode numbers are 32-bit wide in V3 filesystems
  mkfs.minix: In Minix V3 filesystems the maximum filename lenght is 60 chars and the dirsize is 64 bytes.
  mkfs.minix: Fix super_set_nzones()
  mkfs.minix: remove redundant code
2011-11-28 10:23:04 +01:00
Karel Zak b483debb64 libmount: fix compiler warning [-Wimplicit-function-declaration]
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-11-28 10:19:32 +01:00
Karel Zak d27ff34944 do: fix czech LABEL= translation
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-11-25 10:38:16 +01:00
Sami Kerola 7299ca031d chsh: build bug: do not override config.h definition
The ONLY_LISTED_SHELLS is defined by --disable-chsh-only-listed
configuration option.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-23 21:52:50 +01:00
Sami Kerola 8187b555df chfn, chsh, setpwnam: get true/false from stdbool.h
Requires C99, which should not be a problem.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-23 21:50:17 +01:00
Sami Kerola 0effd19e00 login: add version printing option
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-23 21:37:19 +01:00
Sami Kerola e947e27360 newgrp: add version and help options
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-23 21:37:19 +01:00
Sami Kerola 92ba78e24d vipw: stop printing non-sense version string
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-23 21:37:19 +01:00
Sami Kerola 81c8a46f57 vipw: use libc error printing facilities
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-23 21:37:19 +01:00
Sami Kerola 8fed34e5a1 chsh: use libc error printing facilities
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-23 21:37:19 +01:00
Sami Kerola fbff9d7996 chsh: align with howto-usage-function.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-23 21:37:19 +01:00
Sami Kerola b9364124f8 chfn: use libc error printing facilities
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-23 21:35:26 +01:00
Sami Kerola 85b6104da5 chfn: align with howto-usage-function.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-11-23 21:20:11 +01:00
Karel Zak f75b8e5cdf fallocate: clean up fallbacks for FALLOC_FL_* flags
Reported-by: Voelker, Bernhard <bernhard.voelker@siemens-enterprise.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-11-23 15:19:20 +01:00
Karel Zak 13b3e7796b tests: add mkfs.carmfs test for small FS with duplicate files
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-11-23 14:10:56 +01:00
Arnaud Mouiche 8b472bfa73 small bug in mkfs.cramfs + patch
mkfs.cramfs on version v2.17.2 has a small bug when dealing with very small
filesystems.  look at upstream code on git, and the issue is still here.
ex:

         $ cd /tmp
         $ mkdir content
         $ echo hello > content/a
         $ echo hello > content/b
         $ mkfs.cramfs content content.cramfs
         not enough space allocated for ROM image (4090 allocated, 4096 used)

Here is a patch for fixing (simply rounding to page size AFTER eleminating
doubles).

Signed-off-by: Arnaud Mouiche <arnaud.mouiche@invoxia.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-11-23 13:29:32 +01:00
Cong Wang 411fd3c27a fallocate: add FALLOC_FL_PUNCH_HOLE support
Recent Linux kernel supports FALLOC_FL_PUNCH_HOLE in fallocate(2).
This patch adds FALLOC_FL_PUNCH_HOLE support to fallocate utility,
by introducing a new option -p|--punch-hole.

[kzak@redhat.com: - fix merge conflict in fallocate.1]

Cc: Karel Zak <kzak@redhat.com>
Cc: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-11-23 13:12:48 +01:00
Jim Meyering 1023db5015 prlimit: s/amount/number/ 2011-11-23 12:52:36 +01:00
Bernhard Voelker 53e1f461f9 prlimit: add support for executing a command
prlimit.c: Alternatively to applying the limits to an existing process via the
--pid option, allow a command to be executed. Adapted usage() accordingly.

prlimit.1: mention new syntax.

Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
2011-11-23 12:11:46 +01:00
Francesco Cosoleto 0459a7b389 libblkid: fix mac partition detection
This fixes the buffer length passed to blkid_probe_get_buffer() calls,
and the block size byte order (on little-endian systems).

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
2011-11-22 16:58:25 +01:00
Masatake YAMATO d8ebc83ff2 mount: enable fstab.d
This patch makes mount command read fstab.d/*.fstab if the command
is built with --enable-libmount-mount.

[kzak@redhat.com: - add some info to fstab.5 and mount.8 man pages
                  - use error callback for tab parser]

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-11-22 15:43:20 +01:00
Maurizio Lombardi 57ba4027a5 mkfs.minix: The total number of zones is limited to 65536 only on V1 filesystems 2011-11-21 20:30:40 +01:00
Maurizio Lombardi de5326095a mkfs.minix: Some bug fixes:
- Fix root inode initialization
- In V3 filesystems the maximum number of inodes is not 65536 but 2^32.
2011-11-21 20:16:57 +01:00
Maurizio Lombardi a54d258f8c mkfs.minix: The s_blocksize field of the MinixV3 superblock must be
initialized with a valid block size, not the total number of blocks
of the device!
2011-11-21 20:00:48 +01:00
Maurizio Lombardi caa9cc8613 mkfs.minix: inode numbers are 32-bit wide in V3 filesystems 2011-11-21 19:52:03 +01:00