]> err.no Git - util-linux/log
util-linux
17 years agofdisk: many significant improvements and fixes to Sun label handling
David Miller [Fri, 29 Jun 2007 22:50:21 +0000 (15:50 -0700)]
fdisk: many significant improvements and fixes to Sun label handling

1) Properly describe the exact layout and fields of the sun disk
   label.  Several fields were incorrectly mentioned and others
   wrongly sized.

2) Properly set the version, sane, and num_partitions fields.

   Because we weren't doing this, programs such as Solaris's format
   and the Solaris kernel itself refused to recognize our disk labels
   as valid.

3) Move SSWAP*() macros into fdisksunlabel.c as there is no reason
   for them to be exposed to the rest of fdisk.

4) Kill the sun_predefined_drives array hack and assosciated code.

   Instead size the disk and figure out the geometry properly just
   like the SGI and MSDOS partition handling do, by means of the
   HD_GETGEO ioctl() and disksize().

5) If the disk label read is found to not have the proper values
   set in version, sane, or num_partitions, fix them, recompute the
   label checksum, dirty the disk label, and let the user know what
   we did and that the fixed values will be written out if they 'w'.

   This gives users an easy way to fix up disk labels created by
   disk labelling programs which had this bug.

6) Create a sun_sys_getid() function so that fdisk.c does not need
   to reference the sun disk label details directly, just like the
   SGI code does.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoionice: fix ionice build on sparc
David Miller [Fri, 29 Jun 2007 22:51:17 +0000 (15:51 -0700)]
ionice: fix ionice build on sparc

Provide the proper syscall numbers for this architecture.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosys-utils: added setarch command
Karel Zak [Mon, 2 Jul 2007 11:48:15 +0000 (13:48 +0200)]
sys-utils: added setarch command

This patch merges setarch command to util-linux-ng code.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agobuild-sys: cleanup architecture conditionals
Karel Zak [Mon, 2 Jul 2007 11:21:06 +0000 (13:21 +0200)]
build-sys: cleanup architecture conditionals

This patch also add some new architectures for
AM_CONDITIONAL(ARCH_  ...)

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agobuild-sys: cleanup sys-utils/ rdev symlinks
Karel Zak [Fri, 29 Jun 2007 13:12:33 +0000 (15:12 +0200)]
build-sys: cleanup sys-utils/ rdev symlinks

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agoblockdev: cleanup usage() and update man page
Karel Zak [Fri, 29 Jun 2007 10:06:58 +0000 (12:06 +0200)]
blockdev: cleanup usage() and update man page

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agoblockdev: add BLKFRAGET/BLKFRASET ioctls
Karel Zak [Fri, 29 Jun 2007 09:38:54 +0000 (11:38 +0200)]
blockdev: add BLKFRAGET/BLKFRASET ioctls

In Linux 2.6 the BLKRASET ioctl has the desired effect for mounted
file-systems.  In Linux 2.4 it appears to set the number of blocks to
read-ahead on the *device* as opposed to within a *file*, and the
maximum value of this number is 255.  As a result the invocation of
blockdev will fail on Linux 2.4 for any usefully large value of
READAHEAD, and will not in any case have the desired affect for
fragmented files.

(Based on the blockdev-getfra-setfra.patch Debian patch.)

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agoagetty: check gethostname() return value
Karel Zak [Fri, 29 Jun 2007 00:27:27 +0000 (02:27 +0200)]
agetty: check gethostname() return value

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agoagetty: add 'O' escape code to display domain name
Karel Zak [Thu, 28 Jun 2007 23:50:50 +0000 (01:50 +0200)]
agetty: add 'O' escape code to display domain name

This patch add a new 'O' escape code to display domain name
by issue-file (/etc/issue) output.

