Commit Graph

17 Commits

Author SHA1 Message Date
Sami Kerola fc8dc41054 fsck.cramfs: use xalloc.h
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-07-21 23:50:13 +02:00
Sami Kerola 11b7698c27 fsck.cramfs: retire die function
Replaced with err{,x} from libc.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-07-21 23:50:13 +02:00
Sami Kerola d51f37a368 cramfs: use stdint.h instead of u{8,16,32}
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-07-20 22:49:48 +02:00
Davidlohr Bueso 06f2558508 cramfs: remove cramfs_common.h
We currently have cramfs.h and cramfs_common.h, this makes no sense, so remove
unite them and keep just cramfs.h

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2011-05-17 16:30:08 +02:00
Guillem Jover cef0ccd580 Remove now unused <sys/ioctl.h> includes
Those became unused with the switch to the blkdev functions.

Signed-off-by: Guillem Jover <guillem@hadrons.org>
2009-10-09 15:17:54 +02:00
Karel Zak a6f72ab47e fsck.cramfs: segfault with INCLUDE_FS_TESTS and no -x option
The current implementation causes a segmentation fault if
INCLUDE_FS_TESTS is defined, but the -x option is not specified.

The error is caused by the extract_dir variable being null.

Reported-by: Roy Peled <the.roy.peled@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-04 23:36:39 +01:00
Signed-off-by: Roy Peled fbaec83bc0 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>
2009-02-04 14:56:54 +01:00
Pedro Ribeiro e56644ca45 fsck.cramfs: add NLS support
[kzak@redhat.com: - add setlocale(), ...]

Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-10-03 08:30:33 +02:00
Karel Zak 293889d084 fsck.cramfs: fix compiler warning
fsck.cramfs.c: In function ‘main’:
fsck.cramfs.c:676  warning: ‘length’ may be used uninitialized in this function

Signed-off-by: Karel Zak <kzak@redhat.com>
2008-09-29 12:24:38 +02:00
maximilian attems d144727bc3 use getpagesize()
getpagesize() is said to be more portable than sysconf(_SC_PAGESIZE)
to anything Linux.

this patch helps klibc porting effort as the sysconf
multiplex API is not supported there.

also remove comment of the switch to sysconf in mkswap.c.

Signed-off-by: maximilian attems <max@stro.at>
2008-07-30 13:26:58 +02:00
Samuel Thibault 098fa6b120 disk-utils: clean up code, use blkdev_* functions
[kzak@redhat.com: split the original patch to small patches]

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-07-24 01:15:07 +02:00
Randy Dunlap 5f8416478d fsck.cramfs: clean up gcc warnings
* clean up code, gcc warnings
  (try compilation with "-Wall -Wp,-D_FORTIFY_SOURCE=2")

Builds cleanly on x86_32 and x86_64.

fsck.cramfs.c:235: warning: ignoring return value of 'read', declared with attribute warn_unused_result

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
2007-10-03 23:08:34 +02:00
Karel Zak bf928360f2 build-sys: remove hardcoded _GNU_SOURCE
We have AC_GNU_SOURCE, so we needn't any extra hardcoded _GNU_SOURCE.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-09-20 00:57:01 +02:00
Karel Zak 19922f22a1 Imported from util-linux-2.13-pre5 tarball. 2006-12-07 00:27:10 +01:00
Karel Zak 48d7b13a1e Imported from util-linux-2.13-pre1 tarball. 2006-12-07 00:26:54 +01:00
Karel Zak b22550fa15 Imported from util-linux-2.12k tarball. 2006-12-07 00:26:26 +01:00
Karel Zak 63cccae468 Imported from util-linux-2.11t tarball. 2006-12-07 00:25:58 +01:00