summaryrefslogtreecommitdiff
path: root/disk-utils/mkfs.cramfs.c
AgeCommit message (Collapse)AuthorFilesLines
2011-01-17mkfs.cramfs: use symbolic exit codesSami Kerola1-20/+20
For some reason original author had defined symbolic exit codes, but had not use them. One could argue the symbolic exit codes for mkfs should go to local exit header which would be included to all commands that exit with non zero or one return code. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2009-09-29mkfs.cramfs: fix gcc warning (incompatible pointer type)Karel Zak1-3/+2
mkfs.cramfs.c: In function ‘parse_directory’: mkfs.cramfs.c:310: warning: passing argument 4 of ‘scandir’ from incompatible pointer type Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-04mkfs.cramfs: lower memory requirements for layouts with duplicate filesRoy Peled1-8/+9
mkfs.cramfs allocates memory based on a calculated upper-bound of required filesystem size. If there are duplicate files or hard links, the current implementation unnecessarily increases the upper-bound per each copy of the file, even though cramfs does not store copies of contents of identical files. This patch improves the calculation of fslen_ub, the upper bound of required filesystem size, by making the upper bound aware of duplicate files. This is very helpful for layouts that hold a lot of hard links, which are seen as duplicate files by mkfs.cramfs. For example, this drastically reduces the memory requirements for creating a standard Busybox layout. Signed-off-by: Roy Peled <the.roy.peled@gmail.com>
2009-02-04mkfs.cramfs: add endianness support to cramfs toolsSigned-off-by: Roy Peled1-4/+28
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>
2008-10-03mkfs.cramfs: several strings without gettext callsPedro Ribeiro1-2/+2
Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2008-07-30use getpagesize()maximilian attems1-1/+1
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-28disk-utils: include fcntl.h directly (mkfs.cramfs, raw)maximilian attems1-1/+1
helps klibc support, glibc compile tested. Signed-off-by: maximilian attems <max@stro.at>
2008-04-08mkfs.cramfs: switch on localization.Benno Schulenberg1-0/+4
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2007-11-06mkfs.cramfs: remove unused header filelizf1-1/+0
Remove including of assert.h Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
2007-10-11mkfs.cramfs: clean up gcc warningsRandy Dunlap1-24/+25
* clean up code, gcc warnings (try compilation with "-Wall -Wp,-D_FORTIFY_SOURCE=2") Builds cleanly on x86_32 and x86_64. mkfs.cramfs.c:211: warning: pointer targets in passing argument 2 of 'MD5Update' differ in signedness mkfs.cramfs.c:336: warning: format '%u' expects type 'unsigned int', but argument 4 has type 'size_t' mkfs.cramfs.c:355: warning: pointer targets in assignment differ in signedness mkfs.cramfs.c:448: warning: pointer targets in passing argument 1 of '__builtin___strncpy_chk' differ in signedness mkfs.cramfs.c:448: warning: pointer targets in passing argument 1 of '__strncpy_ichk' differ in signedness mkfs.cramfs.c:450: warning: pointer targets in passing argument 1 of '__builtin___strncpy_chk' differ in signedness mkfs.cramfs.c:450: warning: pointer targets in passing argument 1 of '__strncpy_ichk' differ in signedness mkfs.cramfs.c:490: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness mkfs.cramfs.c:620: warning: pointer targets in passing argument 1 of 'compress' differ in signedness mkfs.cramfs.c:620: warning: pointer targets in passing argument 3 of 'compress' differ in signedness mkfs.cramfs.c:671: warning: pointer targets in passing argument 3 of 'do_compress' differ in signedness mkfs.cramfs.c:824: warning: format '%Ld' expects type 'long long int', but argument 4 has type 'loff_t' mkfs.cramfs.c:872: warning: format '%d' expects type 'int', but argument 3 has type 'ssize_t' mkfs.cramfs.c:880: warning: format '%d' expects type 'int', but argument 3 has type 'ssize_t' mkfs.cramfs.c:885: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int' mkfs.cramfs.c:889: warning: pointer targets in passing argument 2 of 'crc32' differ in signedness mkfs.cramfs.c:896: warning: format '%Ld' expects type 'long long int', but argument 4 has type 'loff_t' mkfs.cramfs.c:896: warning: format '%d' expects type 'int', but argument 5 has type 'ssize_t' mkfs.cramfs.c:909: warning: format '%d' expects type 'int', but argument 4 has type 'ssize_t' mkfs.cramfs.c:909: warning: format '%d' expects type 'int', but argument 5 has type 'ssize_t' Co-Author: Karel Zak <kzak@redhat.com> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2007-10-03pg: fix segfault on searchRajeev V. Pillai1-1/+1
Run pg(1) and type '/<CR>' which is supposed to forward search for the previously remembered search string. pg(1) will segfault after printing "No remembered search string:". Signed-off-by: Rajeev V. Pillai <rajeevvp@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-14mkfs.cramfs: cleanup HAVE_ macros usageKarel Zak1-6/+9
It's bad to use any HAVE_* macros for anything other than for build-system (autotools) stuff. Signed-off-by: Karel Zak <kzak@redhat.com>
2007-02-27mkfs.cramfs: fix a way how mkfs works with empty filesKarel Zak1-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-02-27mkfs.cramfs: remove hardcoded limit for directoriesKarel Zak1-9/+12
Signed-off-by: Karel Zak <kzak@redhat.com>
2006-12-07Imported from util-linux-2.13-pre5 tarball.Karel Zak1-15/+15
2006-12-07Imported from util-linux-2.13-pre2 tarball.Karel Zak1-2/+2
2006-12-07Imported from util-linux-2.13-pre1 tarball.Karel Zak1-2/+2
2006-12-07Imported from util-linux-2.12k tarball.Karel Zak1-2/+2
2006-12-07Imported from util-linux-2.12 tarball.Karel Zak1-0/+7
2006-12-07Imported from util-linux-2.11x tarball.Karel Zak1-122/+228
2006-12-07Imported from util-linux-2.11t tarball.Karel Zak1-0/+828