(Based on an Gentoo patch.)

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: needs to handle special mountprog even on guessed file systems.
Karel Zak [Wed, 27 Jun 2007 23:23:49 +0000 (01:23 +0200)]
mount: needs to handle special mountprog even on guessed file systems.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agofdisk: add MAC label detection
Karel Zak [Wed, 27 Jun 2007 21:49:56 +0000 (23:49 +0200)]
fdisk: add MAC label detection

This patch is based on the old Suse util-linux-2.11q-fs_mac.diff patch.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agofdisk: move duplicate stuff from fdisk*label.h to fdisk.h
Karel Zak [Wed, 27 Jun 2007 21:36:08 +0000 (23:36 +0200)]
fdisk: move duplicate stuff from fdisk*label.h to fdisk.h

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agolosetup: add long options and fix man page
Karel Zak [Wed, 27 Jun 2007 15:32:51 +0000 (17:32 +0200)]
losetup: add long options and fix man page

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: loop device race condition
Matthias Koenig [Wed, 20 Jun 2007 13:17:47 +0000 (15:17 +0200)]
mount: loop device race condition

Fix race in losetup

Retry acquiring a loop device if set_loop failed with EBUSY

Signed-Off-By: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: loop device race condition
Matthias Koenig [Wed, 20 Jun 2007 13:17:45 +0000 (15:17 +0200)]
mount: loop device race condition

Fix race in mount -o loop

Retry acquiring a loop device if the setup failed with EBUSY.

Signed-Off-By: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agosfdisk: setting default geometry values
Luciano Chavez [Fri, 9 Mar 2007 03:07:52 +0000 (21:07 -0600)]
sfdisk: setting default geometry values

The cfdisk and fdisk set defaults for heads and sectors in order to handle a
situation when the get_geometry() ends up with zeroes for the disk geometry for
device-mapper devices. This patch add same functionally to sfdisk.

You know that a dmsetup setgeometry of the the dm device can be used to
circumvent the issue but users may not immediately realize they need to do
that.

17 years agomount: use encoded labels for volume_id
Kay Sievers [Thu, 21 Jun 2007 11:31:52 +0000 (13:31 +0200)]
mount: use encoded labels for volume_id

The current version of libvolume_id exports the encoding function for the
symlinks names, so slashes in labels and other chars, that don't really fit
into symlink names, will work as expected with LABEL=.

17 years agoddate: fix compiler warnings
Karel Zak [Tue, 19 Jun 2007 14:42:07 +0000 (16:42 +0200)]
ddate: fix compiler warnings

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotaskset: independent of hardcoded NR_CPUS max.
Cliff Wickman [Mon, 11 Jun 2007 20:24:45 +0000 (15:24 -0500)]
taskset: independent of hardcoded NR_CPUS max.

This patch makes the taskset command independent of the system's maximum
number of cpus (CONFIG_NR_CPUS).  The maximum for CONFIG_NR_CPUS is a
moving target.

With this patch the size of the systems's cpumask_t is gotten from
sched_getaffinity(2).

This patch uses variable length bitmasks borrowed from Paul Jackson's
variable size bitmask routines (hence I kept his copyright notice).
This replaces the use of the glibc CPU_SETSIZE, CPU_SET, CPU_ZERO and
CPU_ISSET macros which depend on a hardcoded size for cpu_set_t.

(also fixes one little nit: the -V option is "-v" in the built-in help, so
 changed the built-in help)

Signed-off-by: Cliff Wickman <cpw@sgi.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agolosetup: add a new option -s
Karel Zak [Mon, 18 Jun 2007 13:44:02 +0000 (15:44 +0200)]
losetup: add a new option -s

The losetup provides an -f option to discover an unused loop device.  As
implemented, it is racy. The problem is that -f prints the loop device
to stdout only when used standalone.  This means a script has to do:

 lodev=$(losetup -f)
 losetup $lodev $filename

which is racy if another script may be running.

