]> mj.ucw.cz Git - libucw.git/commitdiff
Complain loudly if anybody asks us to generate buckets of an unknown
authorMartin Mares <mj@ucw.cz>
Tue, 6 Jul 2004 10:19:44 +0000 (10:19 +0000)
committerMartin Mares <mj@ucw.cz>
Tue, 6 Jul 2004 10:19:44 +0000 (10:19 +0000)
type (this can happen e.g. in the buckettool).

lib/obj2buck.c

index afd4c1dff0d4c530037faf1417d19372088359c1..2a2fd1c97b1b98504e690faf81ed037b5e609c17 100644 (file)
@@ -18,7 +18,19 @@ static uns use_v33;
 void
 attr_set_type(uns type)
 {
-  use_v33 = (type == BUCKET_TYPE_V33 || type == BUCKET_TYPE_V33_LIZARD);
+  switch (type)
+    {
+    case BUCKET_TYPE_PLAIN:
+    case BUCKET_TYPE_V30:
+      use_v33 = 0;
+      break;
+    case BUCKET_TYPE_V33:
+    case BUCKET_TYPE_V33_LIZARD:
+      use_v33 = 1;
+      break;
+    default:
+      die("Don't know how to generate buckets of type %08x", type);
+    }
 }
 
 inline byte *