]> err.no Git - util-linux/log
util-linux
17 years agotests: code refactoring -- new ts_skip_nonroot function
Karel Zak [Tue, 15 May 2007 22:41:14 +0000 (00:41 +0200)]
tests: code refactoring -- new ts_skip_nonroot function

The patch moves "if $UID != 0" test to a new function. That's better
than duplicate the code on many places.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: fix dependence on blkid
Karel Zak [Tue, 15 May 2007 10:34:39 +0000 (12:34 +0200)]
tests: fix dependence on blkid

The util-linux-ng tests have to be useful with blkid and also with
volume_id.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: fsprobe: add libvolume_id support
Karel Zak [Mon, 14 May 2007 22:52:07 +0000 (00:52 +0200)]
mount: fsprobe: add libvolume_id support

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: fsprobe: add libvolume_id support to configure.ac
Karel Zak [Wed, 9 May 2007 15:35:27 +0000 (17:35 +0200)]
mount: fsprobe: add libvolume_id support to configure.ac

The patch add new option --with-fsprobe=<name> (where the <name> is
blkid or volume_id). The blkid is default. The mount cannot be
compiled without a filesystem detection library.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: fix has_* functions (CVE-2007-0822)
Karel Zak [Mon, 14 May 2007 22:22:56 +0000 (00:22 +0200)]
mount: fix has_* functions (CVE-2007-0822)

The functions have to check for NULL pointer.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: fsprobe: use blkid cache only when really necessary
Karel Zak [Thu, 10 May 2007 10:10:57 +0000 (12:10 +0200)]
mount: fsprobe: use blkid cache only when really necessary

The blkid_get_cache() parses /etc/blkid.tab, it's better do it only
when we really need to resolve a spec (label or uuid).

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: fsprobe: make fsprobe_get_devname functions more generic
Karel Zak [Mon, 14 May 2007 12:31:28 +0000 (14:31 +0200)]
mount: fsprobe: make fsprobe_get_devname functions more generic

The blkid supports NAME=value parsing, but use the library for
this simple task is overkill. (The libblkid requires initialized
blkid cache all time, for all calls.)

This patch makes the fsprobe_get_devname_for_mounting() and
fsprobe_get_devname() generic for all fsprobe implementations.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: fsprobe: rename the rest of API routines to fsprobe_*
Karel Zak [Thu, 10 May 2007 09:21:35 +0000 (11:21 +0200)]
mount: fsprobe: rename the rest of API routines to fsprobe_*

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: fsprobe: remove mount_guess_fstype.{c,h}
Karel Zak [Wed, 9 May 2007 23:47:28 +0000 (01:47 +0200)]
mount: fsprobe: remove mount_guess_fstype.{c,h}

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: fsprobe: remove non-blkid code
Karel Zak [Wed, 9 May 2007 14:29:27 +0000 (16:29 +0200)]
mount: fsprobe: remove non-blkid code

This patch removes old FS detection code and enables
blkid code only when HAVE_BLKID is defined.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: fsprobe: rename files to fsprobe_*
Karel Zak [Wed, 9 May 2007 13:38:16 +0000 (15:38 +0200)]
mount: fsprobe: rename files to fsprobe_*

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agodisk-utils: fix libuuid usage in mkswap
Matthias Koenig [Mon, 7 May 2007 08:56:50 +0000 (10:56 +0200)]
disk-utils: fix libuuid usage in mkswap

Fix libuuid usage in mkswap.

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
17 years agosys-utils: fix man page headers
Karel Zak [Wed, 16 May 2007 11:55:02 +0000 (13:55 +0200)]
sys-utils: fix man page headers

The man pages have been moved from man8 to man1, but the
headers still refer to man1.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agodocs: refresh AUTHORS file
Karel Zak [Wed, 16 May 2007 11:42:07 +0000 (13:42 +0200)]
docs: refresh AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: kill mount_guess_rootdev
Stepan Kasal [Tue, 15 May 2007 19:57:10 +0000 (21:57 +0200)]
mount: kill mount_guess_rootdev

It's not used.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: add AC_GNU_SOURCE
Karel Zak [Wed, 16 May 2007 10:56:28 +0000 (12:56 +0200)]
build-sys: add AC_GNU_SOURCE

