Commit graph

6464 commits

Author SHA1 Message Date
Karel Zak
c15aec8606 libfdisk: (gpt) use le64_to_cpu() for alternative LBA checks
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-18 12:27:43 +02:00
Karel Zak
7553740c01 libblkid: remove obsolete code
... forgot in the previous commit to the swap prober.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-18 11:56:46 +02:00
Karel Zak
c4cc7b4160 libblkid: ubifs is LE
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-18 11:50:56 +02:00
Karel Zak
fa86784f14 libblkid: make swap detection arch independent
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-18 11:36:09 +02:00
Karel Zak
7194825b7b tests: fix compiler warning
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-18 11:23:34 +02:00
Karel Zak
6e93c52fbb build-sys: use pkg-config results for libuser
Our code depends on libuser >= 0.58, it's better to completely rely on
pkg-config results rather than also call UL_CHECK_LIB (that overwrites
previous pkg-config have_user= result independently on libuser
version).

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-18 10:50:30 +02:00
Karel Zak
e1b8ba200b build-sys: fix UL_REQUIRES_HAVE
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-18 10:19:35 +02:00
Karel Zak
48469f9086 fdisks: fix compiler warning
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-17 17:35:47 +02:00
Karel Zak
a303e047bb sulogin: fix compiler warnings
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-17 17:23:26 +02:00
Karel Zak
6cd4beac3d build-sys: fix nsenter requirements
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-17 17:05:48 +02:00
Karel Zak
6d791b4cc0 include: fix SYS_{unshare,nsenter} usage
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-17 16:58:00 +02:00
Karel Zak
4581b716b5 lscpu: set 32-bit / 64-bit for ppc
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-17 16:20:10 +02:00
Karel Zak
edb0b73d85 libblkid: use more robust code in silicon_raid checksum prober
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-17 16:17:46 +02:00
Karel Zak
320173e653 libblkid: fix silicon raid checksum code on BE
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-16 13:45:49 +02:00
Karel Zak
5f06d74eb1 tests: add BE minix test
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-15 15:26:55 +02:00
Karel Zak
09daba4069 libblkid: arch independent minix detection
It seems that on-disk MINIX FS superblock is native-endian.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=833841
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-15 15:14:33 +02:00
Karel Zak
618ec053fe tests: consolidate scsi_debug usage
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-12 16:36:33 +02:00
Karel Zak
2d87a7dc84 libmount: add debug message to guess FS function
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-12 15:04:57 +02:00
Karel Zak
188d9656c3 tests: use udevadm settle rather than sleep
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-12 14:02:39 +02:00
Karel Zak
4569bbeab7 libmount: fix mount.nfs segfault, rely on assert() rather than on nonnull
We use
   mnt_optstr_append_option(&o, mnt_fs_get_vfs_options(fs), NULL);

in mount.nfs, unfortunately mnt_optstr_append_option() has been marked
ass nonnull(1, 2). That's wrong because append and prepend should
robust enough to accept NULL as option name.

