summaryrefslogtreecommitdiff
path: root/util-linux/volume_id/cramfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux/volume_id/cramfs.c')
-rw-r--r--util-linux/volume_id/cramfs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/util-linux/volume_id/cramfs.c b/util-linux/volume_id/cramfs.c
index fd6e875..63b0c7c 100644
--- a/util-linux/volume_id/cramfs.c
+++ b/util-linux/volume_id/cramfs.c
@@ -21,7 +21,7 @@
#include "volume_id_internal.h"
struct cramfs_super {
- uint8_t magic[4];
+ uint32_t magic;
uint32_t size;
uint32_t flags;
uint32_t future;
@@ -45,12 +45,12 @@ int volume_id_probe_cramfs(struct volume_id *id, uint64_t off)
if (cs == NULL)
return -1;
- if (memcmp(cs->magic, "\x45\x3d\xcd\x28", 4) == 0) {
- volume_id_set_label_raw(id, cs->name, 16);
+ if (cs->magic == cpu_to_be32(0x453dcd28)) {
+// volume_id_set_label_raw(id, cs->name, 16);
volume_id_set_label_string(id, cs->name, 16);
- volume_id_set_usage(id, VOLUME_ID_FILESYSTEM);
- id->type = "cramfs";
+// volume_id_set_usage(id, VOLUME_ID_FILESYSTEM);
+// id->type = "cramfs";
return 0;
}