]> Zhao Yanbai Git Server - minix.git/commitdiff
ext2: replace debug printf by assert
authorBen Gras <ben@minix3.org>
Fri, 9 Sep 2011 16:32:13 +0000 (16:32 +0000)
committerBen Gras <ben@minix3.org>
Fri, 9 Sep 2011 16:33:55 +0000 (16:33 +0000)
servers/ext2/super.c

index 45ab48d2f90a58ff0a2d17677f14c63569867b61..fd2b5d97ab2ce2e9c290f3da9228ca0f72924bb5 100644 (file)
@@ -11,6 +11,7 @@
 #include "fs.h"
 #include <string.h>
 #include <stdlib.h>
+#include <assert.h>
 #include <minix/com.h>
 #include <minix/u64.h>
 #include "buf.h"
@@ -90,8 +91,7 @@ register struct super_block *sp; /* pointer to a superblock */
   if (!sp || !ondisk_superblock)
        panic("can't allocate memory for super_block buffers");
 
-  printf("ext2: reading %d bytes into %d buffer\n", _MIN_BLOCK_SIZE, sizeof(*ondisk_superblock));
-
+  assert(_MIN_BLOCK_SIZE <= sizeof(*ondisk_superblock));
   r = block_dev_io(MFS_DEV_READ, dev, SELF_E,
                   (char*) ondisk_superblock, cvu64(super_block_offset),
                   _MIN_BLOCK_SIZE);