Commit Graph

8471 Commits

Author SHA1 Message Date
Karel Zak 8026fa9bc7 build-sys: use -lutil for BSD only
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-09-17 10:56:46 +02:00
Andreas Henriksson 2eaac5489b ipcrm: add hacks to avoid FTBFS
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
2014-09-17 10:15:14 +02:00
Christoph Egger c32270d41f agetty: fixing FTBFS on !linux (Debian util-linux 2.20.1-1.2)
Handle vc flags missing on FreeBSD
Fix tty creation on kFreeBSD taking patch from 2.19

Addresses-Debian-Bug: #650185
2014-09-17 10:14:50 +02:00
Aurelien Jarno e4a382b777 ipcs: remaining kFreeBSD hackery for building.
Addresses-Debian-Bug: #527384
Signed-off-by: LaMont Jones <lamont@debian.org>
2014-09-17 10:14:19 +02:00
Robert Millan 62efb93f36 lib/blkdev: report correct disk size on GNU/kFreeBSD. Thanks Tuco.
Addresses-Debian-Bug: 592292
2014-09-17 10:13:50 +02:00
Karel Zak a3b92242ad libmount: hide details about failed search in fstab/mtab
The current code returns -errno when not found "mount /foo" in fstab
and mtab does not exist (or /etc/mtab points to non-mounted /proc).

This is problem because the return value is too low-level and maybe
misinterpreted by top level code. It's better to always return
MNT_ERR_NOFSTAB when not found in fstab/mtab.

Reported-by: Dylan Cali <calid1984@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-09-16 15:30:03 +02:00
Boris Egorov 73f2bec5f8 lscpu: fix cppcheck warnings
CppCheck founds a few wrong arguments in format strings and a NULL
pointer dereference.

Amended version with fixed strcmp() usage.

Signed-off-by: Boris Egorov <egorov@linux.com>
2014-09-16 11:16:09 +02:00
Jaromir Capik 0cbdf6e22f fdformat: fixing copy'n'paste issue in the manual
The end track default is media specific, not zero.
2014-09-16 11:14:25 +02:00
Karel Zak bfc0b37ee9 travis: whitelist branches
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-09-09 15:55:53 +02:00
Karel Zak 3c2e64b0ca lsblk: add notes about udev to the man page
Reported-by: Francis Moreau <francis.moro@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-09-05 10:02:45 +02:00
Michael Marineau cb52ac9847 build-sys: create parent directory for $(PATHFILES)
When building outside the source tree there is nothing to guarantee the
target directory exists before writing to it. Most of the time this just
happens to work because something else creates the directory but not
always. For example:

    $ mkdir build
    $ cd build
    $ ../configure --disable-dependency-tracking
    $ make libuuid/uuid.pc
      GEN      libuuid/uuid.pc
    /bin/sh: line 2: libuuid/uuid.pc.tmp: No such file or directory
    make: *** [libuuid/uuid.pc] Error 1
2014-09-03 09:50:24 +02:00
Karel Zak 7b83dcc8a8 libfdisk: add support for sfdisk-like script format
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-09-02 13:51:32 +02:00
Karel Zak 4b43f7c96b libfdisk: (gpt) follow label-id from script
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-09-01 15:01:34 +02:00
Karel Zak 9138d6f972 libfdisk: add functions to apply partitiong scripts
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-09-01 14:44:39 +02:00
Karel Zak ee50336c03 libfdisk: (gpt) don't align last possible LBA
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-09-01 14:42:12 +02:00
Karel Zak 73b7c331b3 libfdisk: rename fdisk_dump_ to fdisk_script_
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-09-01 11:16:21 +02:00
Karel Zak 6e5e9368a0 libfdisk: fix fdisk_delete_all_partitions()
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-09-01 11:14:18 +02:00
Karel Zak 3c0e6b1530 libfdisk: add fdisk_apply_table() and fdisk_delete_all_partitions()
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-08-29 11:18:29 +02:00
Karel Zak a835add045 libfdisk: improve debug messages
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-08-29 09:57:51 +02:00
Karel Zak b1c5a4be93 libfdisk: accept dump with quotes
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-08-29 09:55:31 +02:00
Karel Zak 7bc31adac4 libfdisk: (dos) follow bootable setting when add partition
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-08-29 09:19:13 +02:00
Karel Zak 8d95e7e0e4 libfdisk: (gpt) allow to specify uuid and name when create new partition
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-08-28 14:42:55 +02:00
Karel Zak 080633e43d libfdisk: (gpt) set_{name,uuid} functions refactoring
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-08-28 14:16:56 +02:00
Karel Zak 62a9ef3e2f libfdisk: add reference to context to dump
* add fdisk_ref_context() function

 * context is necessary to parse label specific partition types

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-08-28 13:03:23 +02:00
Karel Zak c7119037f0 libfdisk: use reference counting for context
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-08-28 12:49:16 +02:00
Karel Zak c1ba586395 libfdisk: extend dump parsing function
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-08-28 12:37:46 +02:00
Karel Zak afef428f40 libfdisk: (dos) fix typo
Reported-by: https://github.com/Mikachu
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-08-28 10:45:58 +02:00
Karel Zak d947f85df4 include/optutils: fix typo
Reported-by: Rafael Ferreira <rafael.f.f1@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-08-28 08:39:54 +02:00
Karel Zak 59af21c3f2 cfdisk: fix typo in the previous commit
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-08-26 22:19:26 +02:00
Karel Zak ce3134dfdd cfdisk: wrong interpretation of yes in non-english language
Reported-by: tnut@nutyx.org
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-08-26 17:03:11 +02:00
Karel Zak 613596b387 libfdisk: (dos) fix logical partitions add/delete code
If you delete logical partition and then create a new one than fdisk
(and cfdisk) might write EBR to the first sector on the device. That's
wrong of course; because you will lost MBR (primary partitions).

