aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libfsimage/check-libext2fs
diff options
context:
space:
mode:
authorTim Deegan <Tim.Deegan@xensource.com>2006-11-09 14:09:53 +0000
committerTim Deegan <Tim.Deegan@xensource.com>2006-11-09 14:09:53 +0000
commitcddc1d5a09b0ee520e31d9f56dfb4a20f6fb3ba1 (patch)
tree40779970f5ad69d7f5cea225844c430e48812b8c /tools/libfsimage/check-libext2fs
parent21b5e9be6acce19ff8aa22e55a0ddc69d7b19750 (diff)
downloadxen-cddc1d5a09b0ee520e31d9f56dfb4a20f6fb3ba1.tar.gz
xen-cddc1d5a09b0ee520e31d9f56dfb4a20f6fb3ba1.tar.bz2
xen-cddc1d5a09b0ee520e31d9f56dfb4a20f6fb3ba1.zip
Add libfsimage, a C library for reading files from filesystem images.
Initial support is provided for Solaris UFS, ext2 (both using libext2fs and not), and reiserfs. Signed-off-by: John Levon <john.levon@sun.com>
Diffstat (limited to 'tools/libfsimage/check-libext2fs')
-rwxr-xr-xtools/libfsimage/check-libext2fs21
1 files changed, 21 insertions, 0 deletions
diff --git a/tools/libfsimage/check-libext2fs b/tools/libfsimage/check-libext2fs
new file mode 100755
index 0000000000..2f654cc4af
--- /dev/null
+++ b/tools/libfsimage/check-libext2fs
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+cat >ext2-test.c <<EOF
+#include <ext2fs/ext2fs.h>
+
+int main()
+{
+ ext2fs_open2;
+}
+EOF
+
+gcc -o ext2-test ext2-test.c -lext2fs >/dev/null 2>&1
+if [ $? = 0 ]; then
+ echo ext2fs-lib
+else
+ echo ext2fs
+fi
+
+rm -f ext2-test ext2-test.c
+
+exit 0