This patch add a new option '-s'. The '-s' option prints device name
if the -f option and a file argument are present. For example:

 lodev=$(losetup -f -s $filename)

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add mount /dev/symlink test
Karel Zak [Fri, 15 Jun 2007 19:32:45 +0000 (21:32 +0200)]
tests: add mount /dev/symlink test

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add support for suid programs
Karel Zak [Fri, 15 Jun 2007 13:55:10 +0000 (15:55 +0200)]
tests: add support for suid programs

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: rewrite getfs_by_specdir() without mem leaks
Karel Zak [Fri, 15 Jun 2007 13:47:22 +0000 (15:47 +0200)]
mount: rewrite getfs_by_specdir() without mem leaks

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: fix typo in error message
Karel Zak [Fri, 15 Jun 2007 13:24:45 +0000 (15:24 +0200)]
mount: fix typo in error message

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: fix ts_fstab_add function
Karel Zak [Fri, 15 Jun 2007 09:29:04 +0000 (11:29 +0200)]
tests: fix ts_fstab_add function

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotools: add codecheck-config that checks for {HAVE,ENABLE}_ orphans
Karel Zak [Fri, 15 Jun 2007 08:17:51 +0000 (10:17 +0200)]
tools: add codecheck-config that checks for {HAVE,ENABLE}_ orphans

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agogetopt: remove old unused files
Karel Zak [Thu, 14 Jun 2007 12:50:14 +0000 (14:50 +0200)]
getopt: remove old unused files

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomcookie: remove non-linux code
Karel Zak [Thu, 14 Jun 2007 12:43:41 +0000 (14:43 +0200)]
mcookie: remove non-linux code

Something like #ifdef __linux__ is non-sense in util-linux where
everything depend on linux.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomkfs.cramfs: cleanup HAVE_ macros usage
Karel Zak [Thu, 14 Jun 2007 11:55:37 +0000 (13:55 +0200)]
mkfs.cramfs: cleanup HAVE_ macros usage

It's bad to use any HAVE_* macros for anything other than
for build-system (autotools) stuff.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agobuild-sys: fix HAVE_NCURSES
Karel Zak [Thu, 14 Jun 2007 11:32:32 +0000 (13:32 +0200)]
build-sys: fix HAVE_NCURSES

The HAVE_NCURSES in config.h is required by the misc-utils/cal.c.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agoswapon: cleanup PATH_ macros and tailing white-spaces
Karel Zak [Thu, 14 Jun 2007 09:53:39 +0000 (11:53 +0200)]
swapon: cleanup PATH_ macros and tailing white-spaces

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomisc-utils: remove old cal test
Karel Zak [Wed, 13 Jun 2007 19:43:41 +0000 (21:43 +0200)]
misc-utils: remove old cal test

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agoswapon: fix swapon headers and syscalls
Mike Frysinger [Wed, 13 Jun 2007 09:52:55 +0000 (05:52 -0400)]
swapon: fix swapon headers and syscalls

This patch scrubs anything related to SWAPON_NEEDS_TWO_ARGS as this is only
relevant for < linux-1.3.2 and i say it's about time we let it go.

I also cleaned up the system call fallback logic as the _syscall#() macros are
the deprecated interface in favor of the real syscall() function.

The asm/page.h gets the boot as nothing in swapon.c utilizes defines from it
while unistd.h gets always included as defines/functions are used from it other
than just swapon().

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
17 years agocal: widechar code cleanup
Karel Zak [Tue, 12 Jun 2007 15:46:16 +0000 (17:46 +0200)]
cal: widechar code cleanup

This patch make widechar code (cal headers initialization) more
robust. That's possible to format wide char strings by swprintf() and
non-widechar version by sprintf(). This is better than the old
solution with wcscat().

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agodocs: update AUTHORS file
Karel Zak [Tue, 12 Jun 2007 14:59:03 +0000 (16:59 +0200)]
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agocal: ifdef cleanup, non-curses/tempcap code fixes
Karel Zak [Tue, 12 Jun 2007 14:45:32 +0000 (16:45 +0200)]
cal: ifdef cleanup, non-curses/tempcap code fixes

