31 |
}; |
}; |
32 |
|
|
33 |
/* |
/* |
34 |
* minix super-block data on disk |
* minix superblock data on disk |
35 |
*/ |
*/ |
36 |
struct minix_super_block { |
struct minix_superblock { |
37 |
uint16_t s_ninodes; |
uint16_t s_ninodes; |
38 |
uint16_t s_nzones; |
uint16_t s_nzones; |
39 |
uint16_t s_imap_blocks; |
uint16_t s_imap_blocks; |
48 |
|
|
49 |
struct minix_dir_entry { |
struct minix_dir_entry { |
50 |
uint16_t inode; |
uint16_t inode; |
51 |
char name[0]; |
char name[]; |
52 |
}; |
}; |
53 |
|
|
54 |
/* Believe it or not, but mount.h has this one #defined */ |
/* Believe it or not, but mount.h has this one #defined */ |
74 |
MINIX2_INODES_PER_BLOCK = BLOCK_SIZE / sizeof(struct minix2_inode), |
MINIX2_INODES_PER_BLOCK = BLOCK_SIZE / sizeof(struct minix2_inode), |
75 |
}; |
}; |
76 |
|
|
77 |
|
/* |
78 |
|
Basic test script for regressions in mkfs/fsck. |
79 |
|
Copies current dir into image (typically bbox build tree). |
80 |
|
|
81 |
|
#!/bin/sh |
82 |
|
tmpdir=/tmp/minixtest-$$ |
83 |
|
tmpimg=/tmp/minix-img-$$ |
84 |
|
|
85 |
|
mkdir $tmpdir |
86 |
|
dd if=/dev/zero of=$tmpimg bs=1M count=20 || exit |
87 |
|
./busybox mkfs.minix $tmpimg || exit |
88 |
|
mount -o loop $tmpimg $tmpdir || exit |
89 |
|
cp -a "$PWD" $tmpdir |
90 |
|
umount $tmpdir || exit |
91 |
|
./busybox fsck.minix -vfm $tmpimg || exit |
92 |
|
echo "Continue?" |
93 |
|
read junk |
94 |
|
./busybox fsck.minix -vfml $tmpimg || exit |
95 |
|
rmdir $tmpdir |
96 |
|
rm $tmpimg |
97 |
|
|
98 |
|
*/ |