mkfs: Print message if host endianness differs
authorTormod Volden <debian.tormod@gmail.com>
Fri, 27 Mar 2015 23:15:39 +0000 (00:15 +0100)
committerAlan Cox <alan@linux.intel.com>
Sat, 28 Mar 2015 12:49:07 +0000 (12:49 +0000)
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Standalone/fsck.c

index 379b02d..bd8dc1f 100644 (file)
@@ -58,8 +58,10 @@ int main(int argc, char **argv)
     bcopy(buf, (char *) &superblock, sizeof(struct filesys));
 
     /* Verify the fsize and isize parameters */
-    if (superblock.s_mounted == SMOUNTED_WRONGENDIAN)
+    if (superblock.s_mounted == SMOUNTED_WRONGENDIAN) {
         swizzling = 1;
+        printf("Detected endianness inverse of host\n");
+    }
 
     if (swizzle16(superblock.s_mounted) != SMOUNTED) {
         printf("Device %d has invalid magic number %d. Fix? ", dev, superblock.s_mounted);