This patche:
  - removes extra #ifdef-s,
  - fixes \n usage when compiled without curses/termcap

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agocal: fix a segfault and -3m highlighting
Karel Zak [Tue, 12 Jun 2007 14:08:58 +0000 (16:08 +0200)]
cal: fix a segfault and -3m highlighting

Fixes a segfault for certain values of $TERM

Fixes alignment issues when the highlighted day (today)
is in the last week of the month.

Signed-off-by: Pádraig Brady <P@draigBrady.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add cal -y test
Karel Zak [Tue, 12 Jun 2007 11:26:05 +0000 (13:26 +0200)]
tests: add cal -y test

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add cal -3 test
Karel Zak [Tue, 12 Jun 2007 11:05:00 +0000 (13:05 +0200)]
tests: add cal -3 test

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add cal -1 test
Karel Zak [Tue, 12 Jun 2007 10:48:36 +0000 (12:48 +0200)]
tests: add cal -1 test

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: pass all arguments to ts_init, add ts_has_option function
Karel Zak [Mon, 11 Jun 2007 12:45:32 +0000 (14:45 +0200)]
tests: pass all arguments to ts_init, add ts_has_option function

This patch:
- replaces "$1" with "$*" for ts_init function
- add ts_has_option function
- removes some tailing white-spaces

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agodocs: clean up TODO file and add a new resuest for 2.14
Karel Zak [Tue, 5 Jun 2007 19:53:55 +0000 (21:53 +0200)]
docs: clean up TODO file and add a new resuest for 2.14

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotext-utils: fix the more command compilation against termcap
Karel Zak [Mon, 4 Jun 2007 13:16:18 +0000 (15:16 +0200)]
text-utils: fix the more command compilation against termcap

The build-sys (text-utils/Makefile.am) allows to compile against
ncurses and termcap. The termcap version is broken in more.c.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agosys-utils: add note about obsolete ramsize option to rdev.8
Karel Zak [Mon, 4 Jun 2007 10:58:39 +0000 (12:58 +0200)]
sys-utils: add note about obsolete ramsize option to rdev.8

The 2.0.x kernels and newer dynamically allocate the ramdisk
and do not need this setting.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agofdisk: add GPT detection code
Karel Zak [Thu, 31 May 2007 12:31:51 +0000 (14:31 +0200)]
fdisk: add GPT detection code

The GPT (GUID Partition Table) is unsupported by fdisk, sfdisk and
cfdisk. Unfortunately, the fdisk doesn't complain about GPT.. that's
dangerous, because user is able to blindly edit PT with unexpected
results.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agofdisk: Makefile.am refactoring
Karel Zak [Wed, 30 May 2007 18:55:02 +0000 (20:55 +0200)]
fdisk: Makefile.am refactoring

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agofdisk: cleanup full disk detection code
Karel Zak [Wed, 30 May 2007 15:57:30 +0000 (17:57 +0200)]
fdisk: cleanup full disk detection code

The full disk (e.g. /dev/hda) detection code is duplicated on two places and
the code doesn't work correctly with devices which don't support HDIO_GETGEO.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agofdisk: fix "type qualifiers ignored on function return type"
Karel Zak [Wed, 30 May 2007 15:41:14 +0000 (17:41 +0200)]
fdisk: fix "type qualifiers ignored on function return type"

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agofdisk: use unsigned long long instead int for sectors
Karel Zak [Wed, 30 May 2007 15:10:43 +0000 (17:10 +0200)]
fdisk: use unsigned long long instead int for sectors

