mkfs.cramfs on version v2.17.2 has a small bug when dealing with very small
filesystems. look at upstream code on git, and the issue is still here.
ex:
$ cd /tmp
$ mkdir content
$ echo hello > content/a
$ echo hello > content/b
$ mkfs.cramfs content content.cramfs
not enough space allocated for ROM image (4090 allocated, 4096 used)
Here is a patch for fixing (simply rounding to page size AFTER eleminating
doubles).
Signed-off-by: Arnaud Mouiche <arnaud.mouiche@invoxia.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Recent Linux kernel supports FALLOC_FL_PUNCH_HOLE in fallocate(2).
This patch adds FALLOC_FL_PUNCH_HOLE support to fallocate utility,
by introducing a new option -p|--punch-hole.
[kzak@redhat.com: - fix merge conflict in fallocate.1]
Cc: Karel Zak <kzak@redhat.com>
Cc: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
prlimit.c: Alternatively to applying the limits to an existing process via the
--pid option, allow a command to be executed. Adapted usage() accordingly.
prlimit.1: mention new syntax.
Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
This fixes the buffer length passed to blkid_probe_get_buffer() calls,
and the block size byte order (on little-endian systems).
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
This patch makes mount command read fstab.d/*.fstab if the command
is built with --enable-libmount-mount.
[kzak@redhat.com: - add some info to fstab.5 and mount.8 man pages
- use error callback for tab parser]
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
The commit 75aaee08f0 introduces
regression:
$ echo '#!/bin/sh' > test.sh
$ chmod a+rx test.sh
$ flock -eon ./test.sh ./test.sh
flock: ./test.sh: Text file busy
The lock file cannot be opened in read-write mode by default, because
then we cannot use flock(1) to lock executable files.
The read-write mode for lock files is necessary on NFSv4 where
flock(2) is emulated by by fcntl() -- this situation is possible to
detect by flock(2) EIO error.
This patch reverts the default to O_RDONLY and use O_RDWR only if EIO
error is detected.
Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
This patch makes the code more robust. We should not share the same
pointer for old and new arguments for prlimit(2) syscall.
Reported-by: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
# prlimit --nofile=:4000 --pid $$
When the PID is given later than a partially given limit, then prlimit
used the current PID for getting the missing part (hard, soft) of the
limit.
Factored out the retrieval of the unknown limit from parse_prlim() to
new get_unknown_hardsoft() which is to be called by do_prlimit() based
on the struct prlimit member 'modify' set by add_prlim().
[kzak@redhat.com: - use prlimit->mofify as mask
- add soft vs. hard limit check from another
Bernhard's patch]
Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
- differentiate between set and get operations
- add limit name to the error message
- remove PID from the message (whole util works always with only one
PID, so this info is superfluous)
Reported-by: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
Fix option parsing: prlimit ran into usage() if called
without arguments which should only be done for surplus
arguments. Instead, it should display all limits.
Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
This accidentally fixes a mistake printing the "Partition n is deleted"
message as the 'i' variable get decremented or incremented in case of
logical partitions.
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
If a mount point cannot be moved to the new root, umount it with
MNT_DETACH, so that it is lazy umounted and does not show up in
/proc/mounts anymore.
[kzak@redhat.com: - add MNT_DETACH macro fallback]
Signed-off-by: Harald Hoyer <harald@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
This allows the creation of a new label if the disk already has an existing
SGI disklabel without working around this problem such as creating a DOS
disklabel or overwriting with zero the partition table (problem reported in
'Gentoo Linux/MIPS Handbook').
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
DOS and SGI label menus are unchanged. BSD label command
descriptions change slightly to use a common form.
This also removes an useless menu entry in SUN label menu to
edit bsd disklabel.
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* 'sys-utils-3rd' of https://github.com/kerolasa/lelux-utiliteetit:
ldattach: add default case to switches
ldattach: convert debug macro to function
ldattach: check numeric user inputs with strtol_or_err
ldattach: align with howto-usage-function.txt
ldattach: fix coding style
docs: add long options to readprofile.8
readprofile: fix coding style
readprofile: use libc error printing facilities
readprofile: add long options
docs: align tunelp.8 with howto-man-page.txt
docs: add long options to tunelp.8
tunelp: add long options and align with howto-usage-function.txt
tunelp: use libc error printing facilities
tunelp: use symbolic exit values
tunelp: fix coding style
switch_root: add nls support
switch_root: align with howto-usage-function.txt
unshare: align with howto-usage-function.txt
rtcwake: align with howto-usage-function.txt
setsid: add long options and fix coding style