The widechar code doesn't compile correctly without _GNU_SOURCE (at
least according to reports from testers. I don't see the problem on
FC6.)

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agobuild-sys: remove -fomit-frame-pointer
Karel Zak [Wed, 16 May 2007 09:58:22 +0000 (11:58 +0200)]
build-sys: remove -fomit-frame-pointer

The -fomit-frame-pointer option makes debugging impossible on some
machines. It is automatically enabled by -O<n> optimizations.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agobuild-sys: add Automake option dist-bzip2
Stepan Kasal [Tue, 15 May 2007 18:46:34 +0000 (20:46 +0200)]
build-sys: add Automake option dist-bzip2

We distribute .tar.bz2 along with .tar.gz .

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: in configure.ac, change "po" -> "$srcdir/po"
Stepan Kasal [Tue, 15 May 2007 18:46:33 +0000 (20:46 +0200)]
build-sys: in configure.ac, change "po" -> "$srcdir/po"

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: use dist_noinst_HEADERS in include/Makefile.am
Stepan Kasal [Tue, 15 May 2007 18:46:31 +0000 (20:46 +0200)]
build-sys: use dist_noinst_HEADERS in include/Makefile.am

It is slightly more appropriate.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: in the clean targets use "find ... | xargs rm -f"
Stepan Kasal [Tue, 15 May 2007 18:46:30 +0000 (20:46 +0200)]
build-sys: in the clean targets use "find ... | xargs rm -f"

"find ... -exec rm {}" is unnecessarily slow.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: remove po/Makevars.template from EXTRA_DIST
Stepan Kasal [Tue, 15 May 2007 18:46:29 +0000 (20:46 +0200)]
build-sys: remove po/Makevars.template from EXTRA_DIST

The is no point in distributing it.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: remove config/include-Makefile.am from EXTRA_DIST
Stepan Kasal [Tue, 15 May 2007 18:46:28 +0000 (20:46 +0200)]
build-sys: remove config/include-Makefile.am from EXTRA_DIST

It gets distributed automaticaly.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: do not use wildcards in EXTRA_DIST
Stepan Kasal [Tue, 15 May 2007 18:46:27 +0000 (20:46 +0200)]
build-sys: do not use wildcards in EXTRA_DIST

Wildcards in EXTRA_DIST break "make dist" for vpath build.
But plain directory names are ok.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: use dist_usrbinexec_SCRIPTS in misc-utils/Makefile.am
Stepan Kasal [Tue, 15 May 2007 18:46:26 +0000 (20:46 +0200)]
build-sys: use dist_usrbinexec_SCRIPTS in misc-utils/Makefile.am