The patch also removes almost all __attribute__((nonnull). It seems
better to rely on assert() to have usable feedback. In many cases
(nonnull) is premature optimization for the library. This attribute
makes sense for things like strlen() or so...

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=948274
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-12 12:35:34 +02:00
Karel Zak
e38f35d34e build-sys: release++ (v2.23-rc2)
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-10 23:38:06 +02:00
Karel Zak
ddaf270e08 docs: update v2.23-ReleaseNotes
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-10 23:36:46 +02:00
Karel Zak
0ff2e587ab build-sys: make wall optional in bash-completion
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-10 23:34:23 +02:00
Karel Zak
8d6f0baee9 build-sys: add --disable-fdformat
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-10 23:03:20 +02:00
Karel Zak
6acf31ac5c build-sys: add --disable-hwclock
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-10 22:57:27 +02:00
Karel Zak
834fc88cd4 build-sys: add --disable-bfs
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-10 22:38:54 +02:00
Karel Zak
78cdc25415 build-sys: add --disable-cytune
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-10 22:27:31 +02:00
Karel Zak
dd97acfb65 docs: update AUTHORS file
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-10 17:44:59 +02:00
Karel Zak
8b4ccda123 po: merge changes
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-10 17:43:19 +02:00
Karel Zak
5d00280cdb blkid: use xalloc everywhere
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-10 17:30:34 +02:00
Karel Zak
b46692cd43 tests: make line(1) optional
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-10 17:30:15 +02:00
Karel Zak
9b3a772463 libblkid: remove duplicate includes
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-10 17:16:28 +02:00
Karel Zak
2b88d3d72b lib/xalloc: add xstrndup()
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-10 17:16:01 +02:00
Karel Zak
78c70e23b5 tests: update lscpu tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-10 15:26:10 +02:00
Karel Zak
983a43e08b libblkid: fix ZFS superblok offset for SBMAGIC
# wipefs /dev/sdd1

 offset               type
 ----------------------------------------------------------------
 0x65000              zfs_member   [raid]
                      LABEL: zm1
                      UUID:  18067835215330778964

 and "wipefs -o 0x65000 /dev/sdd1" seems to run in an endless loop.

Reported-by: Helmut Hullen <Hullen@t-online.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-10 15:13:02 +02:00
Bernhard Voelker
741fce3471 bash-completion: add swapoff
[kzak@redhat.com: remove short options]

Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-10 14:35:49 +02:00
Karel Zak
1461094c14 lscpu: add Model name
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-10 14:29:53 +02:00
Karel Zak
49932ad8db su: remove '+' from getopt_long()
# /bin/su - -c 'echo test'
 su: user -c does not exist

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=950495
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-10 14:24:54 +02:00
Jeff Mahoney
293714c0d1 loopdev: sync capacity after setting it
I recently tried to mount an hfsplus file system from an image file with
a partition table by using the loop offset and sizelimit options to specify
the location of the file system.

hfsplus stores some metadata at a set offset from the end of the partition,
so it's sensitive to the device size reported by the kernel.

It worked with this:

But failed with this:

/dev/loop0: [0089]:2 (<imagefile>), offset 32768, sizelimit 102400000
/dev/loop1: [0089]:2 (<imagefile>), offset 32768, sizelimit 102400000

/proc/partitions shows the correct number of blocks to match the sizelimit.

But if I set a breakpoint in mount before the mount syscall, I could see:
102400000
102432768

The kernel loop driver will set the gendisk capacity of the device at
LOOP_SET_STATUS64 but won't sync it to the block device until one of two
conditions are met: All open file descriptors referring to the device are
closed (and it will sync when re-opened) or if the LOOP_SET_CAPACITY ioctl
is called to sync it. Since mount opens the device and passes it directly
to the mount syscall after LOOP_SET_STATUS64 without closing and reopening
it, the sizelimit argument is effectively ignroed. The capacity needs to
be synced immediately for it to work as expected.

This patch adds the LOOP_SET_CAPACITY call to loopctx_setup_device since
the device isn't yet released to the user, so it's safe to sync the capacity
immediately.

[kzak@redhat.com: - port to the current git HEAD,
                  - use uint64_t]

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-09 14:32:50 +02:00
Karel Zak
310f672874 libblkid: export blkid_init_debug()
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-09 13:12:55 +02:00
Karel Zak
35cf827870 libblkid: support LIBBLKID_DEBUG= only
... the BLKID_DEBUG= is not more supported.

Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-09 12:52:09 +02:00
Karel Zak
76041e708d libblkid: fix DBG()
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-09 12:44:02 +02:00
Sami Kerola
9c4040b0ae docs: add fsck.cramfs manual page
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-09 12:26:50 +02:00
Sami Kerola
0ad2bacd88 docs: add mkfs.cramfs manual page
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-09 12:26:49 +02:00
Sami Kerola
eb7069693e tools: make checkmans.sh to find missing manuals
Finding missing manuals is loosely based on ideas in man-page-day-1.sh,
wrote by Peter Schiffer.

CC: Peter Schiffer <pschiffe@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-09 12:26:48 +02:00
Sami Kerola
f014c1c259 docs: remove repeated words [checkmans.sh]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-09 12:26:48 +02:00
Sami Kerola
9dd5ea6229 docs: col.1: fix manual page name section [checkmans.sh]
$ lexgrog text-utils/col.1
text-utils/col.1: parse failed

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-09 12:26:47 +02:00
Sami Kerola
49c6c4f1e9 docs: mount.8: make propagation flags adjustable [checkmans.sh]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-09 12:26:46 +02:00
Sami Kerola
12cc556bca tools: add checks to manual page test script
This change includes

- better way to detect manual page inclusion
- man -k header test, which uses lexgrog
- repeated word detection
- static declaration to known repeated words

Most of the  changes are based on man-page-day-1.sh, that is in use at
RedHat Quality Assurance, and wrote by Peter Schiffer.

CC: Peter Schiffer <pschiffe@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-04-09 12:26:44 +02:00
Sami Kerola
604ba9734f libblkid: number of functions should not be declared extern [smatch scan]
These functions are already marked extern in header file.

libblkid/src/dev.c:70:19: warning: function 'blkid_dev_devname' with external linkage has definition
libblkid/src/dev.c:128:26: warning: function 'blkid_dev_iterate_begin' with external linkage has definition
libblkid/src/dev.c:148:12: warning: function 'blkid_dev_set_search' with external linkage has definition
libblkid/src/dev.c:175:12: warning: function 'blkid_dev_next' with external linkage has definition
libblkid/src/dev.c:196:13: warning: function 'blkid_dev_iterate_end' with external linkage has definition
libblkid/src/tag.c:84:12: warning: function 'blkid_dev_has_tag' with external linkage has definition
libblkid/src/tag.c:282:26: warning: function 'blkid_tag_iterate_begin' with external linkage has definition
libblkid/src/tag.c:303:12: warning: function 'blkid_tag_next' with external linkage has definition
libblkid/src/tag.c:322:13: warning: function 'blkid_tag_iterate_end' with external linkage has definition
libblkid/src/tag.c:336:18: warning: function 'blkid_find_dev_with_tag' with external linkage has definition

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