The patch is originally based on an old Suse patch.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: clean up info about NFS in mount.8
Karel Zak [Wed, 30 May 2007 10:10:07 +0000 (12:10 +0200)]
mount: clean up info about NFS in mount.8

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: add note about fcntl/ioctl unreliability on NFS to mount.8
Karel Zak [Wed, 30 May 2007 09:44:50 +0000 (11:44 +0200)]
mount: add note about fcntl/ioctl unreliability on NFS to mount.8

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: add note about /etc/mtab unreliability to mount.8
Karel Zak [Wed, 30 May 2007 09:42:55 +0000 (11:42 +0200)]
mount: add note about /etc/mtab unreliability to mount.8

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add mount by uuid with label in fstab
Karel Zak [Mon, 28 May 2007 23:30:50 +0000 (01:30 +0200)]
tests: add mount by uuid with label in fstab

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add mount by uuid with devname in fstab
Karel Zak [Mon, 28 May 2007 23:29:25 +0000 (01:29 +0200)]
tests: add mount by uuid with devname in fstab

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add mount by label with uuid in fstab
Karel Zak [Mon, 28 May 2007 23:28:06 +0000 (01:28 +0200)]
tests: add mount by label with uuid in fstab

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add mount by label with devname in fstab
Karel Zak [Mon, 28 May 2007 23:26:17 +0000 (01:26 +0200)]
tests: add mount by label with devname in fstab

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add mount by devname with uuid in fstab
Karel Zak [Mon, 28 May 2007 23:08:04 +0000 (01:08 +0200)]
tests: add mount by devname with uuid in fstab

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add mount by devname with label in fstab
Karel Zak [Mon, 28 May 2007 23:07:28 +0000 (01:07 +0200)]
tests: add mount by devname with label in fstab

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add more variants to {mount,fstab}-by-{label,uuid,devname}
Karel Zak [Mon, 28 May 2007 13:15:55 +0000 (15:15 +0200)]
tests: add more variants to {mount,fstab}-by-{label,uuid,devname}

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: add support for mixed usage of SPECes
Karel Zak [Mon, 28 May 2007 12:48:23 +0000 (14:48 +0200)]
mount: add support for mixed usage of SPECes

This patch improves a way how the mount works with SPECes (devname,
LABEL or UUID) and nodes (mountpoints) from command line.

The patch adds support for mixed usage of SPECes -- it means on
command line is different SPEC than in the /etc/fstab file. For
example:

command line:
   mount LABEL=foo
fstab:
   UID=915b048a-998d-4ee5-9e6b-7fcaaf34d3c5 /mnt/foo auto default

The mount command doesn't strictly require same SPEC on command line
and in fstab anymore. You can be more creative and mix UUID, LABEL
or device name.

This implementation is more effective that convert *all* entries from
/etc/fstab to a real devnames.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: getfs_* (fstab) interface has to work with canonicalize()
Karel Zak [Mon, 28 May 2007 11:20:27 +0000 (13:20 +0200)]
mount: getfs_* (fstab) interface has to work with canonicalize()

The getfs_by_dir() and getfs_by_devname() have to be able to work
with canonicalized and also with non-canonicalized paths.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: cleanup blkid cache after test device deinitialization
Karel Zak [Fri, 25 May 2007 12:53:22 +0000 (14:53 +0200)]
tests: cleanup blkid cache after test device deinitialization

The libblkid reuses cached information when a cache entry is younger
than 2 secs. That's wrong, because util-linux tests use devices
more quickly.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: use verbose mode instead debug mode
Karel Zak [Fri, 25 May 2007 11:33:22 +0000 (13:33 +0200)]
mount: use verbose mode instead debug mode

The patch:

  commit 61d9d2ff1cb0e28e2b88099bbc5b919fa5004fce
  Date:   Wed Dec 27 23:35:56 2006 +0100

added debug mode to the mount command. It was mistake. It's better to
use old verbose mode instead a new debug mode. This patch transform
all staff from debug mode to to verbose mode.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: parse SPEC before search in fstab
Karel Zak [Fri, 25 May 2007 10:28:49 +0000 (12:28 +0200)]
mount: parse SPEC before search in fstab

