Karel Zak [Thu, 29 Jul 2010 12:18:46 +0000 (14:18 +0200)]
mount: fix "mount -a" for auto-clear loopdevs and /proc/mounts
The "mount -a" uses /etc/mtab to detect already mounted file systems
from /etc/fstab -- this check requires the same FS name (1st field)
in fstab and mtab.
On systems with enabled auto-clear loop devies or systems without
regular mtab (symlink to /proc/mounts) there is /dev/loopN rather
than image filename in mtab. For example:
fstab:
/mnt/store/foo.ISO /mnt/image auto defaults 0 0
mtab:
/dev/loop0 /mnt/image iso9960 rw 0 0
We have to scan all available loop devices to check if some of the
devices is not associated with the image file from fstab.
Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=618957 Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 20 Jul 2010 09:37:23 +0000 (11:37 +0200)]
mount: don't use auto-clear loopdev if mtab is available
# mount /home/images/floppy.img /mnt/test2
# mount | grep loop
/dev/loop0 on /mnt/test2 type udf (rw)
mount(8) with auto-clear loopdev does not store information about the
original backing file (the image) to /etc/mtab. (Note that this is our
long-term goal, because we want to remove mtab from Linux.)
Unfortunately, losetup(8) is not able to provide full path for the
backing file, because LOOP_GET_STATUS ioctl uses 64 bytes for the
filename...
So, without the information about the backing file in mtab the
information about mapping between the file and the loopdev is
unaccessible from userspace.
From my point of view it would be nice to add all necessary
information about loopdevs to /sys rather than rely on broken
LOOP_GET_STATUS[64] ioctls.
with this patch:
# mount /home/images/floppy.img /mnt/test2
# mount | grep loop# mount | grep loop
/home/images/floppy.img on /mnt/test2 type udf (ro,loop=/dev/loop0)
Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=615389 Signed-off-by: Karel Zak <kzak@redhat.com>
According to a search on the internet, the 200 file number is not a
posix shell feature, since posix shells are only mandated to have 1
through 9. I haven't verified that this claim is right, but, at least
dash doesn't like the 200. So here is a patch for the flock man page
that replaces 200 with 9.
Signed-off-by: Patrice Dumas <pertusus@free.fr> Signed-off-by: Karel Zak <kzak@redhat.com>
Jeff Mahoney [Wed, 7 Jul 2010 08:01:17 +0000 (10:01 +0200)]
swapon: Document btrfs limitation with swapfiles
Btrfs, as of 2.6.35, is unable to allow swapfiles to be used on its
filesystems. This is due to the swapfile implementation wanting to
build an extent map of each block in the file and expecting it to be
static for the life of the swapfile.
Btrfs can't guarantee this and refuses to return the mapping. The
swapfile implementation just makes a comment about there being holes
in the file - but that's how btrfs denies the mapping.
This patch adds a section to the swapon manpage to document it.
Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Mike Frysinger [Thu, 1 Jul 2010 17:41:40 +0000 (13:41 -0400)]
cfdisk: search for ncursesw/ncurses.h
Some distros install the wide version of ncurses side by side with the
non-wide version and place the wide headers in an ncursesw/ subdir. So
detect that behavior and include the right header with cfdisk.
Karel Zak [Thu, 1 Jul 2010 08:43:06 +0000 (10:43 +0200)]
build-sys: explicitly check for slang.h
The slang/slcurses.h contains
#includes <slang.h>
but we don't use -I/usr/include/slang (and this is also missing in
slang.pc), it means that we have manually include the slang.h file
in our configure script.
Note this is Fedora-12, maybe some others distros have more usable
slang headers...
Note that option -v0 is obsolete, and remove the now unneeded comment
about new-style swap areas. Further doublespace sentences, add some
commas and articles, and alphabetize the options.
ipcs: advise translators a different output format
Shared memory status output format need changes but there are backward
compatibility problems. This is a invite to apply in translations the
same style used for the rest of the summaries as well as for the limits
reported by -l option.
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
Karel Zak [Wed, 16 Jun 2010 08:52:20 +0000 (10:52 +0200)]
fdisk: extend -c and -u options to support old DOS stuff
The DOS mode and cylinders as display units are disabled by default
now. For users who need old DOS behavior is it necessary to extend
-c (compatibility) and -u (units) command line options. The change is
backwardly compatible (so people who already uses -u and -c are not
affected with this change). New form:
-c[=<mode>] where <mode> is 'dos' or 'nondos' (default)
-u[=<units>] where <units> is 'cylinders' or 'sectors' (default)
For example old deprecated DOS behavior could be enabled by:
chrt: change two messages into four translatable sentences
In several languages the translations for "current" and "new" will
have to be slightly different depending on whether they apply to
"policy" or "priority". (As a general rule, translatable messages
should be full sentences, and not partial ones with optional words
filled in via %s.)
Signed-off-by: Benno Schulenberg <bensberg@justemail.net> Signed-off-by: Karel Zak <kzak@redhat.com>