]> err.no Git - util-linux/commit
mkfs.cramfs: add endianness support to cramfs tools
authorSigned-off-by: Roy Peled <the.roy.peled@gmail.com>
Wed, 4 Feb 2009 13:56:54 +0000 (14:56 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 4 Feb 2009 13:56:54 +0000 (14:56 +0100)
commitfbaec83bc0fda4341862cc60ac9796277235e4b9
tree827eeedf2c3108341ef423f4f81b23b4beafb389
parent0959f8063bf9b4d576822fe742a2bc9f5d1d1dbc
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>
14 files changed:
configure.ac
disk-utils/Makefile.am
disk-utils/cramfs_common.c [new file with mode: 0644]
disk-utils/cramfs_common.h [new file with mode: 0644]
disk-utils/fsck.cramfs.c
disk-utils/mkfs.cramfs.c
tests/Makefile.am
tests/commands.sh.in
tests/expected/ts-cramfs-endianness-fsck [new file with mode: 0644]
tests/expected/ts-cramfs-endianness-mkfs [new file with mode: 0644]
tests/input/cramfs-big.img [new file with mode: 0644]
tests/input/cramfs-little.img [new file with mode: 0644]
tests/ts-cramfs-endianness-fsck [new file with mode: 0755]
tests/ts-cramfs-endianness-mkfs [new file with mode: 0755]