]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
minix: add MINIX_ prefix to some global macros
authorKarel Zak <kzak@redhat.com>
Thu, 21 Jul 2011 10:22:46 +0000 (12:22 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 21 Jul 2011 10:23:01 +0000 (12:23 +0200)
 ... and remove some tailing whitespaces.

Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/fsck.minix.c
disk-utils/mkfs.minix.c
include/minix.h

index ef474184b3b5456a80e9189419ed6a00f43d0efb..1bfd9d061d127044674fb6c7eb90b72d758a1890 100644 (file)
@@ -48,7 +48,7 @@
  * 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 >:-)
@@ -56,7 +56,7 @@
  *            (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
@@ -86,7 +86,7 @@
  *     -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>
@@ -144,10 +144,10 @@ static volatile sig_atomic_t termios_set = 0;
 /* 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)
 
@@ -510,7 +510,7 @@ write_super_block(void) {
                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))
index 96e09bf1f905675417395cdb6a26dc5a188ac23b..47b9ed6bd1875f632a9eb6cbe0a82989823e05cf 100644 (file)
@@ -92,7 +92,7 @@
 #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
@@ -504,8 +504,8 @@ static void setup_tables(void) {
        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
@@ -774,8 +774,8 @@ int main(int argc, char ** argv) {
                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();
index 13b1cf6c6836ba8392504ab8b7c3c4d925402b29..57be23921cbbf6ea3ac011f9d2e9381d53761a9c 100644 (file)
@@ -58,19 +58,20 @@ struct minix3_super_block {
 /*
  * 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 */