[PATCH] make fsck.minix smaller, fix English in messages

Denis Vlasenko vda at ilport.com.ua
Thu Mar 9 06:50:59 UTC 2006


There are 9 patches to fsck.minix at http://195.66.192.167/linux/bbox/

The most complex one is minix7.patch, which combines minix v1 and
minix v2 handling, substantially reducing code size

Comments are at the top of each patch:



Fix bug (inode_map and zone_map are char* pointers)

* Do not initialize globals to 0, it is done automatically
* unsigned short -> uint16_t,  unsigned int -> uint32_t
  where appropriate (did it ever work on Alphas?)
* triple sync() is silly - removed
* check_zone_nr uses check_zone_nr2 now
* remove trailing periods from messages, uppercase first letter

Rework "current_name" hadling in preparation of
print_current_name() removal

Remove print_current_name()

Fix English in printf'ed messages

Reorganize #defines:
* delete unused ones
* convert integer ones into enum constants
* add SB_ prefix to values computed from superblock
* kill Super, use super_block directly

Remove code duplication due to minix v2

* Nuke PROGRAM_VERSION (it is never printed by stock fsck)
* static int IN sounds like #define, rename it

Remove some more unused #defines and the like



Testing of cumulative patches 1..9 was done with 4mb minix image
containing (part of) busybox source tree:

        # ./busybox.minix9 fsck.minix -lvf image >fsck_bb
        # fsck.minix -lvf image >fsck_std
        # diff -u fsck_bb fsck_std
        --- fsck_bb     Thu Mar  9 08:33:51 2006
        +++ fsck_std    Thu Mar  9 08:30:39 2006
        @@ -1,4 +1,4 @@
        -Forcing filesystem check on image
        +Forcing filesystem check on image.
              2 0040755   2 /applets:
              3 0100644   1 /applets/Makefile
              4 0100644   1 /applets/applets.c

# size busybox.minix9 busybox.org
   text    data     bss     dec     hex filename
 766539   10864 1201280 1978683  1e313b busybox.minix9
 768891   10800 1204192 1983883  1e458b busybox.org
--
vda



More information about the busybox mailing list