aboutsummaryrefslogtreecommitdiffstats
path: root/tools/pygrub/src/fsys/ext2/ext2module.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/pygrub/src/fsys/ext2/ext2module.c')
-rw-r--r--tools/pygrub/src/fsys/ext2/ext2module.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/pygrub/src/fsys/ext2/ext2module.c b/tools/pygrub/src/fsys/ext2/ext2module.c
index f5f95a7aa7..decf1ad652 100644
--- a/tools/pygrub/src/fsys/ext2/ext2module.c
+++ b/tools/pygrub/src/fsys/ext2/ext2module.c
@@ -229,8 +229,13 @@ ext2_fs_open (Ext2Fs *fs, PyObject *args, PyObject *kwargs)
snprintf(offsetopt, 29, "offset=%d", offset);
}
+#ifdef HAVE_EXT2FS_OPEN2
err = ext2fs_open2(name, offsetopt, flags, superblock, block_size,
unix_io_manager, &efs);
+#else
+ err = ext2fs_open(name, flags, superblock, block_size,
+ unix_io_manager, &efs);
+#endif
if (err) {
PyErr_SetString(PyExc_ValueError, "unable to open file");
return NULL;