From 40672152dcbd17ce41aa3f6670f9898402990a5c Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 14 May 2009 15:38:50 +0200 Subject: build-sys: rename /libs to /shlibs On Wed, May 13, 2009 at 05:38:49AM -0400, Christoph Hellwig wrote: > Also the lib vs libs toplevel directories probably aren't a too good > choice. Signed-off-by: Karel Zak --- shlibs/blkid/src/probers/minix.c | 51 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 shlibs/blkid/src/probers/minix.c (limited to 'shlibs/blkid/src/probers/minix.c') 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 + * Copyright (C) 2008 Karel Zak + * + * 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 } + } +}; + -- cgit v1.2.3