summaryrefslogtreecommitdiffstats
path: root/qemu/roms/openbios/fs/iso9660/iso9660.h
diff options
context:
space:
mode:
authorYang Zhang <yang.z.zhang@intel.com>2015-08-28 09:58:54 +0800
committerYang Zhang <yang.z.zhang@intel.com>2015-09-01 12:44:00 +0800
commite44e3482bdb4d0ebde2d8b41830ac2cdb07948fb (patch)
tree66b09f592c55df2878107a468a91d21506104d3f /qemu/roms/openbios/fs/iso9660/iso9660.h
parent9ca8dbcc65cfc63d6f5ef3312a33184e1d726e00 (diff)
Add qemu 2.4.0
Change-Id: Ic99cbad4b61f8b127b7dc74d04576c0bcbaaf4f5 Signed-off-by: Yang Zhang <yang.z.zhang@intel.com>
Diffstat (limited to 'qemu/roms/openbios/fs/iso9660/iso9660.h')
-rw-r--r--qemu/roms/openbios/fs/iso9660/iso9660.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/qemu/roms/openbios/fs/iso9660/iso9660.h b/qemu/roms/openbios/fs/iso9660/iso9660.h
new file mode 100644
index 000000000..ac6dcf091
--- /dev/null
+++ b/qemu/roms/openbios/fs/iso9660/iso9660.h
@@ -0,0 +1,58 @@
+/*
+ *
+ * (c) 2005-2009 Laurent Vivier <Laurent@vivier.eu>
+ *
+ * This file has been copied from EMILE, http://emile.sf.net
+ *
+ */
+
+#ifndef __ISO9660_H__
+#define __ISO9660_H__
+
+#include "iso9660_fs.h"
+
+typedef struct iso9660_VOLUME {
+ int ucs_level;
+ struct iso_primary_descriptor *descriptor;
+ int fd;
+} iso9660_VOLUME;
+
+typedef struct iso9660_DIR {
+ iso9660_VOLUME *volume;
+ int extent;
+ int len;
+ int index;
+ unsigned char buffer[ISOFS_BLOCK_SIZE];
+} iso9660_DIR;
+
+typedef struct iso9660_FILE {
+ iso9660_VOLUME *volume;
+ char *path;
+ int base; /* first extent of the file */
+ int size; /* size of the file */
+ int offset;
+ int current;
+ unsigned char buffer[ISOFS_BLOCK_SIZE];
+} iso9660_FILE;
+
+static inline int isonum_721(char *p)
+{
+ return ((p[0] & 0xff)
+ | ((p[1] & 0xff) << 8));
+}
+
+static inline int isonum_723(char *p)
+{
+ return (isonum_721(p));
+}
+
+static inline int isonum_733(char *p)
+{
+ return ((p[0] & 0xff) | ((p[1] & 0xff) << 8) |
+ ((p[2] & 0xff) << 16) | ((p[3] & 0xff) << 24));
+}
+
+extern struct iso_directory_record *iso9660_get_root_node(iso9660_VOLUME* volume);
+extern struct iso_directory_record* iso9660_get_node(iso9660_VOLUME *volume, struct iso_directory_record *dirnode, const char *path);
+
+#endif /* __ISO9660_H__ */