2 FileSystems common definitions
4 Copyright (C) 1999 Benjamin Herrenschmidt
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 extern const struct fs_t of_filesystem;
26 extern const struct fs_t of_net_filesystem;
27 extern const struct fs_t ext2_filesystem;
28 //extern const struct fs_t iso_filesystem;
30 /* Configurable filesystems */
33 extern const struct fs_t xfs_filesystem;
34 #endif /* CONFIG_FS_XFS */
36 #ifdef CONFIG_FS_REISERFS
37 extern const struct fs_t reiserfs_filesystem;
38 #endif /* CONFIG_FS_REISERFS */
40 /* Filesystem handlers yaboot knows about */
41 static const struct fs_t *block_filesystems[] = {
42 &ext2_filesystem, /* ext2 */
44 &xfs_filesystem, /* XFS */
45 #endif /* CONFIG_FS_XFS */
46 #ifdef CONFIG_FS_REISERFS
47 &reiserfs_filesystem, /* reiserfs */
48 #endif /* CONFIG_FS_REISERFS */
49 &of_filesystem, /* HFS/HFS+, ISO9660, UDF, UFS */
53 const struct fs_t *fs_of = &of_filesystem; /* needed by ISO9660 */
54 const struct fs_t *fs_of_netboot = &of_net_filesystem; /* needed by file.c */
57 fs_open(struct boot_file_t *file, const char *dev_name,
58 struct partition_t *part, const char *file_name)
60 const struct fs_t **fs;
61 for (fs = block_filesystems; *fs; fs++)
62 if ((fserrorno = (*fs)->open(file, dev_name, part, file_name)) != FILE_ERR_BAD_FSYS)