* 01.07.96 - Fixed the v2 fs stuff to use the right #defines and such
* for modern libcs (janl@math.uio.no, Nicolai Langfeldt)
*
- * 02.07.96 - Added C bit fiddling routines from rmk@ecs.soton.ac.uk
+ * 02.07.96 - Added C bit fiddling routines from rmk@ecs.soton.ac.uk
* (Russell King). He made them for ARM. It would seem
* that the ARM is powerful enough to do this in C whereas
* i386 and m64k must use assembly to get it fast >:-)
* (janl@math.uio.no, Nicolai Langfeldt)
*
* 04.11.96 - Added minor fixes from Andreas Schwab to avoid compiler
- * warnings. Added mc68k bitops from
+ * warnings. Added mc68k bitops from
* Joerg Dorchain <dorchain@mpi-sb.mpg.de>.
*
* 06.11.96 - Added v2 code submitted by Joerg Dorchain, but written by
* -f force filesystem check even if filesystem marked as valid
*
* The device may be a block device or a image of one, but this isn't
- * enforced (but it's not much fun on a character device :-).
+ * enforced (but it's not much fun on a character device :-).
*/
#include <stdio.h>
/* File-name data */
#define MAX_DEPTH 50
static int name_depth = 0;
-static char name_list[MAX_DEPTH][NAME_MAX+1];
+static char name_list[MAX_DEPTH][MINIX_NAME_MAX+1];
/* Copy of the previous, just for error reporting - see get_current_name */
/* This is a waste of 12kB or so. */
-static char current_name[MAX_DEPTH*(NAME_MAX+1)+1];
+static char current_name[MAX_DEPTH*(MINIX_NAME_MAX+1)+1];
#define MAGIC (Super.s_magic)
Super.s_state |= MINIX_ERROR_FS;
else
Super.s_state &= ~MINIX_ERROR_FS;
-
+
if (MINIX_BLOCK_SIZE != lseek(IN, MINIX_BLOCK_SIZE, SEEK_SET))
die(_("seek failed in write_super_block"));
if (MINIX_BLOCK_SIZE != write(IN, super_block_buffer, MINIX_BLOCK_SIZE))
#define TEST_BUFFER_BLOCKS 16
#define MAX_GOOD_BLOCKS 512
-#define MAX_INODES 65535
+#define MINIX_MAX_INODES 65535
/*
* Global variables used in minix_programs.h inline fuctions
else
inodes = ((inodes + MINIX_INODES_PER_BLOCK - 1) &
~(MINIX_INODES_PER_BLOCK - 1));
- if (inodes > MAX_INODES)
- inodes = MAX_INODES;
+ if (inodes > MINIX_MAX_INODES)
+ inodes = MINIX_MAX_INODES;
if (fs_version == 3)
Super3.s_ninodes = inodes;
else
else
magic = MINIX2_SUPER_MAGIC2;
} else
- if (BLOCKS > MAX_INODES)
- BLOCKS = MAX_INODES;
+ if (BLOCKS > MINIX_MAX_INODES)
+ BLOCKS = MINIX_MAX_INODES;
setup_tables();
if (check)
check_blocks();
/*
* Minix subpartitions are always within primary dos partition.
*/
-#define MINIX_MAXPARTITIONS 4
+#define MINIX_MAXPARTITIONS 4
#define MINIX_BLOCK_SIZE_BITS 10
-#define MINIX_BLOCK_SIZE (1<<MINIX_BLOCK_SIZE_BITS)
+#define MINIX_BLOCK_SIZE (1 << MINIX_BLOCK_SIZE_BITS)
-#define NAME_MAX 255 /* # chars in a file name */
-#define MAX_INODES 65535
+#define MINIX_NAME_MAX 255 /* # chars in a file name */
+#define MINIX_MAX_INODES 65535
#define MINIX_INODES_PER_BLOCK ((MINIX_BLOCK_SIZE)/(sizeof (struct minix_inode)))
#define MINIX2_INODES_PER_BLOCK ((MINIX_BLOCK_SIZE)/(sizeof (struct minix2_inode)))
-#define MINIX_VALID_FS 0x0001 /* Clean fs. */
-#define MINIX_ERROR_FS 0x0002 /* fs has errors. */
+/* minix_super_block.s_state */
+#define MINIX_VALID_FS 0x0001 /* Clean fs. */
+#define MINIX_ERROR_FS 0x0002 /* fs has errors. */
#define MINIX_SUPER_MAGIC 0x137F /* original minix fs */
#define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */