📄 mkisofs.h
字号:
/* @(#)mkisofs.h 1.75 02/10/24 joerg *//* * Header file mkisofs.h - assorted structure definitions and typecasts. Written by Eric Youngdale (1993). Copyright 1993 Yggdrasil Computing, Incorporated Copyright (c) 1999,2000,2001 J. Schilling This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *//* APPLE_HYB James Pearson j.pearson@ge.ucl.ac.uk 23/2/2000 */#include <mconfig.h> /* Must be before stdio.h for LARGEFILE support */#include <stdio.h>#include <statdefs.h>#include <stdxlib.h>#include <unixstd.h> /* Needed for for LARGEFILE support */#include <strdefs.h>#ifdef ultrixextern char *strdup();#endif#include <dirdefs.h>#include <utypes.h>#include <standard.h>#ifdef DVD_VIDEO#ifndef UDF#define UDF#endif#endif/*#if _LFS_LARGEFILE*/#ifdef HAVE_LARGEFILES/* * XXX Hack until fseeko()/ftello() are available everywhere or until * XXX we know a secure way to let autoconf ckeck for fseeko()/ftello() * XXX without defining FILE_OFFSETBITS to 64 in confdefs.h */# define fseek fseeko# define ftell ftello#endif#ifndef HAVE_LSTAT#ifndef VMS#define lstat stat#endif#endif#ifndef __SVR4extern int optind;extern char *optarg;/* extern int getopt (int __argc, char **__argv, char *__optstring); */#endif#include "iso9660.h"#include "defaults.h"#include <unls.h>extern struct nls_table *in_nls; /* input UNICODE conversion table */extern struct nls_table *out_nls; /* output UNICODE conversion table */extern struct nls_table *hfs_inls; /* input HFS UNICODE conversion table */extern struct nls_table *hfs_onls; /* output HFS UNICODE conversion table */#ifdef APPLE_HYB#include "mactypes.h"#include "hfs.h"struct hfs_info { unsigned char finderinfo[32]; char name[HFS_MAX_FLEN + 1]; /* should have fields for dates here as well */ char *keyname; struct hfs_info *next;};#endif /* APPLE_HYB */struct directory_entry { struct directory_entry *next; struct directory_entry *jnext; struct iso_directory_record isorec; unsigned int starting_block; off_t size; unsigned short priority; unsigned char jreclen; /* Joliet record len */ char *name; char *table; char *whole_name; struct directory *filedir; struct directory_entry *parent_rec; unsigned int de_flags; ino_t inode; /* Used in the hash table */ dev_t dev; /* Used in the hash table */ unsigned char *rr_attributes; unsigned int rr_attr_size; unsigned int total_rr_attr_size; unsigned int got_rr_name;#ifdef APPLE_HYB struct directory_entry *assoc; /* entry has a resource fork */ hfsdirent *hfs_ent; /* HFS parameters */ off_t hfs_off; /* offset to real start of fork */ int hfs_type; /* type of HFS Unix file */#endif /* APPLE_HYB */#ifdef SORTING int sort; /* sort weight for entry */#endif /* SORTING */#ifdef UDF int udf_file_entry_sector; /* also used as UDF unique ID */#endif};struct file_hash { struct file_hash *next; ino_t inode; /* Used in the hash table */ dev_t dev; /* Used in the hash table */ unsigned int starting_block; off_t size;#ifdef SORTING struct directory_entry *de;#endif /* SORTING */};/* * This structure is used to control the output of fragments to the cdrom * image. Everything that will be written to the output image will eventually * go through this structure. There are two pieces - first is the sizing where * we establish extent numbers for everything, and the second is when we actually * generate the contents and write it to the output image. * * This makes it trivial to extend mkisofs to write special things in the image. * All you need to do is hook an additional structure in the list, and the rest * works like magic. * * The three passes each do the following: * * The 'size' pass determines the size of each component and assigns the extent number * for that component. * * The 'generate' pass will adjust the contents and pointers as required now that extent * numbers are assigned. In some cases, the contents of the record are also generated. * * The 'write' pass actually writes the data to the disc. */struct output_fragment { struct output_fragment *of_next; int (*of_size) __PR((int)); int (*of_generate) __PR((void)); int (*of_write) __PR((FILE *)); char *of_name; /* Textual description*/};extern struct output_fragment *out_list;extern struct output_fragment *out_tail;extern struct output_fragment padblock_desc;extern struct output_fragment voldesc_desc;extern struct output_fragment joliet_desc;extern struct output_fragment torito_desc;extern struct output_fragment end_vol;extern struct output_fragment version_desc;extern struct output_fragment pathtable_desc;extern struct output_fragment jpathtable_desc;extern struct output_fragment dirtree_desc;extern struct output_fragment dirtree_clean;extern struct output_fragment jdirtree_desc;extern struct output_fragment extension_desc;extern struct output_fragment files_desc;extern struct output_fragment padend_desc;extern struct output_fragment sunboot_desc;extern struct output_fragment sunlabel_desc;extern struct output_fragment genboot_desc;#ifdef APPLE_HYBextern struct output_fragment hfs_desc;#endif /* APPLE_HYB */#ifdef DVD_VIDEO/* * This structure holds the information necessary to create a valid * DVD-Video image. Basically it's how much to pad the files so the * file offsets described in the video_ts.ifo and vts_xx_0.ifo are * the correct one in the image that we create. */typedef struct { int realsize_ifo; int realsize_menu; int realsize_bup; int size_ifo; int size_menu; int size_title; int size_bup; int pad_ifo; int pad_menu; int pad_title; int pad_bup; int number_of_vob_files; int realsize_vob[10];} title_set_t;typedef struct { int num_titles; title_set_t *title_set;} title_set_info_t; #endif /* DVD_VIDEO *//* * This structure describes one complete directory. It has pointers * to other directories in the overall tree so that it is clear where * this directory lives in the tree, and it also must contain pointers * to the contents of the directory. Note that subdirectories of this * directory exist twice in this stucture. Once in the subdir chain, * and again in the contents chain. */struct directory { struct directory *next; /* Next directory at same level as this one */ struct directory *subdir; /* First subdirectory in this directory */ struct directory *parent; struct directory_entry *contents; struct directory_entry *jcontents; struct directory_entry *self; char *whole_name; /* Entire path */ char *de_name; /* Entire path */ unsigned int ce_bytes; /* Number of bytes of CE entries read for this dir */ unsigned int depth; unsigned int size; unsigned int extent; unsigned int jsize; unsigned int jextent; unsigned int path_index; unsigned int jpath_index; unsigned short dir_flags; unsigned short dir_nlink;#ifdef APPLE_HYB hfsdirent *hfs_ent; /* HFS parameters */ struct hfs_info *hfs_info; /* list of info for all entries in dir */#endif /* APPLE_HYB */#ifdef SORTING int sort; /* sort weight for child files */#endif /* SORTING */};struct deferred_write { struct deferred_write *next; char *table; unsigned int extent; unsigned int size; char *name; struct directory_entry *s_entry; unsigned int pad; off_t off;};struct eltorito_boot_entry_info { struct eltorito_boot_entry_info *next; char *boot_image; int not_bootable; int no_emul_boot; int hard_disk_boot; int boot_info_table; int load_size; int load_addr;};extern int goof;extern struct directory *root;extern struct directory *reloc_dir;extern unsigned int next_extent;extern unsigned int last_extent;extern unsigned int last_extent_written;extern unsigned int session_start;extern unsigned int path_table_size;extern unsigned int path_table[4];extern unsigned int path_blocks;extern char *path_table_l;extern char *path_table_m;extern unsigned int jpath_table_size;extern unsigned int jpath_table[4];extern unsigned int jpath_blocks;extern char *jpath_table_l;extern char *jpath_table_m;extern struct iso_directory_record root_record;extern struct iso_directory_record jroot_record;extern int check_oldnames;extern int check_session;extern int use_eltorito;extern int hard_disk_boot;extern int not_bootable;extern int no_emul_boot;extern int load_addr;extern int load_size;extern int boot_info_table;extern int use_RockRidge;extern int use_Joliet;extern int use_Md5Opt;extern int rationalize;extern int rationalize_uid;extern int rationalize_gid;extern int rationalize_filemode;extern int rationalize_dirmode;extern uid_t uid_to_use;extern gid_t gid_to_use;extern int filemode_to_use;extern int dirmode_to_use;extern int new_dir_mode;extern int follow_links;extern int cache_inodes;extern int verbose;extern int debug;extern int gui;extern int all_files;extern int generate_tables;extern int print_size;extern int split_output;extern int use_graft_ptrs;extern int jhide_trans_tbl;extern int hide_rr_moved;extern int omit_period;extern int omit_version_number;extern int no_rr;extern int transparent_compression;extern Uint RR_relocation_depth;extern int iso9660_level;extern int iso9660_namelen;extern int full_iso9660_filenames;extern int relaxed_filenames;extern int gbk4dos_filenames;extern int gbk4win_filenames;extern int allow_lowercase;extern int allow_multidot;extern int iso_translate;extern int allow_leading_dots;extern int use_fileversion;extern int split_SL_component;extern int split_SL_field;extern char *trans_tbl;#define JMAX 64 /* maximum Joliet file name length (spec) */#define JLONGMAX 103 /* out of spec Joliet file name length */extern int jlen; /* selected maximum Joliet file name length */#ifdef DVD_VIDEOextern int dvd_video;#endif /* DVD_VIDEO */#ifdef APPLE_HYBextern int apple_hyb; /* create HFS hybrid */extern int apple_ext; /* use Apple extensions */extern int apple_both; /* common flag (for above) */extern int hfs_extra; /* extra ISO extents (hfs_ce_size) */extern hce_mem *hce; /* libhfs/mkisofs extras */extern int use_mac_name; /* use Mac name for ISO9660/Joliet/RR */extern int create_dt; /* create the Desktp files */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -