2 Definitions for talking to the Open Firmware PROM on
3 Power Macintosh computers.
5 Copyright (C) 1999 Benjamin Herrenschmidt
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
32 #define FILE_MAX_PATH 1024
34 /* Simple error codes */
36 #define FILE_ERR_EOF -1
37 #define FILE_ERR_NOTFOUND -2
38 #define FILE_CANT_SEEK -3
40 #define FILE_BAD_PATH -5
41 #define FILE_ERR_BAD_TYPE -6
42 #define FILE_ERR_BAD_FSYS -7
43 #define FILE_ERR_SYMLINK_LOOP -8
44 #define FILE_ERR_LENGTH -9
47 #define FILE_DEVICE_BLOCK 1
48 #define FILE_DEVICE_NET 2
51 char* dev; /* OF device path */
52 int part; /* Partition number or -1 */
53 char* file; /* File path */
58 /* File access methods */
59 const struct fs_t *fs;
61 /* Filesystem private (to be broken once we have a
69 unsigned char* buffer;
71 // unsigned int dev_blk_size;
72 // unsigned int part_start;
73 // unsigned int part_count;
76 extern int open_file( const struct boot_fspec_t* spec,
77 struct boot_file_t* file);
79 extern int validate_fspec(
80 struct boot_fspec_t* spec,
83 extern char *parse_device_path(