Commit Graph

6455 Commits

Author SHA1 Message Date
Karel Zak bcb693de80 uuidd: clean up error messages
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-15 00:18:27 +02:00
Karel Zak 28b856ff88 mkfs.cramfs: use standard error message
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-14 23:54:07 +02:00
Karel Zak 41a8ff088b hwclock: use warn() to print cmos errors
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-14 23:41:32 +02:00
Karel Zak 9104cd2850 libmount: use err.h in test
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-14 23:40:51 +02:00
Karel Zak 69e74525bb chcpu: clean up error messages
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-14 23:33:59 +02:00
Karel Zak 4b3624ca21 sulogin: clean up error messages
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-14 23:29:09 +02:00
Karel Zak 84992b8ad6 libblkid: add ReFS magic string
Reported-by: "Richard W.M. Jones" <rjones@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-14 15:53:14 +02:00
Karel Zak 08af448f5c blkid: fix typo in ID_FS_AMBIVALEN=
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-14 15:03:30 +02:00
Karel Zak 0b56c45956 libmount: don't ignore root fs on umount -a
The release v2.22 (the new umount) introduces a regression when root
fs is excluded from umount --all. There is not reason for this
exception. The libmount should be smart enough to disable mtab update
after rootfs umount.

Reported-by: Bruce Dubbs <bruce.dubbs@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-14 10:32:56 +02:00
Karel Zak 507341f832 lib/tty: don't hardcode terminal fd in get_terminal_name()
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-13 15:40:57 +02:00
Mike Frysinger 66083665d5 standard SEE ALSO section of man pages
The standard format is to seperate each entry with a comma, and
for each one to be on a line by itself.  Most util-linux pages
follow this, but a few do not.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-05-13 14:42:59 +02:00
Karel Zak 460c7afb79 lsblk: add SERIAL column
... to return short serial number of the disk (from udev db)

Addresses: https://github.com/karelzak/util-linux/issues/33
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-13 13:33:41 +02:00
Karel Zak 8810d532a8 tests: add losetup tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-13 13:13:24 +02:00
Karel Zak 9f56106df6 losetup: add --raw and --noheadings
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-13 12:00:24 +02:00
Karel Zak b048b8af3a losetup: use warn_size() for regular files only
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-13 11:00:47 +02:00
Karel Zak e3b6cb87e0 lib/loopdev: fix loopcxt_check_size() to work with blkdevs
The loopcxt_check_size() is workaround for kernels < v3.9, kernel has
been fixed by commit 541c742a7559eb65f0e36d3e2338c2ca532a3e61.

The function sets loopdev size according to backing file size. The
problem is that the backing file could be a block device where
stat.st_size is zero, so we have to use blkdev_get_size() for block
devices.

Addresses: https://bugs.archlinux.org/task/35193
Reported-by: Dave Reisner <d@falconindy.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-13 10:54:41 +02:00
Karel Zak 5673f30de6 libfdisk: don't re-allocate range string in Ask API
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-09 13:20:35 +02:00
Karel Zak 4fb18cde32 libfdisk: do not use va_list in the Ask API
# fdisk /dev/sda
  Welcome to fdisk (util-linux 2.23).

  [...]

  Command (m for help): a
  Segmentation fault (core dumped)

It's too fragile, the va_list implementation is architecture specific
and it seems we need such thing in libfdisk at all.

Reported-by: "Gabor Z. Papp" <gzp@papp.hu>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-09 13:06:02 +02:00
Karel Zak a21aa92fd4 libmount: use MS_SILENT for /{proc,etc}/filesystems
mount(8) needs to be doing silent mounts when doing this brute
forcing or when the filesystem is not explicitly specified.