The mount blindly uses a SPEC from command line and tries to found the
SPEC in /etc/fstab. It's better to parse the SPEC and search by UUID,
LABEL or devname only.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: clean up getfs* (fstab.c) interface
Karel Zak [Fri, 25 May 2007 09:09:44 +0000 (11:09 +0200)]
mount: clean up getfs* (fstab.c) interface

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agobuild-sys: minor fixes in configure.in
Karel Zak [Tue, 22 May 2007 22:04:24 +0000 (00:04 +0200)]
build-sys: minor fixes in configure.in

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agobuild-sys: factor out common parts from mount/Makefile.am
Stepan Kasal [Tue, 22 May 2007 11:00:23 +0000 (13:00 +0200)]
build-sys: factor out common parts from mount/Makefile.am

Signed-off-by: Stepan Kasal <skasal@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add mount by devname from fstab
Karel Zak [Tue, 22 May 2007 20:00:01 +0000 (22:00 +0200)]
tests: add mount by devname from fstab

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add mount by UUID from fstab test
Karel Zak [Tue, 22 May 2007 19:44:14 +0000 (21:44 +0200)]
tests: add mount by UUID from fstab test

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add mount by label from fstab test
Karel Zak [Tue, 22 May 2007 14:06:24 +0000 (16:06 +0200)]
tests: add mount by label from fstab test

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add support for fstab modification
Karel Zak [Tue, 22 May 2007 14:01:55 +0000 (16:01 +0200)]
tests: add support for fstab modification

The patch adds ts_fstab_add and ts_fstab_clean routines.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add mount by devname test
Karel Zak [Tue, 22 May 2007 09:46:32 +0000 (11:46 +0200)]
tests: add mount by devname test

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add mount by LABEL test
Karel Zak [Mon, 21 May 2007 13:00:54 +0000 (15:00 +0200)]
tests: add mount by LABEL test

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: fix Makefile.am (add missing tests)
Karel Zak [Mon, 21 May 2007 12:31:51 +0000 (14:31 +0200)]
tests: fix Makefile.am (add missing tests)

The patch adds missing tests to Makefile.am.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add mount by UUID test
Karel Zak [Mon, 21 May 2007 12:28:01 +0000 (14:28 +0200)]
tests: add mount by UUID test

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add ts_log and --verbose support
Karel Zak [Fri, 18 May 2007 13:34:28 +0000 (15:34 +0200)]
tests: add ts_log and --verbose support

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: "if [...]" clean up
Karel Zak [Fri, 18 May 2007 13:00:22 +0000 (15:00 +0200)]
tests: "if [...]" clean up

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add swapon by devname test
Karel Zak [Fri, 18 May 2007 12:00:21 +0000 (14:00 +0200)]
tests: add swapon by devname test

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add swapon by UUID test
Karel Zak [Fri, 18 May 2007 11:54:43 +0000 (13:54 +0200)]
tests: add swapon by UUID test

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: simplify devices usage
Karel Zak [Fri, 18 May 2007 11:49:15 +0000 (13:49 +0200)]
tests: simplify devices usage

The patch simplifies devices usage in the tests. The patch also improves
errors checking and reporting.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add functions for label, uuid and fstype detection
Karel Zak [Thu, 17 May 2007 18:16:25 +0000 (20:16 +0200)]
tests: add functions for label, uuid and fstype detection

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: code refactoring -- new ts_udev_loop_support function
Karel Zak [Wed, 16 May 2007 00:07:07 +0000 (02:07 +0200)]
tests: code refactoring -- new ts_udev_loop_support function

The patch moves generic and duplicated code to a new
ts_udev_loop_support function.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: code refactoring -- new ts_device_init function
Karel Zak [Tue, 15 May 2007 23:38:13 +0000 (01:38 +0200)]
tests: code refactoring -- new ts_device_init function

The patch moves generic loop device (de)initialization code to
ts_device_init and ts_device_deinit functions.

Signed-off-by: Karel Zak <kzak@redhat.com>
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>