(Probably introduced by commit bcddbe9688
 where code completely clears EBR stuff.)

Reported-by: Michał Górny <mgorny@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-08-26 16:54:45 +02:00
Karel Zak 1d691b258e libfdisk: vary basic dump parsing functions
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-08-25 15:33:02 +02:00
Karel Zak 22e9e9c8e9 libblkid: move string trim function to strutils.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-08-25 15:31:53 +02:00
Karel Zak cb4d680467 libfdisk: basic fdisk_dump_* functions
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-08-22 14:43:52 +02:00
Karel Zak 385810d22a libfdisk: remove debug dump function, cleanup API
The fdisk_dump_* prefix will be used for sfdisk-like functionality.
The patch also add FDISK_ prefix to fdisk_get_unit() options.

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-08-22 10:25:35 +02:00
Dave Reisner 44e9d52e52 mountpoint: clarify that it works on files
fef4dfa174 removed the restriction that the argument must explicitly be
a directory, so let's fix up the documentation to reflect that.

Signed-off-by: Karel Zak <kzak@redhat.com>
2014-08-22 08:14:29 +02:00
Dave Reisner fef4dfa174 mountpoint: drop S_ISDIR check
Files can be mountpoints, too.
2014-08-21 15:05:45 +02:00
Karel Zak e4ea53de0b libmount: use -t for type.subtype in helpers API
References: https://github.com/karelzak/util-linux/issues/116
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-08-21 14:58:40 +02:00
Sami Kerola 7be73458b8 tests: apply travis clang PATH workaround
As seen in Travis build log the clang is not found, causing one of the
tests to fail.  This change adds a workaround from Travis issue 2607 to
util-linux.

Reference: https://travis-ci.org/karelzak/util-linux/jobs/33056101#L3630
Reference: https://github.com/travis-ci/travis-ci/issues/2607
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-08-21 10:01:01 +02:00
Karel Zak 59c6ac0b92 logger: use generic --id=<id>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-08-20 12:24:40 +02:00
Karel Zak 0d9865d06e Merge remote-tracking branch 'sami/logger' 2014-08-20 12:09:38 +02:00
Karel Zak 6b11aad26b libfdisk: fix fdisk_get_optimal_iosize() and update tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-08-20 11:43:02 +02:00
Aurelien Jarno a80886e93c tests: fix fdisk/bsd for the two possible sectors/offsets
BSD disklabels depend on the endianess, but also on the architecture as
one can see in include/pt-bsd.h with the BSD_LABELSECTOR and
BSD_LABELOFFSET #define. This cause the testsuite to fail on the
affected architectures as the disk image is not the same as the expected
result.

Commit 180b3a7e tried to fix the endianess, but the special PowerPC case
has been chosen as a reference, so it still fails for example on MIPS BE
or S/390.

This patch fixes the testsuite by converting the md5sums to the expected
values, still depending on the endianess, but also for the two possible
sectors/offsets. This has been tested on Alpha, MIPS, PowerPC and x86-64,
so this should cover all 4 cases.

Cc: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2014-08-20 10:47:11 +02:00
Benno Schulenberg 42f15e9848 docs: bring the chrt and taskset man pages closer to standard formatting
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-08-20 10:47:10 +02:00
Benno Schulenberg a7560c0655 textual: make the license of chrt and taskset slightly more explicit
This makes it match the license of the man pages.
While there, also tweak some other comment lines.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-08-20 10:47:09 +02:00
Benno Schulenberg 5aab9a1aee docs: make the man-page licenses of chrt and taskset match their intent
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-08-20 10:47:08 +02:00
Benno Schulenberg 882be62610 docs: improve the description of --size in the man page of zramctl
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-08-20 10:47:07 +02:00
Sami Kerola b09697c3e0 docs: mentintion default udp and tcp ports logger is using
The fact that 'syslog tcp/514' does not exist in RFS's, which has lead
to 'syslog-conn 601/tcp' be used in place could be a suprice and should
be told in manual.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-08-15 21:52:12 +01:00
Sami Kerola 46ee14df66 logger: set function arguments read-only when possible
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-08-15 21:52:12 +01:00
Sami Kerola 77c3bd5bf6 logger: optimize string initializations
Setting whole array to be completely full of nulls cannot be as quick as
making the only significant member of the array when needed.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-08-15 21:52:12 +01:00