blob: fdab85a720bfeb2b32cd7dbd3b8c742e060aadb1 [file] [log] [blame]
bigbiff bigbiffe60683a2013-02-22 20:55:50 -05001/*
2 * Copyright (C) 2008 Karel Zak <kzak@redhat.com>
3 *
4 * This file may be redistributed under the terms of the
5 * GNU Lesser General Public License.
6 */
7
8#include <stdio.h>
9
10#include "superblocks.h"
11
12struct vxfs_super_block {
13 uint32_t vs_magic;
14 int32_t vs_version;
15};
16
17static int probe_vxfs(blkid_probe pr, const struct blkid_idmag *mag)
18{
19 struct vxfs_super_block *vxs;
20
21 vxs = blkid_probe_get_sb(pr, mag, struct vxfs_super_block);
22 if (!vxs)
23 return -1;
24
25 blkid_probe_sprintf_version(pr, "%u", (unsigned int) vxs->vs_version);
26 return 0;
27}
28
29
30const struct blkid_idinfo vxfs_idinfo =
31{
32 .name = "vxfs",
33 .usage = BLKID_USAGE_FILESYSTEM,
34 .probefunc = probe_vxfs,
35 .magics =
36 {
37 { .magic = "\365\374\001\245", .len = 4, .kboff = 1 },
38 { NULL }
39 }
40};
41