summaryrefslogtreecommitdiff
path: root/shlibs/blkid/src/probers/minix.c
diff options
context:
space:
mode:
authorLaMont Jones <lamont@debian.org>2009-07-21 15:45:04 -0600
committerLaMont Jones <lamont@debian.org>2009-07-21 15:45:04 -0600
commit7a22bb9abcb56d1010cefd204709e3888f95f735 (patch)
tree5c38b4485f79ee8f6a9d5f9537e973f1f663f027 /shlibs/blkid/src/probers/minix.c
parent4e13a18f57a5b427c559f3b466b9655db14d28f8 (diff)
parent741064af10ec81635d708e9fb8373f96341246eb (diff)
downloadutil-linux-old-7a22bb9abcb56d1010cefd204709e3888f95f735.tar.gz
Merge commit 'origin/master'
Conflicts: AUTHORS NEWS config/include-Makefile.am configure.ac mount/lomount.c po/POTFILES.in po/ca.po po/cs.po po/da.po po/de.po po/es.po po/et.po po/eu.po po/fi.po po/fr.po po/hu.po po/id.po po/it.po po/ja.po po/nl.po po/pl.po po/pt_BR.po po/ru.po po/sl.po po/sv.po po/tr.po po/uk.po po/util-linux-ng.pot po/vi.po po/zh_CN.po
Diffstat (limited to 'shlibs/blkid/src/probers/minix.c')
-rw-r--r--shlibs/blkid/src/probers/minix.c51
1 files changed, 51 insertions, 0 deletions
diff --git a/shlibs/blkid/src/probers/minix.c b/shlibs/blkid/src/probers/minix.c
new file mode 100644
index 00000000..b29b9a42
--- /dev/null
+++ b/shlibs/blkid/src/probers/minix.c
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 1999 by Andries Brouwer
+ * 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 may be redistributed under the terms of the
+ * GNU Lesser General Public License.
+ */
+
+#include "blkidP.h"
+
+static int probe_minix(blkid_probe pr, const struct blkid_idmag *mag)
+{
+ /* for more details see magic strings below */
+ switch(mag->magic[1]) {
+ case '\023':
+ blkid_probe_set_version(pr, "1");
+ break;
+ case '\044':
+ blkid_probe_set_version(pr, "2");
+ break;
+ case '\115':
+ blkid_probe_set_version(pr, "3");
+ break;
+ }
+ return 0;
+}
+
+const struct blkid_idinfo minix_idinfo =
+{
+ .name = "minix",
+ .usage = BLKID_USAGE_FILESYSTEM,
+ .probefunc = probe_minix,
+ .magics =
+ {
+ /* version 1 */
+ { .magic = "\177\023", .len = 2, .kboff = 1, .sboff = 0x10 },
+ { .magic = "\217\023", .len = 2, .kboff = 1, .sboff = 0x10 },
+
+ /* version 2 */
+ { .magic = "\150\044", .len = 2, .kboff = 1, .sboff = 0x10 },
+ { .magic = "\170\044", .len = 2, .kboff = 1, .sboff = 0x10 },
+
+ /* version 3 */
+ { .magic = "\132\115", .len = 2, .kboff = 1, .sboff = 0x18 },
+ { NULL }
+ }
+};
+