patch-2.4.19 linux-2.4.19/fs/reiserfs/prints.c

Next file: linux-2.4.19/fs/reiserfs/procfs.c
Previous file: linux-2.4.19/fs/reiserfs/objectid.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.18/fs/reiserfs/prints.c linux-2.4.19/fs/reiserfs/prints.c
@@ -477,6 +477,17 @@
     return 0;
 }
 
+char * reiserfs_hashname(int code)
+{
+    if ( code == YURA_HASH)
+	return "rupasov";
+    if ( code == TEA_HASH)
+	return "tea";
+    if ( code == R5_HASH)
+	return "r5";
+
+    return "unknown";
+}
 /* return 1 if this is not super block */
 static int print_super_block (struct buffer_head * bh)
 {
@@ -519,8 +530,7 @@
     printk ("Filesystem state %s\n", 
 	    (sb_state(rs) == REISERFS_VALID_FS) ? "VALID" : "ERROR");
     printk ("Hash function \"%s\"\n",
-            sb_hash_function_code(rs) == TEA_HASH ? "tea" :
-	    ( sb_hash_function_code(rs) == YURA_HASH ? "rupasov" : (sb_hash_function_code(rs) == R5_HASH ? "r5" : "unknown")));
+            reiserfs_hashname(sb_hash_function_code(rs)));
 
     printk ("Tree height %d\n", sb_tree_height(rs));
     return 0;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)