tls: reorder a few more cipher ids
[oweals/busybox.git] / util-linux / minix.h
index 476f3273570b37028b8de084ebd4073c541793c0..83ffe6da57b03ed281043205c373c3b0699e3a06 100644 (file)
@@ -31,9 +31,9 @@ struct minix2_inode {
 };
 
 /*
- * minix super-block data on disk
+ * minix superblock data on disk
  */
-struct minix_super_block {
+struct minix_superblock {
        uint16_t s_ninodes;
        uint16_t s_nzones;
        uint16_t s_imap_blocks;
@@ -48,7 +48,7 @@ struct minix_super_block {
 
 struct minix_dir_entry {
        uint16_t inode;
-       char name[0];
+       char name[];
 };
 
 /* Believe it or not, but mount.h has this one #defined */
@@ -61,9 +61,14 @@ enum {
        MINIX_ROOT_INO          = 1,
        MINIX_BAD_INO           = 2,
 
+#undef  MINIX1_SUPER_MAGIC
        MINIX1_SUPER_MAGIC      = 0x137F,       /* original minix fs */
+#undef  MINIX1_SUPER_MAGIC2
        MINIX1_SUPER_MAGIC2     = 0x138F,       /* minix fs, 30 char names */
+/* bionic has this define */
+#undef  MINIX2_SUPER_MAGIC
        MINIX2_SUPER_MAGIC      = 0x2468,       /* minix V2 fs */
+#undef  MINIX2_SUPER_MAGIC2
        MINIX2_SUPER_MAGIC2     = 0x2478,       /* minix V2 fs, 30 char names */
        MINIX_VALID_FS          = 0x0001,       /* clean fs */
        MINIX_ERROR_FS          = 0x0002,       /* fs has errors */
@@ -74,3 +79,25 @@ enum {
        MINIX2_INODES_PER_BLOCK = BLOCK_SIZE / sizeof(struct minix2_inode),
 };
 
+/*
+Basic test script for regressions in mkfs/fsck.
+Copies current dir into image (typically bbox build tree).
+
+#!/bin/sh
+tmpdir=/tmp/minixtest-$$
+tmpimg=/tmp/minix-img-$$
+
+mkdir $tmpdir
+dd if=/dev/zero of=$tmpimg bs=1M count=20 || exit
+./busybox mkfs.minix $tmpimg || exit
+mount -o loop $tmpimg $tmpdir || exit
+cp -a "$PWD" $tmpdir
+umount $tmpdir || exit
+./busybox fsck.minix -vfm $tmpimg || exit
+echo "Continue?"
+read junk
+./busybox fsck.minix -vfml $tmpimg || exit
+rmdir $tmpdir
+rm $tmpimg
+
+*/