aboutsummaryrefslogtreecommitdiffstats
path: root/tools/pygrub/src/fsys/ext2/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/pygrub/src/fsys/ext2/test.py')
-rw-r--r--tools/pygrub/src/fsys/ext2/test.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/pygrub/src/fsys/ext2/test.py b/tools/pygrub/src/fsys/ext2/test.py
new file mode 100644
index 0000000000..eeb79506ee
--- /dev/null
+++ b/tools/pygrub/src/fsys/ext2/test.py
@@ -0,0 +1,15 @@
+#!/usr/bin/python
+
+
+import _pyext2
+import struct, os, sys
+
+fs = _pyext2.Ext2Fs("test.img")
+
+f = fs.open_file("/boot/vmlinuz-2.6.11-1.1177_FC4")
+buf = f.read()
+o = open("vmlinuz", "wb+")
+o.write(buf)
+o.close()
+
+f.close()