A slightly more concise way to distribute the script "reset".

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: let configure instantiate the misc-utils/*.pl scripts
Stepan Kasal [Tue, 15 May 2007 18:46:25 +0000 (20:46 +0200)]
build-sys: let configure instantiate the misc-utils/*.pl scripts

The substitution of @PERL@ is most done with AC_CONFIG_FILES.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: --prefix defaults to /usr
Stepan Kasal [Tue, 15 May 2007 18:46:24 +0000 (20:46 +0200)]
build-sys: --prefix defaults to /usr

Use prefix=/usr as the default setting.  If prefix is /usr, make
bindir and sbindir default to /bin and /sbin, respectively.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: set DISTCHECK_CONFIGURE_FLAGS in top-level makefile
Stepan Kasal [Tue, 15 May 2007 18:46:23 +0000 (20:46 +0200)]
build-sys: set DISTCHECK_CONFIGURE_FLAGS in top-level makefile

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: make the getopt example directory relative to datadir
Stepan Kasal [Tue, 15 May 2007 18:46:22 +0000 (20:46 +0200)]
build-sys: make the getopt example directory relative to datadir

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: amend .gitignore
Stepan Kasal [Tue, 15 May 2007 18:46:21 +0000 (20:46 +0200)]
build-sys: amend .gitignore

Add several built files to .gitignore files.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: remove swapargs.h, move the tests to main configure.ac
Stepan Kasal [Tue, 15 May 2007 18:46:20 +0000 (20:46 +0200)]
build-sys: remove swapargs.h, move the tests to main configure.ac

Do not use header swapargs.h, generated by script swap.configure;
use the standard AC_DEFINE method in configure.ac.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: replace AC_TRY_* by AC_*_IFELSE
Stepan Kasal [Tue, 15 May 2007 18:46:19 +0000 (20:46 +0200)]
build-sys: replace AC_TRY_* by AC_*_IFELSE

The AC_TRY_* macros are deprecated.  Following the suggestion from
autoupdate, I have replaced them by AC_*_IFELSE.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: s/AC_HELP_STRING/AS_HELP_STRING/
Stepan Kasal [Tue, 15 May 2007 18:46:18 +0000 (20:46 +0200)]
build-sys: s/AC_HELP_STRING/AS_HELP_STRING/

The macro has been renamed.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: do not use internal Autoconf variables
Stepan Kasal [Tue, 15 May 2007 18:46:17 +0000 (20:46 +0200)]
build-sys: do not use internal Autoconf variables

This is a cleanup of configure.ac removing the internal ac_cv_*
variables.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: merge adjacent AC_CONFIG_HEADERS and AC_CONFIG_FUNCS calls
Stepan Kasal [Tue, 15 May 2007 18:46:16 +0000 (20:46 +0200)]
build-sys: merge adjacent AC_CONFIG_HEADERS and AC_CONFIG_FUNCS calls

Merge adjacent calls to AC_CONFIG_HEADERS--the generated configure is
then smaller.  Likewise for AC_CONFIG_FUNCS.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: move -D flags to *_CPPFLAGS
Stepan Kasal [Tue, 15 May 2007 18:46:15 +0000 (20:46 +0200)]
build-sys: move -D flags to *_CPPFLAGS

Preprocessor options belong to *_CPPFLAGS; add $(AM_CPPFLAGS) as we
want to amend it, not override.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: do not set with_foo twice
Stepan Kasal [Tue, 15 May 2007 18:46:14 +0000 (20:46 +0200)]
build-sys: do not set with_foo twice

It's redundant to set with_slang=$withval, and similar.
(Inspect the generated configure; it contains
  withval=$with_slang; with_slang=$withval
:-)

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agoswapon: simplify an #if
Stepan Kasal [Tue, 15 May 2007 18:46:13 +0000 (20:46 +0200)]
swapon: simplify an #if

Replace two immerced #ifdef's by an #if with a compound conditional.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: use dist_noinst_DATA to work around the bug with dist_man_MANS
Stepan Kasal [Tue, 15 May 2007 18:46:12 +0000 (20:46 +0200)]
build-sys: use dist_noinst_DATA to work around the bug with dist_man_MANS

Automake mishandles dist_man_MANS.  Using dist_noinst_DATA to work
around this is more elegant than using dist-hook.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: simplify "clean" in tests/Makefile.am
Stepan Kasal [Tue, 15 May 2007 18:46:11 +0000 (20:46 +0200)]
build-sys: simplify "clean" in tests/Makefile.am

The construction with "distclean-local" does not seem necessary.
Moreover, Automake complains when "clean" is redefined.

Simply put the rm to "clean-local".

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: use dist_example_DATA
Stepan Kasal [Tue, 15 May 2007 18:46:10 +0000 (20:46 +0200)]
build-sys: use dist_example_DATA

"dist_" prefix is more elegant than EXTRA_DIST.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: mount/Makefile.am tiny cleanup II
Stepan Kasal [Tue, 15 May 2007 18:46:09 +0000 (20:46 +0200)]
build-sys: mount/Makefile.am tiny cleanup II

Style change: init the *_LDADD vars, then amend them with +=.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: do not build convenience libraries in lib/
Stepan Kasal [Tue, 15 May 2007 18:46:08 +0000 (20:46 +0200)]
build-sys: do not build convenience libraries in lib/

Build lib/*.c individually for each project which uses it, so that the
right set of flags is applied each time.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: mount/Makefile.am tiny cleanup
Stepan Kasal [Tue, 15 May 2007 18:46:07 +0000 (20:46 +0200)]
build-sys: mount/Makefile.am tiny cleanup

Major part of mount_SOURCES and umount_SOURCES is the same; factor it
out to a new make variable.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: remove AC_PROG_RANLIB
Stepan Kasal [Tue, 15 May 2007 18:46:06 +0000 (20:46 +0200)]
build-sys: remove AC_PROG_RANLIB

libtoolize (1.5.16) says it's now obsolete.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: declare SUID_CFLAGS and SUID_LDFLAGS as precious
Stepan Kasal [Tue, 15 May 2007 18:46:05 +0000 (20:46 +0200)]
build-sys: declare SUID_CFLAGS and SUID_LDFLAGS as precious

Use AC_ARG_VAR to declare the variables SUID_CFLAGS and SUID_LDFLAGS as
precious.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: fix the example configure call in README
Stepan Kasal [Tue, 15 May 2007 18:46:04 +0000 (20:46 +0200)]
build-sys: fix the example configure call in README

Adapt the example to pass the variables as arguments to the configure
script, as this is the prefered way.  And a few cosmetic changes to the
paragraph.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: add SUID_LDFLAGS
Stepan Kasal [Tue, 15 May 2007 18:46:03 +0000 (20:46 +0200)]
build-sys: add SUID_LDFLAGS

Programs which are usually installed with the setuid bit do need their own
CFLAGS and LDFLAGS.  SUID_LDFLAGS is analogic to SUID_CFLAGS.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: do not play with DEFS, use AM_CPPFLAGS
Stepan Kasal [Tue, 15 May 2007 18:46:02 +0000 (20:46 +0200)]
build-sys: do not play with DEFS, use AM_CPPFLAGS

If a -D flag is needed, it belongs to AM_CPPFLAGS.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: move the optimization flags to AM_CFLAGS
Stepan Kasal [Tue, 15 May 2007 18:46:01 +0000 (20:46 +0200)]
build-sys: move the optimization flags to AM_CFLAGS

The optimization flags are not preprocessor flags.
Moreover, CPPFLAGS and CFLAGS shall be overridable at make time, the
configure script shall not touch them.
Setting AM_CFLAGS in config/include-Makefile.am seems to be TRW.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: do not kick off AM_CFLAGS by SUID_CFLAGS
Stepan Kasal [Tue, 15 May 2007 18:46:00 +0000 (20:46 +0200)]
build-sys: do not kick off AM_CFLAGS by SUID_CFLAGS

SUID_CFLAGS are not meant to override the makefile-wide AM_CFLAGS.
(We do not use AM_CFLAGS currently, but we will.)

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: update po/POTFILES.in
Stepan Kasal [Tue, 15 May 2007 18:45:59 +0000 (20:45 +0200)]
build-sys: update po/POTFILES.in

Remove mount/nfsmount* files from po/POTFILES.in .

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agomount: remove nfsmount() from sundries.h
Karel Zak [Thu, 10 May 2007 13:18:01 +0000 (15:18 +0200)]
mount: remove nfsmount() from sundries.h

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: remove all NFS code
Karel Zak [Wed, 9 May 2007 11:25:16 +0000 (13:25 +0200)]
mount: remove all NFS code

Use /sbin/{u,}mount.nfs{,4} from nfs-utils! The mount command
will use these to mount nfs filesystems instead of internal code.

The /sbin/{u,}mount.nfs{,4} is supported from nfs-utils-1.1.0
(currently -rc1).

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agobuild-sys: fix the final message of autogen.sh
Stepan Kasal [Mon, 7 May 2007 18:06:39 +0000 (20:06 +0200)]
build-sys: fix the final message of autogen.sh

The message shall not recommend calling ./configure when srcdir != "." .

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: call automake after autoconf
Stepan Kasal [Mon, 7 May 2007 18:06:06 +0000 (20:06 +0200)]
build-sys: call automake after autoconf

"automake" calls "autoconf" internally, to trace the expansion of
configure.ac.  So it is more natural to call "autoconf" before
"automake".

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agobuild-sys: remove config.h.in from VCS
Stepan Kasal [Mon, 7 May 2007 17:30:57 +0000 (19:30 +0200)]
build-sys: remove config.h.in from VCS

config.h.in is generated, no need to keep it.

Signed-off-by: Stepan Kasal <skasal@redhat.com>
17 years agomount: add support for context, fscontext and defcontext selinux mount options
Karel Zak [Fri, 4 May 2007 09:05:51 +0000 (11:05 +0200)]
mount: add support for context, fscontext and defcontext selinux mount options

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: use realloc for xstrconcat functions
Karel Zak [Fri, 4 May 2007 07:14:04 +0000 (09:14 +0200)]
mount: use realloc for xstrconcat functions

Everywhere in code is

s = xstrconcat3(s, t, u);

that's nonsense use malloc(new_s); free(s); return new_s;

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: use growable string for options
Karel Zak [Thu, 3 May 2007 12:16:24 +0000 (14:16 +0200)]
mount: use growable string for options

The parse_opt() routine uses fixed size of string for mount options.
This is useless for future selinux options where is not well defined
size of selinux context name.

The patch also makes code more readable and all option-string
operations share same code.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: avoid duplicate entries in mtab when mount -f
Karel Zak [Mon, 30 Apr 2007 22:28:08 +0000 (00:28 +0200)]
mount: avoid duplicate entries in mtab when mount -f

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add mount -o remount test
Karel Zak [Thu, 26 Apr 2007 20:25:13 +0000 (22:25 +0200)]
tests: add mount -o remount test

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add mount --move test
Karel Zak [Thu, 26 Apr 2007 13:10:00 +0000 (15:10 +0200)]
tests: add mount --move test

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: doesn't rpc_pipefs and nfsd on umount -a
Karel Zak [Thu, 26 Apr 2007 09:06:44 +0000 (11:06 +0200)]
mount: doesn't rpc_pipefs and nfsd on umount -a

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: fix list logic in update_mtab
Karel Zak [Wed, 25 Apr 2007 23:49:28 +0000 (01:49 +0200)]
mount: fix list logic in update_mtab

If mtab does not contain the new entry, then only mc0->prev is updated
to point to absent, but not the old mc0->prev's nxt pointer.  Because
we then use the nxt pointers to write the new mtab, absent is not
added to the new mtab.

(Note: fortunately, the mount doesn't use the update_mtab() for new
mounts, but for remount, move and umount only -- kzak)

If mtab is empty, absent->prev should be set to mc0, and not
mc0->prev, as it will be NULL.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: fix memory usage in update_mtab
Mike Frysinger [Fri, 13 Apr 2007 11:54:38 +0000 (07:54 -0400)]
mount: fix memory usage in update_mtab

The update_mtab deallocates memory which was allocated by caller. It's nice
opportunity for double-free errors.

The patch fix a memory leak if we have to abort before mc0 are freed.  The
patch also fix a memory leak when we deallocate old (umounted) entry.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: do not treat arm/sparc specially.
Mike Frysinger [Fri, 13 Apr 2007 11:19:39 +0000 (07:19 -0400)]
mount: do not treat arm/sparc specially.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
17 years agomount: don't umount sysfs when running umount -a
Mike Frysinger [Fri, 13 Apr 2007 11:15:44 +0000 (07:15 -0400)]
mount: don't umount sysfs when running umount -a

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
17 years agopo: typo in french translation of mount error.
Mike Frysinger [Fri, 13 Apr 2007 11:11:44 +0000 (07:11 -0400)]
po: typo in french translation of mount error.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
17 years agomount: fix -fv so that it doesn't incorrectly spit out an error that nothing was...
Mike Frysinger [Fri, 13 Apr 2007 10:58:18 +0000 (06:58 -0400)]
mount: fix -fv so that it doesn't incorrectly spit out an error that nothing was done.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
17 years agosys-utils: move some man pages from category 8 to 1
Karel Zak [Wed, 25 Apr 2007 21:50:52 +0000 (23:50 +0200)]
sys-utils: move some man pages from category 8 to 1

The dmesg, ipcrm, ipcs, renice and setsid are user-accessible commands
and belong in man1 more than to man8.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agodocs: fix info about devel/master branchs
Karel Zak [Wed, 25 Apr 2007 13:23:21 +0000 (15:23 +0200)]
docs: fix info about devel/master branchs

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agodocs: remove deprecated section from README
Karel Zak [Tue, 24 Apr 2007 22:40:28 +0000 (00:40 +0200)]
docs: remove deprecated section from README

The deprecated stuff is already described in the DEPRECATED file.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agobuild-sys: add SUID_CFLAGS
Karel Zak [Tue, 24 Apr 2007 09:44:19 +0000 (11:44 +0200)]
build-sys: add SUID_CFLAGS

The patch allows to define special CFLAGS for typical suid programs
(like mount, umount, chfn, ...). Some distributions use for example
"-fpic" for suid binaries.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: add support for mtab "uhelper" option
Karel Zak [Thu, 12 Apr 2007 12:35:46 +0000 (14:35 +0200)]
mount: add support for mtab "uhelper" option

The helper is an external /sbin/umount.<suffix> program where the
suffix is a value from the uhelper= option from /etc/mtab.

The uhelper (unprivileged umount helper) is possible to used when
non-root user wants to umount a mountpoint which is not defined in the
/etc/fstab file (e.g devices mounted by HAL).

This option is already supported by HAL upstream.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: update mtab correctly when mount --move
Karel Zak [Thu, 12 Apr 2007 11:27:41 +0000 (13:27 +0200)]
mount: update mtab correctly when mount --move

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agoschedutils: define SCHED_BATCH when compile with old glibc
Karel Zak [Wed, 11 Apr 2007 21:18:08 +0000 (23:18 +0200)]
schedutils: define SCHED_BATCH when compile with old glibc

This is temporary workaround and it will be removed in 2.14 when
minimal number of people will use old systems where is not defined
SCHED_BATCH in (bits/)sched.h.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agocheck exit status of autotools
Mike Frysinger [Tue, 10 Apr 2007 14:54:22 +0000 (10:54 -0400)]
check exit status of autotools

Make sure each autotool run in autogen.sh worked and if not, abort.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
17 years agotodo: add request for cal highlight control option
Karel Zak [Fri, 6 Apr 2007 10:31:40 +0000 (12:31 +0200)]
todo: add request for cal highlight control option

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotodo: add entry about replay
Karel Zak [Fri, 6 Apr 2007 10:17:43 +0000 (12:17 +0200)]
todo: add entry about replay

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: refresh mtablock output in expected/ directory
Karel Zak [Wed, 4 Apr 2007 11:09:34 +0000 (13:09 +0200)]
tests: refresh mtablock output in expected/ directory

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: relative atime support
Valerie Henson [Sat, 9 Dec 2006 03:15:14 +0000 (19:15 -0800)]
mount: relative atime support

Add the "relatime" (relative atime) option support to mount.  Relative
atime only updates the atime if the previous atime is older than the
mtime or ctime.  Like noatime, but useful for applications like mutt
that need to know when a file has been read since it was last
modified.

Cc: Adrian Bunk <bunk@stusta.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Karel Zak <kzak@redhat.com>
Signed-off-by: Valerie Henson <val_henson@linux.intel.com>
17 years agotests: add missing header
Matthias Koenig [Tue, 3 Apr 2007 14:06:55 +0000 (16:06 +0200)]
tests: add missing header

minor patch, which adds a missing string.h header to
mnt_test_sysinfo.c

Signed-Off-By: Matthias Koenig <mkoenig@suse.de>
17 years agomisc-utils: add scriptreplay manpage
Matthias Koenig [Tue, 3 Apr 2007 14:04:15 +0000 (16:04 +0200)]
misc-utils: add scriptreplay manpage

a really minor patch which adds the manpage for scriptreplay.

Signed-Off-By: Matthias Koenig <mkoenig@suse.de>
17 years agomount: shared-subtree support
Karel Zak [Tue, 3 Apr 2007 20:54:47 +0000 (22:54 +0200)]
mount: shared-subtree support

This patch builds shared-subtree semantics awareness into the mount
command.  Updates the man page for mount too.

The patch also fix a conflict between MS_COMMENT and MS_UNBINDABLE
(-- kzak).

Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Ram Pai <linuxram@us.ibm.com>
17 years agotests: enable mtablock test when uid=0 only
Karel Zak [Tue, 3 Apr 2007 20:19:28 +0000 (22:19 +0200)]
tests: enable mtablock test when uid=0 only

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agodocs: add the DEPRECATED file
Karel Zak [Tue, 3 Apr 2007 20:02:20 +0000 (22:02 +0200)]
docs: add the DEPRECATED file

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agolosetup: add to man page info about deprecated cryptoloop
Karel Zak [Tue, 3 Apr 2007 19:56:55 +0000 (21:56 +0200)]
losetup: add to man page info about deprecated cryptoloop

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: fix mtab_lock
Karel Zak [Fri, 30 Mar 2007 11:10:59 +0000 (13:10 +0200)]
mount: fix mtab_lock

* the lock function uses F_SETLK / F_SETLKW as a conditional wait.
  It's more reliable and better for performance to close the
  MOUNTED_LOCK file in unlock_mtab(), otherwise concurrent process will
  be wait by while () { link() } loop instead on fcntl(F_SETLKW).

  Thanks to Jeff Moyer <moyer@redhat.com> who found the problem two
  year ago.

* when open(MOUNTED_LOCK) failed, we need to try everything again, but
  the original code didn't zeroize "we_created_lockfile" and the old
  version in particular case left lock_mtab() without locked /etc/mtab.
  This is nasty bug.

* the original locking code had bad performance due too long sleep
  (1s),  between attempts. Now we're more aggressive and we use
  5000ms. The result is that more processes is able to lock mtab in
  short time slice.

  Thanks to Peter Rockai <prockai@redhat.com> who found the problem
  and suggest a first version of the code with usleep.

* now we don't count number of attempts anymore, but we count sum of
  time which we spend in the mtab_lock(). The number of attempts is
  not important (and it also depends on CPU performance, load,
  scheduler, ...), the important thing is how long we spend with
  locking. Now time  limit is 30s.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add lock_mtab() performance and reliability test
Karel Zak [Wed, 28 Mar 2007 16:43:03 +0000 (18:43 +0200)]
tests: add lock_mtab() performance and reliability test

The test starts concurrently many processes that use lock_mtab() as
lock for access to same file.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: make clean need to remove diffs and outputs
Karel Zak [Wed, 28 Mar 2007 15:01:19 +0000 (17:01 +0200)]
tests: make clean need to remove diffs and outputs

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agolosetup: add support read-only loops
Karel Zak [Thu, 22 Mar 2007 19:54:07 +0000 (20:54 +0100)]
losetup: add support read-only loops

This feature has been already supported by mount, but it wasn't accessible by
losetup command. Now you can use "losetup -r".

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agolosetup: add -a option to list all used loop devices
Karel Zak [Thu, 22 Mar 2007 13:22:10 +0000 (14:22 +0100)]
losetup: add -a option to list all used loop devices

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: add -s and -f and note to man page for external mount helpers
Karel Zak [Thu, 22 Mar 2007 11:51:47 +0000 (12:51 +0100)]
mount: add -s and -f and note to man page for external mount helpers

The mount -s (for nfs only) and -f options must be exported to
external /sbin/mount.<type> helpers.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: call /sbin/mount.<type> also when mounting without "-t"
Karel Zak [Thu, 22 Mar 2007 00:56:54 +0000 (01:56 +0100)]
mount: call /sbin/mount.<type> also when mounting without "-t"

The mount uses /sbin/mount.<type> when the type is *defined* on
command line or in fstab only. It's not a consistent solution, because
we also support fylesystem type autodetection. The patch allows to
mount OCFS2 by label for example.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add test for /sbin/mount.<type> call
Karel Zak [Thu, 22 Mar 2007 00:28:44 +0000 (01:28 +0100)]
tests: add test for /sbin/mount.<type> call

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agonewgrp: add support for /etc/gshadow
Karel Zak [Wed, 21 Mar 2007 22:07:25 +0000 (23:07 +0100)]
newgrp: add support for /etc/gshadow

The original newgrp command doesn't expect group pasword in /etc/gshadow
although almost all distributions use this file (and the gpasswd command).

The newgrp from util-linux is deprecated and better is use shadow-utils only.
Unfortunately, shadow-utils are broken too (see RH version where is bugfix).
In this case it's better fix util-linux version at least...

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agonewgrp: check result from getgrnam() more carefully
Karel Zak [Wed, 21 Mar 2007 16:29:20 +0000 (17:29 +0100)]
newgrp: check result from getgrnam() more carefully

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agohwclock: make ggc happy and check return values from fgets, read and write
Karel Zak [Wed, 21 Mar 2007 15:21:34 +0000 (16:21 +0100)]
hwclock: make ggc happy and check return values from fgets, read and write

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agohwclock: remove tailing white-spaces and clean up clock.h
Karel Zak [Wed, 21 Mar 2007 14:05:58 +0000 (15:05 +0100)]
hwclock: remove tailing white-spaces and clean up clock.h

Signed-off-by: Karel Zak <kzak@redhat.com>