summaryrefslogtreecommitdiffstats
path: root/libs/blkid/src/probers/vxfs.c
diff options
context:
space:
mode:
authorKarel Zak2008-11-25 13:11:59 +0100
committerKarel Zak2009-02-11 23:21:47 +0100
commitc29368b46c694688ca227b56e0ac24b031a68532 (patch)
tree69755c9700d386d8f3803cc041c7f3aa7d9e506b /libs/blkid/src/probers/vxfs.c
parentblkid: add lvm1 (diff)
downloadkernel-qcow2-util-linux-c29368b46c694688ca227b56e0ac24b031a68532.tar.gz
kernel-qcow2-util-linux-c29368b46c694688ca227b56e0ac24b031a68532.tar.xz
kernel-qcow2-util-linux-c29368b46c694688ca227b56e0ac24b031a68532.zip
blkid: add vxfs
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libs/blkid/src/probers/vxfs.c')
-rw-r--r--libs/blkid/src/probers/vxfs.c51
1 files changed, 51 insertions, 0 deletions
diff --git a/libs/blkid/src/probers/vxfs.c b/libs/blkid/src/probers/vxfs.c
new file mode 100644
index 000000000..2a6502a3f
--- /dev/null
+++ b/libs/blkid/src/probers/vxfs.c
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 1999, 2000, 2003 by Theodore Ts'o
+ * Copyright (C) 2001 by Andreas Dilger
+ * Copyright (C) 2004 Kay Sievers <kay.sievers@vrfy.org>
+ * Copyright (C) 2008 Karel Zak <kzak@redhat.com>
+ *
+ * This file is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This file is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <stdio.h>
+
+#include "blkidP.h"
+
+struct vxfs_super {
+ uint32_t vs_magic;
+ int32_t vs_version;
+};
+
+static int probe_vxfs(blkid_probe pr, const struct blkid_idmag *mag)
+{
+ struct vxfs_super *vxs;
+
+ vxs = blkid_probe_get_sb(pr, mag, struct vxfs_super);
+ if (!vxs)
+ return -1;
+
+ blkid_probe_sprintf_version(pr, "%u", (unsigned int) vxs->vs_version);
+ return 0;
+}
+
+
+const struct blkid_idinfo vxfs_idinfo =
+{
+ .name = "vxfs",
+ .usage = BLKID_USAGE_FILESYSTEM,
+ .probefunc = probe_vxfs,
+ .magics =
+ {
+ { .magic = "\365\374\001\245", .len = 4, .kboff = 1 },
+ { NULL }
+ }
+};
+