#include <config.h>
#include <errno.h>
#include <common.h>
+#include <env.h>
#include <mapmem.h>
#include <part.h>
#include <ext4fs.h>
return info;
}
+/**
+ * fs_get_type() - Get type of current filesystem
+ *
+ * Return: filesystem type
+ *
+ * Returns filesystem type representing the current filesystem, or
+ * FS_TYPE_ANY for any unrecognised filesystem.
+ */
+int fs_get_type(void)
+{
+ return fs_type;
+}
+
/**
* fs_get_type_name() - Get type of current filesystem
*
return -1;
}
-static void fs_close(void)
+void fs_close(void)
{
struct fstype_info *info = fs_get_info(fs_type);
ret = info->ls(dirname);
- fs_type = FS_TYPE_ANY;
fs_close();
return ret;
ret = info->unlink(filename);
- fs_type = FS_TYPE_ANY;
fs_close();
return ret;
ret = info->mkdir(dirname);
- fs_type = FS_TYPE_ANY;
fs_close();
return ret;