]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
13 years agofdisk: don't ignore 1MiB granularity on 512-byte sector devices stable/v2.21
Karel Zak [Mon, 23 Jul 2012 21:09:41 +0000 (23:09 +0200)] 
fdisk: don't ignore 1MiB granularity on 512-byte sector devices

Note that +10MB is 100000 (10^N) and relative values (+<size>
convention) should be be aligned to the default grain (= 1 MiB).

Old version:

  Last sector, +sectors or +size{K,M,G} (2048-2047999, default 2047999): +10MB
  Partition 1 of type Linux and of size 9.5 MiB is set
  ...
  /dev/loop0p1            2048       21578        9765+  83  Linux
  /dev/loop0p2           21579       43062       10742   83  Linux

New version:
  Last sector, +sectors or +size{K,M,G} (2048-2047999, default 2047999): +10MB
  Partition 1 of type Linux and of size 10 MiB is set
  ...
  /dev/loop0p1            2048       22527       10240   83  Linux
  /dev/loop0p2           22528       43007       10240   83  Linux

Addresses: http://thread.gmane.org/gmane.linux.kernel.device-mapper.dm-crypt/5913/focus=5929
Reported-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: release++ (v2.21.2) v2.21.2
Karel Zak [Fri, 25 May 2012 10:29:12 +0000 (12:29 +0200)] 
build-sys: release++ (v2.21.2)

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodocs: add v2.21.2-ReleaseNotes
Karel Zak [Fri, 25 May 2012 10:27:22 +0000 (12:27 +0200)] 
docs: add v2.21.2-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodocs: update AUTHORS file
Karel Zak [Fri, 25 May 2012 10:25:10 +0000 (12:25 +0200)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agopo: merge changes
Karel Zak [Fri, 25 May 2012 10:21:52 +0000 (12:21 +0200)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agopo: update zh_CN.po (from translationproject.org)
Wylmer Wang [Fri, 25 May 2012 09:47:28 +0000 (11:47 +0200)] 
po: update zh_CN.po (from translationproject.org)

13 years agopo: update vi.po (from translationproject.org)
Trần Ngọc Quân [Fri, 25 May 2012 09:47:28 +0000 (11:47 +0200)] 
po: update vi.po (from translationproject.org)

13 years agopo: update de.po (from translationproject.org)
Arun Persaud [Fri, 25 May 2012 09:47:28 +0000 (11:47 +0200)] 
po: update de.po (from translationproject.org)

13 years agologin: add USER to initial environment
Dave Reisner [Sun, 11 Mar 2012 04:54:14 +0000 (23:54 -0500)] 
login: add USER to initial environment

Add this value from the passwd struct to the environment, as it is
expected by shells, and generally useful to users.

This also clarifies a poorly worded sentence in the vicinity of the
manpage change.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
13 years agosfdisk: fix calculation due to type mismatch (ix86)
Petr Uzel [Fri, 6 Apr 2012 14:53:13 +0000 (16:53 +0200)] 
sfdisk: fix calculation due to type mismatch (ix86)

Instructing sfdisk to create one partition spanning
across entire disk (",,") on 32bit system, if the disk
is sufficiently large (~2TB) leads to wrong calculation
in compute_start_sect() due to type mismatch.

Can be reproduced as:

--------------------------
linux-3ln5:~ # modprobe scsi_debug virtual_gb=2000
linux-3ln5:~ # sfdisk /dev/sda <<< ',,'
Checking that no-one is using this disk right now ...
OK

Disk /dev/sda: 261083 cylinders, 255 heads, 63 sectors/track

sfdisk: ERROR: sector 0 does not have an msdos signature
sfdisk:  /dev/sda: unrecognized partition table type

Old situation:
sfdisk: No partitions found

no room for partition descriptor
sfdisk: bad input
--------------------------

Addresses: https://bugzilla.novell.com/show_bug.cgi?id=754789
Reported-by: Dan Mares <dan.mares@norcrossgroup.com>
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agotests: add UFS uuids to results
Karel Zak [Thu, 24 May 2012 11:33:38 +0000 (13:33 +0200)] 
tests: add UFS uuids to results

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: backport mnt_context_guess_fstype() changes
Karel Zak [Thu, 24 May 2012 11:30:50 +0000 (13:30 +0200)] 
libmount: backport mnt_context_guess_fstype() changes

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: use stderr for initial debug message
Karel Zak [Wed, 23 May 2012 09:05:37 +0000 (11:05 +0200)] 
libmount: use stderr for initial debug message

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agomisc-utils: cleanup unused strings.h includes
maximilian attems [Tue, 22 May 2012 14:33:23 +0000 (16:33 +0200)] 
misc-utils: cleanup unused strings.h includes

Noticed on klibc building.

Signed-off-by: maximilian attems <max@stro.at>
13 years agoinclude: [c.h] protect container_of
maximilian attems [Tue, 22 May 2012 14:20:42 +0000 (16:20 +0200)] 
include: [c.h] protect container_of

fixes lots of warning noise:
../../../include/c.h:112:0: warning: "container_of" redefined [enabled
by default]
/usr/lib/klibc/include/stddef.h:52:0: note: this is the location of the
previous definition

Signed-off-by: maximilian attems <max@stro.at>
13 years agofindmnt: fallback to mountinfo for polling
Dave Reisner [Sun, 20 May 2012 00:39:20 +0000 (20:39 -0400)] 
findmnt: fallback to mountinfo for polling

If no tabfiles are specified, default to watching /proc/self/mountinfo
rather than exiting silently with EXIT_FAILURE.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
13 years agofindmnt: reference correct manual section
Dave Reisner [Sun, 20 May 2012 00:39:19 +0000 (20:39 -0400)] 
findmnt: reference correct manual section

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Conflicts:

misc-utils/findmnt.c

13 years agologin: fix segmentation fault in log_utmp
Karel Zak [Mon, 21 May 2012 07:58:42 +0000 (09:58 +0200)] 
login: fix segmentation fault in log_utmp

 ctx->tty_number is optional...

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=822705
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: don't canonicalize target
Karel Zak [Thu, 17 May 2012 10:10:43 +0000 (12:10 +0200)] 
libmount: don't canonicalize target

Note that mountpoint (target_ paths in /proc/mounts and /proc/self/mountinfo
are always canonicalized by kernel.

 * for umount we don't have to canonicalize target
   by default if the mountpoint is found in /proc/self/mountinfo

 * in mnt_table_find_target() is unnecessary to canonicalize target paths
   if the table of the filesystems is read from /proc/self/mountinfo

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=820707
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agorev: mention tac(1) in 'SEE ALSO' man page section
Petr Uzel [Sun, 13 May 2012 11:57:46 +0000 (13:57 +0200)] 
rev: mention tac(1) in 'SEE ALSO' man page section

Cc: James R. Van Zandt <jrv@debian.org>
From: James R. Van Zandt <jrv@debian.org>
Addresses: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=568709
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agolsblk: improve man page wording
Petr Uzel [Sun, 13 May 2012 09:08:20 +0000 (11:08 +0200)] 
lsblk: improve man page wording

Cc: Regid Ichira <regid23@yahoo.com>
From: Regid Ichira <regid23@yahoo.com>
Addresses: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=672702
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Conflicts:

misc-utils/lsblk.8

13 years agologger: remove use of __P
Jeremy Huntwork [Sun, 13 May 2012 16:31:48 +0000 (16:31 +0000)] 
logger: remove use of __P

Its intended usage was to support pre-ANSI C compilers, but that is
not even possible with the modern-day codebase.  Moreover, it breaks
compiling on libcs that do not define this legacy
implementation-internal macro.

13 years agolibblkid: support UFS UUID
Vladimir 'φ-coder/phcoder' Serbinenko [Fri, 4 May 2012 09:49:16 +0000 (11:49 +0200)] 
libblkid: support UFS UUID

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibblkid: accept small blocks for NTFS and Reiserfs in blkid
Vladimir 'φ-coder/phcoder' Serbinenko [Fri, 4 May 2012 09:48:07 +0000 (11:48 +0200)] 
libblkid: accept small blocks for NTFS and Reiserfs in blkid

libblkid is restrictive as to what it accepts as valid reiserfs or
valid NTFS.  One can mkfs an NTFS with 256B sectors and it's supported
by ntfs-3g Reiserfs can have 512B blocks and it works both with
mkfs.ntfs and Linux.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolsblk: fix /sys/.../ro usage
Karel Zak [Thu, 3 May 2012 14:24:12 +0000 (16:24 +0200)] 
lsblk: fix /sys/.../ro usage

Reported-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibuuid: fix typo in uuid_compare manpage
Petr Uzel [Tue, 24 Apr 2012 08:20:58 +0000 (10:20 +0200)] 
libuuid: fix typo in uuid_compare manpage

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agolibmount: close device fd (to avoid mount(2) EBUSY)
Karel Zak [Fri, 27 Apr 2012 08:30:08 +0000 (10:30 +0200)] 
libmount: close device fd (to avoid mount(2) EBUSY)

libmount uses libblkid to detect filesystem type. Unfortunately, the
blkid probe struct is not freed before mount(2), it means that the
device is still open and mount(2) may return EBUSY.

We don't need persistent blkid stuff in libmount, so let's close
all immediately after device probing.

Reported-by: David Zeuthen <zeuthen@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Conflicts:

libmount/src/cache.c

13 years agolibmount: fix mnt_context_guess_fstype()
Karel Zak [Wed, 25 Apr 2012 07:05:24 +0000 (09:05 +0200)] 
libmount: fix mnt_context_guess_fstype()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: fix mount by pattern
Karel Zak [Tue, 24 Apr 2012 09:52:04 +0000 (11:52 +0200)] 
libmount: fix mount by pattern

  mount /foo /bar

without entry in /etc/fstab the mount command tries all filesystems
from /{etc,proc}/filesystems. We should NOT call mount(2) more then
once if the syscall returns for example ENOENT, acceptable is only
EINVAL.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolscpu: fix possibly undefined operation
Petr Uzel [Mon, 23 Apr 2012 08:43:38 +0000 (10:43 +0200)] 
lscpu: fix possibly undefined operation

With -Wall -Werror, compilation of lscpu.c fails with:

  Making all in sys-utils
  make[2]: Entering directory `/home/petr/upstream/util-linux/sys-utils'
  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I..  -include ../config.h -I../include -DLOCALEDIR=\"/usr/share/locale\"  -fsigned-char -Wall -Werror -MT lscpu.o -MD -MP -MF .deps/lscpu.Tpo -c -o lscpu.o lscpu.c
  lscpu.c: In function ‘print_parsable’:
  lscpu.c:971:7: error: operation on ‘p’ may be undefined [-Werror=sequence-point]
  cc1: all warnings being treated as errors

Fix by splitting the pointer increment to separate statement.

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agolibblkid: befs: declare functions static
Petr Uzel [Sun, 22 Apr 2012 14:16:39 +0000 (16:16 +0200)] 
libblkid: befs: declare functions static

Since commit 0b0c231f64d02e682
(swapon: move generic code to swapon-common.c), if util-linux is
configured with --enable-static --disable-shared --enable-libmount-mount
options, the build fails with the following error:

  ...
  libtool: link: gcc -std=gnu99 -fsigned-char -ggdb -O1 -Wall -D_FORTIFY_SOURCE=2 -o switch_root switch_root.o
  /home/petr/upstream/util-linux/libblkid/src/.libs/libblkid.a(befs.o): In function `get_uuid':
  /home/petr/upstream/util-linux/libblkid/src/superblocks/befs.c:333: multiple definition of `get_uuid'
  swapon-swapon-common.o:/home/petr/upstream/util-linux/sys-utils/swapon-common.c:99: first defined here
  collect2: ld returned 1 exit status
  /bin/sh ../libtool  --tag=CC   --mode=link gcc -std=gnu99 -fsigned-char -ggdb -O1 -Wall -D_FORTIFY_SOURCE=2   -o flock flock.o strutils.o
  libtool: link: gcc -std=gnu99 -fsigned-char -ggdb -O1 -Wall -D_FORTIFY_SOURCE=2 -o pivot_root pivot_root.o
  make[2]: *** [swapon] Error 1
  make[2]: *** Waiting for unfinished jobs....
  /home/petr/upstream/util-linux/libblkid/src/.libs/libblkid.a(befs.o): In function `get_uuid':
  /home/petr/upstream/util-linux/libblkid/src/superblocks/befs.c:333: multiple definition of `get_uuid'
  swapoff-swapon-common.o:/home/petr/upstream/util-linux/sys-utils/swapon-common.c:99: first defined here

Fix by declaring befs funcitons static.

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agologin: use getdtablesize() correctly in login.c
chas williams - CONTRACTOR [Fri, 20 Apr 2012 14:58:28 +0000 (10:58 -0400)] 
login: use getdtablesize() correctly in login.c

getdtablesize() is the number of descriptors and since decriptors start
at 0, its value isnt the largest descriptors possible.  One should use
getdtablesize() - 1 instead.

Signed-off-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
13 years agonamei: fix relative symlinks evaluation
Karel Zak [Fri, 20 Apr 2012 13:06:57 +0000 (15:06 +0200)] 
namei: fix relative symlinks evaluation

Fedora 17 (/bin is symlink to /usr/bin):

[root@intel ~]# /bin/namei /bin/namei
f: /bin/namei
 d /
 l bin -> usr/bin
usr - No such file or directory

Reported-by: Jan Stancek <jstancek@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agomount: fix man page typo s/reatime/relatime/
Karel Zak [Wed, 18 Apr 2012 10:25:28 +0000 (12:25 +0200)] 
mount: fix man page typo s/reatime/relatime/

Reported-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agocal: Fix building under uClibc.
James Le Cuirot [Mon, 16 Apr 2012 10:05:27 +0000 (11:05 +0100)] 
cal: Fix building under uClibc.

Commit fbc333fec09394bf4e47707de08a65e8c0e9c288 broke building under uClibc because HAVE_DECL macros are set to 0, not undefined.

Signed-off-by: James Le Cuirot <chewi@aura-online.co.uk>
13 years agolib/loopdev: more robust initialization
Karel Zak [Mon, 2 Apr 2012 15:33:34 +0000 (17:33 +0200)] 
lib/loopdev: more robust initialization

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agortcwake: only invoke RTC_AIE_ON/OFF ioctls in pairs
Paul Fox [Fri, 30 Mar 2012 12:16:50 +0000 (08:16 -0400)] 
rtcwake: only invoke RTC_AIE_ON/OFF ioctls in pairs

many rtc drivers don't implement the RTC_AIE_ON/OFF ioctls at all --
so if we never tried to enable the alarm interrupt, don't try to
disable it later.

Signed-off-by: Paul Fox <pgf@laptop.org>
13 years agosetterm: correct manual page reference
Sami Kerola [Thu, 15 Mar 2012 22:06:39 +0000 (23:06 +0100)] 
setterm: correct manual page reference

An error from commit faa0548de47df5691cf56dd49daaba8dbc89d34a

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agotools: improve ko-release-* scripts
Karel Zak [Fri, 30 Mar 2012 11:43:45 +0000 (13:43 +0200)] 
tools: improve ko-release-* scripts

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: release++ (v2.21.1) v2.21.1
Karel Zak [Fri, 30 Mar 2012 10:34:08 +0000 (12:34 +0200)] 
build-sys: release++ (v2.21.1)

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodocs: add v2.21.1-ReleaseNotes
Karel Zak [Fri, 30 Mar 2012 10:32:12 +0000 (12:32 +0200)] 
docs: add v2.21.1-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodocs: update AUTHORS file
Karel Zak [Fri, 30 Mar 2012 10:27:30 +0000 (12:27 +0200)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agopo: merge changes
Karel Zak [Fri, 30 Mar 2012 09:43:18 +0000 (11:43 +0200)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agopo: update vi.po (from translationproject.org)
Trần Ngọc Quân [Fri, 30 Mar 2012 09:36:43 +0000 (11:36 +0200)] 
po: update vi.po (from translationproject.org)

13 years agologin: correction in sig_handler()
Karel Zak [Fri, 30 Mar 2012 09:14:47 +0000 (11:14 +0200)] 
login: correction in sig_handler()

Reported-by: Avinesh Kumar <avinesh@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agotests: update fdisk test
Karel Zak [Fri, 30 Mar 2012 07:28:55 +0000 (09:28 +0200)] 
tests: update fdisk test

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoblkid: add note about variable tags and devices order.
Karel Zak [Thu, 29 Mar 2012 13:06:49 +0000 (15:06 +0200)] 
blkid: add note about variable tags and devices order.

Reported-by: Michael Conrad <mconrad@intellitree.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agomount: fix recursively propagation mounting
Dong Hao [Wed, 21 Mar 2012 05:50:14 +0000 (13:50 +0800)] 
mount: fix recursively propagation mounting

Provide the recursive flag of propagation mounting. Recursive flag could
be used together with propagation flag.

[kzak@redhat.com: - add MS_SILENT to acceptable propagation flags,
                  - fix new code in libmount too]

Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Dong Hao <haodong@linux.vnet.ibm.com>
13 years agofdisk: don't print confusing warning on non-partitioned disks
Karel Zak [Tue, 20 Mar 2012 10:13:28 +0000 (11:13 +0100)] 
fdisk: don't print confusing warning on non-partitioned disks

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=740163
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add configfs to pseudofs list
Karel Zak [Tue, 20 Mar 2012 09:42:47 +0000 (10:42 +0100)] 
libmount: add configfs to pseudofs list

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agofindmnt: add -P, --pairs to the man page
Bill Pemberton [Sat, 17 Mar 2012 00:30:46 +0000 (20:30 -0400)] 
findmnt: add -P, --pairs to the man page

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
13 years agobuild-sys: make the crosscompile path for scanf_cv_alloc_modifier clever
Sebastian Andrzej Siewior [Wed, 29 Feb 2012 21:26:19 +0000 (22:26 +0100)] 
build-sys: make the crosscompile path for scanf_cv_alloc_modifier clever

My earlier assumption was that scanf_cv_alloc_modifier is unused. This
is not true as pointed out by Karel since it used befoe checking for
libmount. Argh. So instead saying no I add a test to check for glibc
>= 2.7 which provides %m. As of uClibc v0.9.32-rc3 the situation looks
the following:
| git grep _M_SPEC__
|libc/stdio/_vfprintf.c:/* #define __UCLIBC_HAS_PRINTF_M_SPEC__ */
|libc/stdio/_vfprintf.c:#ifdef __UCLIBC_HAS_PRINTF_M_SPEC__
|libc/stdio/_vfprintf.c:# ifdef __UCLIBC_HAS_PRINTF_M_SPEC__
|libc/stdio/_vfprintf.c:# endif /* __UCLIBC_HAS_PRINTF_M_SPEC__ */
|libc/stdio/_vfprintf.c:#ifdef __UCLIBC_HAS_PRINTF_M_SPEC__
|libc/stdio/_vfprintf.c:#ifdef __UCLIBC_HAS_PRINTF_M_SPEC__
|libc/stdio/_vfprintf.c:#ifdef __UCLIBC_HAS_PRINTF_M_SPEC__
|libc/stdio/_vfprintf.c:#ifdef __UCLIBC_HAS_PRINTF_M_SPEC__
|libc/stdio/old_vfprintf.c:#ifdef __UCLIBC_HAS_PRINTF_M_SPEC__
|libc/stdio/perror.c:#ifdef __UCLIBC_HAS_PRINTF_M_SPEC__

And other libc user have to bring their own stuff.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
13 years agomount: (new) add missing xalloc.h
Karel Zak [Tue, 20 Mar 2012 08:06:09 +0000 (09:06 +0100)] 
mount: (new) add missing xalloc.h

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoRevert "lib/canonicalize: always remove tailing slash"
Karel Zak [Mon, 26 Mar 2012 08:08:48 +0000 (10:08 +0200)] 
Revert "lib/canonicalize: always remove tailing slash"

It's overkill to modify unknown paths in a generic function like
canonicalize_path().

for example:

 mount -t fuse 'sshfs#marty@thee:/' /media/thee

will be canonicalized to

 mount -t fuse 'sshfs#marty@thee:' /media/thee

and this obvious bug.

Reported-by: Martin Panter <vadmium+floss@gmail.com>
This reverts commit 28074a0952469aebf021821d95238cfb964d13ff.

13 years agotests: search for "none" by findmnt
Karel Zak [Fri, 2 Mar 2012 14:59:10 +0000 (15:59 +0100)] 
tests: search for "none" by findmnt

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agotests: wait a moment between mount and umount
Karel Zak [Fri, 2 Mar 2012 12:33:46 +0000 (13:33 +0100)] 
tests: wait a moment between mount and umount

It seems that without sleep between mount and umount are the test
unstable, because kernel is not able to provide updated
/proc/self/mountinfo so quickly (really?).

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agotests: update libmount tests
Karel Zak [Fri, 2 Mar 2012 08:57:49 +0000 (09:57 +0100)] 
tests: update libmount tests

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agotests: add tests for mount --make-* stuff
Karel Zak [Thu, 1 Mar 2012 11:30:14 +0000 (12:30 +0100)] 
tests: add tests for mount --make-* stuff

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agotests: make output and diff dirs usage more robust
Karel Zak [Tue, 28 Feb 2012 13:37:45 +0000 (14:37 +0100)] 
tests: make output and diff dirs usage more robust

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agotest: test 'none' source for mount(8)
Karel Zak [Mon, 27 Feb 2012 23:21:48 +0000 (00:21 +0100)] 
test: test 'none' source for mount(8)

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agotests: test non-canonical paths in fstab
Karel Zak [Fri, 24 Feb 2012 20:05:09 +0000 (21:05 +0100)] 
tests: test non-canonical paths in fstab

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add nfsd to mnt_fstype_is_pseudofs()
Karel Zak [Tue, 13 Mar 2012 12:25:49 +0000 (13:25 +0100)] 
libmount: add nfsd to mnt_fstype_is_pseudofs()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolsblk: RQ-SIZE is part of the --topology output (man page bugfix)
Dave Reisner [Fri, 9 Mar 2012 18:32:43 +0000 (13:32 -0500)] 
lsblk: RQ-SIZE is part of the --topology output (man page bugfix)

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolosetup: Fix setting of sizelimit on new loop devices
Daniel Drake [Fri, 9 Mar 2012 17:56:50 +0000 (17:56 +0000)] 
losetup: Fix setting of sizelimit on new loop devices

"losetup --offset 10 --sizelimit 20 foo.img" was producing
a loop device with offset 20 and no sizelimit. Looks like a typo,
fix it.

Signed-off-by: Daniel Drake <dsd@laptop.org>
13 years agofstab.5: fix misspelling of deprecated
Dave Reisner [Tue, 28 Feb 2012 16:45:09 +0000 (11:45 -0500)] 
fstab.5: fix misspelling of deprecated

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
13 years agolibmount: fix "already mounted" detection on systems with mtab
Karel Zak [Fri, 9 Mar 2012 12:11:24 +0000 (13:11 +0100)] 
libmount: fix "already mounted" detection on systems with mtab

For systems with regular mtab the fs->root should be ignored in
"already mounted" heuristic.

Reported-by: Matt Burgess <matthew@linuxfromscratch.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: avoid infinite loop in child fs iteration
Dave Reisner [Sun, 4 Mar 2012 21:08:39 +0000 (16:08 -0500)] 
libmount: avoid infinite loop in child fs iteration

In early userspace, the rootfs is mounted with itself as its parent.
Example /proc/self/mountinfo:

1 1 0:1 / / rw - rootfs rootfs rw
14 1 0:3 / /proc rw,nosuid,nodev,noexec,relatime - proc proc rw
15 1 0:13 / /sys rw,nosuid,nodev,noexec,relatime - sysfs sys rw
16 1 0:5 / /dev rw,nosuid,relatime - devtmpfs dev rw,size=506956k
17 1 0:14 / /run rw,nosuid,nodev,relatime - tmpfs run rw,mode=755

This causes an infinite loop in mnt_table_next_child_fs, and is
evidenced by a crash via infinite recursion in findmnt. Simply catch the
condition where the ID of the parent is the ID of the current fs we're
examining and skip over it to the next mount in the table.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
13 years agoscript: play well with csh when invoked from within /etc/csh.login
Karel Zak [Thu, 8 Mar 2012 15:02:28 +0000 (16:02 +0100)] 
script: play well with csh when invoked from within /etc/csh.login

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=797888
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agofdisk: fix to build for IA32
Christian Wiese [Wed, 15 Feb 2012 12:39:22 +0000 (13:39 +0100)] 
fdisk: fix to build for IA32

Tested architectures:
- i486 using gcc -march=i486
- i586 using gcc -march=pentium-mmx
- i686 using gcc -march={pentiumpro,pentium2,pentium3,pentium-m,pentium4}

Without this fix building fdisk fails for for all tested arch/cpu types
emiting following error:
------------------------------------------------------------------------------
In file included from fdiskbsdlabel.c:62:0:
fdiskbsdlabel.h:61:2: error: #error unknown architecture
fdiskbsdlabel.c: In function 'bselect':
fdiskbsdlabel.c:180:44: error: 'BSD_LABELSECTOR' undeclared (first use in this function)
fdiskbsdlabel.c:180:44: note: each undeclared identifier is reported only once for each function it appears in
fdiskbsdlabel.c: In function 'xbsd_write_bootstrap':
fdiskbsdlabel.c:539:24: error: 'BSD_LABELSECTOR' undeclared (first use in this function)
fdiskbsdlabel.c: In function 'xbsd_readlabel':
fdiskbsdlabel.c:744:28: error: 'BSD_LABELSECTOR' undeclared (first use in this function)
fdiskbsdlabel.c:744:60: error: 'BSD_LABELOFFSET' undeclared (first use in this function)
fdiskbsdlabel.c: In function 'xbsd_writelabel':
fdiskbsdlabel.c:769:32: error: 'BSD_LABELSECTOR' undeclared (first use in this function)
fdiskbsdlabel.c:780:61: error: 'BSD_LABELOFFSET' undeclared (first use in this function)
make[2]: *** [fdisk-fdiskbsdlabel.o] Error 1
------------------------------------------------------------------------------

This fix was tested with following major toolchain components:

binutils 2.21.53.0.2
gcc 4.6.2
glibc 2.14.1

13 years agolsblk: remove (dm-N) from NAME for raw/pair output format
Karel Zak [Wed, 7 Mar 2012 12:11:54 +0000 (13:11 +0100)] 
lsblk: remove (dm-N) from NAME for raw/pair output format

 $ lsblk -P -o NAME /dev/dm-0
 NAME="luks-10d813de-fa82-4f67-a86c-23d5d0e7c30e (dm-0)"

the (dm-0) sucks in the parsable output...

Reported-by: Peter Rajnoha <prajnoha@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agologin: fix LOGIN_CHOWN_VCS code
Karel Zak [Mon, 5 Mar 2012 15:48:38 +0000 (16:48 +0100)] 
login: fix LOGIN_CHOWN_VCS code

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add mnt_fs_streq_target()
Karel Zak [Fri, 2 Mar 2012 14:53:55 +0000 (15:53 +0100)] 
libmount: add mnt_fs_streq_target()

Note that in v2.21.x the function mnt_fs_streq_ are not exported by
libmount API.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add mnt_fs_streq_srcpath()
Karel Zak [Fri, 2 Mar 2012 12:29:39 +0000 (13:29 +0100)] 
libmount: add mnt_fs_streq_srcpath()

We have to be careful with "none" or another dummy sources for pseudo
filesystems. These strings should be canonicalized or compared as a
paths.

The function is not exported by library API.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: cosmetic changes around "none"
Karel Zak [Fri, 2 Mar 2012 10:23:34 +0000 (11:23 +0100)] 
libmount: cosmetic changes around "none"

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: don't treat "none" differently
Dave Reisner [Fri, 2 Mar 2012 03:47:00 +0000 (22:47 -0500)] 
libmount: don't treat "none" differently

This causes more problems than it solves. In the latest edition:

  # mount -t proc none foo
  mount: foo: mount failed: Invalid argument

A check for source and target fails in mnt_context_apply_fstab()
because, even though they were indeed specified on the cmdline,
__mnt_fs_set_source_ptr() altered this and NULL'd out the source.

If you're able to mount this device via other means, other tools start
reporting oddities, such as mount's output:

  (null) on /foo type proc (rw,relatime)

or findmnt:

  TARGET      SOURCE FSTYPE OPTIONS
  /foo               proc   rw,relatime

Simply treat "none" like any other source when passed in.

[kzak@redhat.com: - don't translate NULL to "none" in mnt_fs_set_source()]

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agomountpoint: account for error from in mnt_fs_get_target
Dave Reisner [Fri, 2 Mar 2012 03:46:59 +0000 (22:46 -0500)] 
mountpoint: account for error from in mnt_fs_get_target

commit 04f087ec didn't take into consideration that mnt_fs_get_target()
could return an error, and would therefore show false positives, such
as:

$ mkdir foo; mountpoint foo
foo is a mountpoint

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
13 years agolibblkid: properly reset chain in probe_do_wipe()
Karel Zak [Thu, 1 Mar 2012 13:24:04 +0000 (14:24 +0100)] 
libblkid: properly reset chain in probe_do_wipe()

The command wipefs is not able to remove all signatures from the
device if the first detected signature is linux raid. The another
superblock signatures are ignored. For example:

  # pvcreate /dev/sdb1
  # mdadm --create md8 --metadata=0.90 --chunk=64 --level=0 \
        --raid-devices=2 /dev/sdb1 /dev/sdb2

  # wipefs -a /dev/sdb1

will delete the linux raid signature only.

Reported-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agomountpoint: fix a minor bug with 0:0 devno
Zhi Li [Wed, 29 Feb 2012 08:28:49 +0000 (16:28 +0800)] 
mountpoint: fix a minor bug with 0:0 devno

zhi@debian-lizhi:~$ mountpoint /sys
/sys is not a mountpoint
zhi@debian-lizhi:~$

The problem is in mountpoint.c, function dir_to_device(), which uses 0 as an
error return value, but for sysfs 0 is its device number:

zhi@debian-lizhi:~$ cat /proc/self/mountinfo
14 19 0:0 / /sys rw,nosuid,nodev,noexec,relatime - sysfs none rw
15 19 0:3 / /proc rw,nosuid,nodev,noexec,relatime - proc none rw

My change is on dir_to_device, seperating device number from return value.

Signed-off-by: Zhi Li <lizhi1215@gmail.com>
13 years agomount: (new) add 'internal-only(i)' to non-root allowed options
Raghavendra D Prabhu [Sun, 26 Feb 2012 11:06:42 +0000 (16:36 +0530)] 
mount: (new) add 'internal-only(i)' to non-root allowed options

Commit ce433404 introduced the change, which causes something like mount -i
<user-mount-path> to break which worked well before util-linux-2.21, now it
gives message 'mount: only root can use "--internal-only" option' when that
shouldn't be the case when it is already in fstab.

Signed-off-by: Raghavendra D Prabhu <rprabhu@wnohang.net>
13 years agobuild-sys: add a crosscompile path for scanf_cv_alloc_modifier
Sebastian Andrzej Siewior [Fri, 24 Feb 2012 17:16:07 +0000 (18:16 +0100)] 
build-sys: add a crosscompile path for scanf_cv_alloc_modifier

This allows to building the package cross again. Since the return value
is not used I guess there is little loss.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
13 years agologin: support crazy shadow-utils syntax in login.defs
Karel Zak [Tue, 28 Feb 2012 10:16:16 +0000 (11:16 +0100)] 
login: support crazy shadow-utils syntax in login.defs

standard syntax for FOO=data:

ENV_FOO   data

additional syntax:

ENV_FOO  FOO=data

Reported-by: Colin Guthrie colin@mageia.org
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: allow empty source for mount(2) syscall
Karel Zak [Mon, 27 Feb 2012 23:02:30 +0000 (00:02 +0100)] 
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>
13 years agolibmount: use mount.<type> -s for NFS only
Karel Zak [Mon, 27 Feb 2012 15:43:12 +0000 (16:43 +0100)] 
libmount: use mount.<type> -s for NFS only

Unfortunately, it seems that for example mount.cifs don't care about
the API, so we need exception like the original mount(8).

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agomount: (new) cleanup mount -a return codes
Karel Zak [Fri, 24 Feb 2012 22:03:22 +0000 (23:03 +0100)] 
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>
13 years agolibmount: canonicalize targets from fstab on mount -a
Karel Zak [Fri, 24 Feb 2012 21:52:45 +0000 (22:52 +0100)] 
libmount: canonicalize targets from fstab on mount -a

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: optimize for paths with tailing slash
Karel Zak [Fri, 24 Feb 2012 20:30:22 +0000 (21:30 +0100)] 
libmount: optimize for paths with tailing slash

mnt_table_find_target() canonicalizes paths by libmnt cache, but it's
overkill if the difference between paths is tailing slash only.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolib/canonicalize: always remove tailing slash
Karel Zak [Fri, 24 Feb 2012 20:26:11 +0000 (21:26 +0100)] 
lib/canonicalize: always remove tailing slash

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: canonicalize all paths from (fs)tab
Karel Zak [Fri, 24 Feb 2012 19:25:43 +0000 (20:25 +0100)] 
libmount: canonicalize all paths from (fs)tab

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=797216
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolosetup: add --detach-all to the list of options
Petr Uzel [Fri, 24 Feb 2012 10:51:53 +0000 (11:51 +0100)] 
losetup: add --detach-all to the list of options

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
13 years agobuild-sys: don't create empty man/ru directory
Karel Zak [Fri, 24 Feb 2012 13:09:27 +0000 (14:09 +0100)] 
build-sys: don't create empty man/ru directory

Based on master branch patches:

dda92fe093f761916b49e9bd11609d2057da8d62 build-sys: s/ruman/ruman1/
7aa8bdb50e49d18ad07d708a9ccfbf0ffbfaf612 docs: do not overwrite ddate.1 manual
6a0335d6cbdedeacc0afef251a53c945699ddea7 build-sys: don't create empty man/ru directory

Reported-by: Tom Gundersen <teg@jklm.no>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: release++ (v2.21) v2.21
Karel Zak [Fri, 24 Feb 2012 10:53:46 +0000 (11:53 +0100)] 
build-sys: release++ (v2.21)

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodocs: update v2.21-ReleaseNotes
Karel Zak [Fri, 24 Feb 2012 10:52:12 +0000 (11:52 +0100)] 
docs: update v2.21-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agodocs: update AUTHORS file
Karel Zak [Fri, 24 Feb 2012 10:44:38 +0000 (11:44 +0100)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agopo: merge changes
Karel Zak [Fri, 24 Feb 2012 10:38:14 +0000 (11:38 +0100)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agopo: update uk.po (from translationproject.org)
Yuri Chornoivan [Fri, 24 Feb 2012 10:32:59 +0000 (11:32 +0100)] 
po: update uk.po (from translationproject.org)

13 years agopo: update pl.po (from translationproject.org)
Jakub Bogusz [Fri, 24 Feb 2012 10:32:59 +0000 (11:32 +0100)] 
po: update pl.po (from translationproject.org)

13 years agopo: update nl.po (from translationproject.org)
Benno Schulenberg [Fri, 24 Feb 2012 10:32:59 +0000 (11:32 +0100)] 
po: update nl.po (from translationproject.org)

13 years agopo: update fr.po (from translationproject.org)
David Prévot [Fri, 24 Feb 2012 10:32:59 +0000 (11:32 +0100)] 
po: update fr.po (from translationproject.org)

13 years agopo: update cs.po (from translationproject.org)
Petr Písař [Fri, 24 Feb 2012 10:32:59 +0000 (11:32 +0100)] 
po: update cs.po (from translationproject.org)

13 years agoumount: respect fs search path
Mike Frysinger [Thu, 16 Feb 2012 19:59:26 +0000 (14:59 -0500)] 
umount: respect fs search path

This brings search path support to umount to match existing behavior
in fsck and mount.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>