chiark / gitweb /
[PATCH] udev_volume_id: volume_id version 034
[elogind.git] / extras / volume_id / volume_id / xfs / xfs.c
index 67ae2f07d5cedac87a7a585eb9cf58b7eec7f95a..efbe06ec58f8814fe7468cd201b69e0f9f16a464 100644 (file)
 #include "../util.h"
 #include "xfs.h"
 
+struct xfs_super_block {
+       __u8    magic[4];
+       __u32   blocksize;
+       __u64   dblocks;
+       __u64   rblocks;
+       __u32   dummy1[2];
+       __u8    uuid[16];
+       __u32   dummy2[15];
+       __u8    fname[12];
+       __u32   dummy3[2];
+       __u64   icount;
+       __u64   ifree;
+       __u64   fdblocks;
+} __attribute__((__packed__));
+
 int volume_id_probe_xfs(struct volume_id *id, __u64 off)
 {
-       struct xfs_super_block {
-               __u8    magic[4];
-               __u32   blocksize;
-               __u64   dblocks;
-               __u64   rblocks;
-               __u32   dummy1[2];
-               __u8    uuid[16];
-               __u32   dummy2[15];
-               __u8    fname[12];
-               __u32   dummy3[2];
-               __u64   icount;
-               __u64   ifree;
-               __u64   fdblocks;
-       } __attribute__((__packed__)) *xs;
+       struct xfs_super_block *xs;
+
+       dbg("probing at offset %llu", off);
 
        xs = (struct xfs_super_block *) volume_id_get_buffer(id, off, 0x200);
        if (xs == NULL)