Commit Graph

4215 Commits

Author SHA1 Message Date
Karel Zak 8c5eba3e7c findmnt: support multiple --tab-file options
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-23 20:22:11 +01:00
Karel Zak 52f8362841 libmount: support dirs for mnt_table_parse_fstab(), add mnt_table_parse_dir()
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-23 20:20:36 +01:00
Masatake YAMATO b28890b041 libmount: fix a potential memory leak at mnt_table_parse_dir
mnt_table_parse_dir in libmount/src/tab_parse.c calls
scandir, and then opendir. When the latter one, opendir is failed,
buffers allocated in scandir are not released.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2012-01-23 13:54:03 +01:00
Masatake YAMATO 9deeef8e47 libmount: Use filter arg of scandir* to pickup /etc/fstab.d/*.fstab files
This patch is based on my last patch:

     [PATCH 1/2] scandirat based mnt_table_parse_dir implementation

scandir* used in `mnt_table_parse_dir in libmount/src/tab_parse.c
can take filter function as an argument.

`mnt_table_parse_dir' picks up fstab files from namelist returned from
scandir* for itself. However, some parts of picking-up job can be done
in the filter function.

This patch introduces a new function `mnt_table_parse_dir_filter' to
share the code for picking-up job between two implementations of
`mnt_table_parse_dir_filter', scandir based and scandirat based.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2012-01-23 13:53:40 +01:00
Masatake YAMATO 485a8bfa98 libmount: scandirat based mnt_table_parse_dir implementation
In comment of `mnt_table_parse_dir' of libmount/src/tab_parse.c:

	/* TODO: it would be nice to have a scandir() implementation that
	 *       is able to use already opened directory */

Nowadays glibc provides `scandirat'. This patch implements `scandirat'
based `mnt_table_parse_dir'.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2012-01-23 13:52:51 +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 df51de6b37 libmount: export info about library features
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-23 12:27:01 +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 c0d2c6e11c findmnt: add note about LIBMOUNT_* env.variables
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-20 12:47:15 +01:00
Karel Zak 2f1ac44b4b findmnt: revert --fstab behavior, add --tab-file option
The optional argument for -s, --fstab options (--fstab=file) is not
backwardly compatible, because command line with short options (e.g.
findmnt -snr) will be interpreted incorrectly.

This patch removes support for the optional --fstab argument and
introduces a new option --tab-file, for example:

	findmnt --fstab --tab-file=/etc/fstab.foo

Reported-by: Juergen Daubert <jue@jue.li>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-20 12:15:37 +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 abbc7b4a14 build-sys: improve ko-release-* scripts
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-19 13:15:03 +01:00
Karel Zak 704d6ddbd0 build-sys: add ko-release-push script
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-19 10:51:48 +01:00
Karel Zak a3f225678f build-sys: add ko-release-gen script
The script creates directory kernel.org/v<version>/, copy .xz tarball,
changelog, release notes and docs to the directory and sign all files by
gpg.

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-19 10:48:16 +01:00
Karel Zak 748c010f07 build-sys: improve changelog target
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-19 10:32:32 +01:00
Karel Zak 47fb10792a build-sys: add changelog target
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-18 21:29:52 +01:00
Karel Zak df5f3c5401 build-sys: enable .xz, disable .gz
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-18 20:10:44 +01:00
Karel Zak e6e5b7dcf4 build-sys: release++ (v2.21-rc1)
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-18 14:22:17 +01:00
Karel Zak a6ec840a17 docs: add v2.21 ReleaseNotes
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-18 14:20:09 +01:00
Karel Zak b9960a5e5d docs: update AUTHORS file
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-18 11:39:05 +01:00
Karel Zak 3406942ed2 po: merge changes
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-18 11:31:55 +01:00
Takeshi Hamasaki 598fcedac4 po: update ja.po (from translationproject.org) 2012-01-18 11:26:08 +01:00
David Prévot 82acaf5c87 po: update fr.po (from translationproject.org) 2012-01-18 11:25:50 +01:00
Petr Pisar 65c80fc5d3 po: update cs.po (from translationproject.org) 2012-01-18 11:25:50 +01:00
Karel Zak 43608256ca build-sys: add sleepexit from login.c to smatch non-return functions
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-17 17:32:32 +01:00
Karel Zak c9c1304d1d hwclock: remove non-ANSI function declaration [smatch scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-17 17:29:55 +01:00
Karel Zak 3d4820f4d1 fsck: make fs->type usage more robust [smatch scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-17 17:28:46 +01:00
Karel Zak 16bd802561 blockdev: remove non-ANSI function declaration [smatch scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-17 17:23:01 +01:00
Karel Zak 0208ae2e0c libmount: fix bugs detected by [smatch scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-17 17:16:57 +01:00
Karel Zak 5aa74dc747 build-sys: use $(MAKE) for checksmatch
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-17 17:13:38 +01:00
Karel Zak aa1f95c3d0 losetup: make xgetpass more robust
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-17 17:02:34 +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 6e0e1394c4 line: fix compiler warnings [-Wunused-parameter]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-17 16:45:58 +01:00
Karel Zak 7d5fb52be3 mount: fix __attribute__ keyword
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-17 16:43:45 +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 b2ddfb59c1 libmount: fix compiler warnings [-Wuninitialized -Wformat]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-17 16:33:19 +01:00
Karel Zak 94283c9a77 libmount: fix compiler warnings [-Wsign-compare]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-17 16:31:45 +01:00
Karel Zak 64f2915843 sfdisk: fix poor coding style
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-17 16:27:06 +01:00
Karel Zak baec3e4913 fdisk: fix poor coding style
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-17 16:26:08 +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
Karel Zak a13e99840d lib,loopdev: remove duplicate includes
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-17 16:21:56 +01:00
Karel Zak 3fb184d20b sfdisk: remove duplicate includes
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-17 16:21:33 +01:00
Karel Zak c1f3576e0a libmount: ignore "defaults" mount option
... thanks to regression test!

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-17 16:12:04 +01:00
Karel Zak b69719b624 sfdisk: add note about alignment to the man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-17 15:48:20 +01:00
Karel Zak 096ff740a8 cfdisk: add note about alignment to the man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-17 15:48:14 +01:00