Reported-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-09 09:25:31 +02:00
Karel Zak 7697771d8f build-sys: use -Wno-clobbered for some BSD crap
* extend UL_WARN_ADD() for accept non-default CFLAGS variable
 * add BSD_WARN_CFLAGS with -Wno-clobbered
 * use all this for pg(1) and more(1)

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-07 09:50:22 +02:00
Karel Zak b7faf99128 lib/colors: add colormode_or_err()
... to make the code easy to use in utils.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-07 09:09:35 +02:00
Davidlohr Bueso a971fa18b6 prlimit: delete rem_prlim prototype
We can just move the function up before any of its callers.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2013-05-06 19:27:03 +02:00
Mike Frysinger b77ce61eb3 docs: note ddate removal
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-05-06 19:27:00 +02:00
Sami Kerola 30b44cf1e7 dmesg: fix usage() typo
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-05-06 19:26:58 +02:00
Karel Zak 9bc2b51a06 dmesg: support --color[={auto,always,never}]
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-06 19:11:28 +02:00
Karel Zak a10c043493 lib/colors: add support for auto, always and never modes
... to implement --color[=<when>]

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-06 19:07:23 +02:00
Benno Schulenberg 0bd341508e su: consistent angular brackets and lowercase in help text of 'su'
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-05-06 17:42:08 +02:00
Karel Zak aab691cf8d libblkid: fix blkid_parse_tag_string() to ignore incomplete tags
fstab entry:

    FOO=     /       btrfs  defaults       1 1

Program received signal SIGABRT, Aborted.
0x00007f016ccd8819 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56   return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
(gdb) bt
    at ../sysdeps/unix/sysv/linux/libc_fatal.c:196

Reported-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-06 17:20:03 +02:00
Benno Schulenberg a48c321dd1 textual: fixing typos in a warning and an error message
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-04-26 13:55:29 +02:00
Karel Zak bf74d70c64 cfdisk: fix ambiguous code
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-26 13:54:24 +02:00
Karel Zak d78d040933 build-sys: add --disable-setterm
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-26 13:47:54 +02:00
Sami Kerola 69f1cad4ca libmount: (test) check writing to a file was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-26 13:40:27 +02:00
Sami Kerola 7f587afc67 wall: check writing to a file descriptor was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-26 13:26:07 +02:00
Sami Kerola 1469971535 swapon: check writing to a file descriptor was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-26 13:26:07 +02:00
Sami Kerola 05cef8eafb setpriv: check writing to a file descriptor was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-26 13:26:07 +02:00
Sami Kerola 5f52af507b fallocate: check writing to a file descriptor was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-26 13:26:07 +02:00
Sami Kerola de2ca55931 swaplabel: check writing to a file descriptor was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-26 13:26:07 +02:00
Sami Kerola 833b7e0d80 mkswap: unify write check to a file descriptor
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-26 13:26:07 +02:00
Sami Kerola 616fbb3af8 mkfs.minix: check writing to a file descriptor was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-26 13:26:07 +02:00
Sami Kerola 393fb46501 mkfs.cramfs: unify write check to a file descriptor
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-26 13:26:07 +02:00
Sami Kerola 0dfd626f54 mkfs.bfs: check writing to a file descriptor was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-26 13:26:07 +02:00
Sami Kerola 564dd4af5d fsck.minix: check writing to a file descriptor was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-26 13:26:07 +02:00
Sami Kerola 83f210e8f9 fsck.cramfs: check writing to a file descriptor was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-26 13:26:06 +02:00
Sami Kerola 3757e57f7b wdctl: check writing to a file descriptor was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-26 13:26:06 +02:00
Sami Kerola 835d1b7d2e sfdisk: check writing to a file descriptor was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-26 13:26:06 +02:00
Sami Kerola c8e8b916ab cfdisk: check writing to a file descriptor was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-26 13:26:06 +02:00
Sami Kerola dd79e7c9d0 resizepart: check writing to a file descriptor was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-26 13:26:06 +02:00
Sami Kerola 8387429006 partx: check writing to a file descriptor was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-26 13:26:06 +02:00
Sami Kerola 5efee9d414 fdformat: check writing to a file descriptor was successful
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-26 13:26:06 +02:00
Sami Kerola f416563b28 include: add close_fd() for noticing write errors before close()
Essentially this helper function is similar to close_stream(), but for
file descriptors.

When a file descriptors are close()'d status of write is often
overlooked.  The close_fd() will try to determine what happen to writes
with fsync() before closing the file descriptor.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-26 13:26:06 +02:00