Use wrappers around all romvec functions on SPARC32 to flush register window and...
[openbios.git] / fs / iso9660 / iso9660.h
blobac6dcf0910debc3ff157f2d83797834fa851fef3
1 /*
3 * (c) 2005-2009 Laurent Vivier <Laurent@vivier.eu>
5 * This file has been copied from EMILE, http://emile.sf.net
7 */
9 #ifndef __ISO9660_H__
10 #define __ISO9660_H__
12 #include "iso9660_fs.h"
14 typedef struct iso9660_VOLUME {
15 int ucs_level;
16 struct iso_primary_descriptor *descriptor;
17 int fd;
18 } iso9660_VOLUME;
20 typedef struct iso9660_DIR {
21 iso9660_VOLUME *volume;
22 int extent;
23 int len;
24 int index;
25 unsigned char buffer[ISOFS_BLOCK_SIZE];
26 } iso9660_DIR;
28 typedef struct iso9660_FILE {
29 iso9660_VOLUME *volume;
30 char *path;
31 int base; /* first extent of the file */
32 int size; /* size of the file */
33 int offset;
34 int current;
35 unsigned char buffer[ISOFS_BLOCK_SIZE];
36 } iso9660_FILE;
38 static inline int isonum_721(char *p)
40 return ((p[0] & 0xff)
41 | ((p[1] & 0xff) << 8));
44 static inline int isonum_723(char *p)
46 return (isonum_721(p));
49 static inline int isonum_733(char *p)
51 return ((p[0] & 0xff) | ((p[1] & 0xff) << 8) |
52 ((p[2] & 0xff) << 16) | ((p[3] & 0xff) << 24));
55 extern struct iso_directory_record *iso9660_get_root_node(iso9660_VOLUME* volume);
56 extern struct iso_directory_record* iso9660_get_node(iso9660_VOLUME *volume, struct iso_directory_record *dirnode, const char *path);
58 #endif /* __ISO9660_H__ */