goto err;
file->fs = this_fs;
- /* for now, we just applied the universal path_lookup to EXTLINUX */
- if (strcmp(this_fs->fs_ops->fs_name, "ext2") != 0) {
+ /* if we have ->searchdir method, call it */
+ if (file->fs->fs_ops->searchdir) {
file->fs->fs_ops->searchdir(name, file);
if (file->open_file) {
}
-
+ /* else, try the generic-path-lookup method */
if (*name == '/') {
inode = this_fs->fs_ops->iget_root();
while(*name == '/')
int blk_shift;
const struct fs_ops *ops = (const struct fs_ops *)regs->eax.l;
- if (strcmp(ops->fs_name, "ext2") == 0)
+ if (ops->fs_flags & FS_USEMEM)
mem_init();
/* set up the fs stucture */
struct dirent; /* Directory entry structure */
struct file;
enum fs_flags {
- FS_NODEV = 1,
+ FS_NODEV = 1 << 0,
+ FS_USEMEM = 1 << 1, /* If we need a malloc routine, set it */
};
struct fs_ops {