aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libfsimage/check-libext2fs
diff options
context:
space:
mode:
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