Maybe it would be possible to use LC_ALL, but it requires to review
the code to check if there is no any sensitive code.
Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/fsck.cramfs.c: In function ‘test_crc’:
disk-utils/fsck.cramfs.c:231:32: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
disk-utils/fsck.cramfs.c:233:24: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
Signed-off-by: Karel Zak <kzak@redhat.com>
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>
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>
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>
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>
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>
[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>
* 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>