Karel Zak [Wed, 27 Aug 2008 09:55:39 +0000 (11:55 +0200)]
blkid: add basic configure.ac stuff and blkid.pc
Note, the configure.in stuff is incomplete -- but it's seem we can
remove the libbevmapper crap from blkid at all. So this code autoconf
is temporary only.
Roy Peled [Fri, 28 Nov 2008 14:57:00 +0000 (16:57 +0200)]
mkfs.cramfs: lower memory requirements for layouts with duplicate files
mkfs.cramfs allocates memory based on a calculated upper-bound
of required filesystem size. If there are duplicate files
or hard links, the current implementation unnecessarily increases
the upper-bound per each copy of the file, even though cramfs does
not store copies of contents of identical files.
This patch improves the calculation of fslen_ub, the upper bound
of required filesystem size, by making the upper bound aware of
duplicate files.
This is very helpful for layouts that hold a lot of hard links,
which are seen as duplicate files by mkfs.cramfs. For example,
this drastically reduces the memory requirements for creating
a standard Busybox layout.
Signed-off-by: Roy Peled <the.roy.peled@gmail.com>
mkfs.cramfs: add endianness support to cramfs tools
cramfs is an endianness dependent file system. So far, the cramfs
utilities did not support cramfs images of different endianness than
the host machine.
A separate utility, cramfsswap, was required in order to change the
endianness of the image before and after using cramfs utilities. The
extra utility introduced extra maintenance and an additional step in
the process.
This patch adds endianness support to mkfs.cramfs and fsck.cramfs.
fsck.cramfs now automatically detects the image endianness, and can
work on images of either endianness. mkfs.cramfs now accepts a new
optional parameter (-N) that allows creating the cramfs image in
either endianness.
Signed-off-by: Roy Peled <the.roy.peled@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Fri, 16 Jan 2009 11:21:15 +0000 (12:21 +0100)]
mount: non-setuid (POSIX file capabilities) support
The mount command does not work properly if you replace suid with
POSIX file capabilities. We still need to check for non-root mounts and
the command has to work in very restricted mode for non-root users.
This patch allows you to remove suid bit from mount and umount. Note
that you need a system with filesystem capability support, e.g.
Fedora 10).
Marco d'Itri [Sun, 25 Jan 2009 16:44:16 +0000 (17:44 +0100)]
rtcwake: support not suspending
People usually want to use pm-utils to suspend the system instead of
the raw kernel interface, so I added an option to just exit after
configuring the wakeup time.
Actually I think that all the suspend code should be removed from
rtcwake, since it does not really belong there.
mount: document newinstance and ptmxmode options to devpts
Support for multiple instances of devpts were included in 2.6.29-rc1.
Update man pages to document the new options. Additional details about
the new options are described in 'Documentation/filesystems/devpts.txt'
of kernel source tree.
Reviewed-by: WANG Cong <wangcong@zeuux.org> Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Tue, 6 Jan 2009 23:18:41 +0000 (00:18 +0100)]
umount: cleanup gefs_by_specdir()
fix:
- don't call canonicalize_spec() for LABELs/UUIDs
- simplify the code
- rename to getfs_by_devdir(), because we use it only for
device names and not for SPECes (see umount.c).
Karel Zak [Fri, 26 Dec 2008 00:09:34 +0000 (01:09 +0100)]
raw: default to /dev/raw/rawctl
The raw devices are in the raw/ subdirectory. It makes sense to use
the same subdirectory also for the control file. The old /dev/rawctl
is also supported as a fallback.
The #ifdef OLD_RAW_DEVS (/dev/raw<N>) is unsupported from now.
Karel Zak [Mon, 22 Dec 2008 17:46:45 +0000 (18:46 +0100)]
mount: add rootcontext= SELinux mount option
Note, the description in the mount.8 man page is copy & paste from
rootcontext= kernel patch (by James Morris). I didn't found anything
more useful... (patches welcomed:-)
Matthias Koenig [Thu, 27 Nov 2008 11:32:56 +0000 (12:32 +0100)]
swapon: add swap format detection and pagesize check
As swap format depends on the pagesize being used, it may happen
that the pagesize of the swap space and the current pagesize differ,
resulting in swapon to fail when trying to enable such a swap space.
In such a case swapon should rather reinitialize the swap space.
[kzak@redhat.com: - add blkdev.c to the global swapon_SOURCES
- don't try to detect for huge pages on small swap
areas (or when read() returns less than MAX_PAGESIZE)
- fix fprintf() format string]
Co-Author: Olaf Hering <olh@suse.de> Signed-off-by: Matthias Koenig <mkoenig@suse.de> Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 19 Nov 2008 10:07:58 +0000 (11:07 +0100)]
build-sys: move pivot_root(8) to sys-utils
This patch moves pivot_root.{8,c) from mount/ to sys-utils/ directory.
There is not ant relation between pivot_root source code and the rest of
code in the mount.
Matthias Koenig [Thu, 6 Nov 2008 13:45:38 +0000 (14:45 +0100)]
losetup: try to set up loop readonly if EACCES
Currently mounting/losetup an image fails if it is accessable readonly.
There are no problems if it is a file on a local filesystem.
It seems only to happen if it is a NFS mounted image, which is
read-write in permission but with root_squash option.
set_loop checks only for EROFS to retry open with readonly mode,
but in this case we get EACCES.