2015 char *
const *cav =
argv;
2020 unsigned long mem_start;
2022 struct stat statbuf;
2033 int no_path_names = 1;
2034 int warn_violate = 0;
2035 int have_cmd_line_pathspec = 0;
2036 int rationalize_all = 0;
2049 #if defined(USE_NLS) 2051 #if !defined(TEXT_DOMAIN) 2052 #define TEXT_DOMAIN "mkisofs" 2095 argind =
argc - cac;
2098 error(
_(
"Bad Option '%s' (error %d %s).\n"),
2104 argind =
argc - cac;
2107 have_cmd_line_pathspec = 1;
2111 printf(
_(
"mkisofs %s (%s-%s-%s)\n\n\ 2112 Copyright (C) 1993-1997 %s\n\ 2113 Copyright (C) 1997-2017 %s\n"),
2116 _(
"Eric Youngdale"),
2117 _(
"Joerg Schilling"));
2119 printf(
_(
"Copyright (C) 1997-2001 James Pearson\n"));
2122 printf(
_(
"Copyright (C) 2006 HELIOS Software GmbH\n"));
2124 #ifdef OPTION_SILO_BOOT 2125 printf(
_(
"Warning: this is unofficial (modified) version of mkisofs that incorporates\n"));
2126 printf(
_(
" support for a non Sparc compliant boot method called SILO.\n"));
2127 printf(
_(
" The official method to create Sparc boot CDs is to use -sparc-boot\n"));
2128 printf(
_(
" In case of problems first test with an official version of mkisofs.\n"));
2138 find_firstprim(&cac, &cav);
2141 argind =
argc - find_ac;
2147 fa.Argv = (
char **)cav;
2148 find_node = find_parse(&
fa);
2149 if (
fa.primtype == FIND_ERRARG)
2151 if (
fa.primtype != FIND_ENDARGS)
2154 find_patlen =
fa.patlen;
2156 maxdepth =
fa.maxdepth;
2157 mindepth =
fa.mindepth;
2163 if (find_pname(find_node,
"-exec") ||
2164 find_pname(find_node,
"-exec+") ||
2165 find_pname(find_node,
"-ok"))
2167 _(
"Cannot -exec with '-o -'.\n"));
2171 if (find_ac <= 0 || find_ac == find_pac) {
2180 | (dvd_hybrid ? DVD_SPEC_HYBRD : 0)
2181 | (dvd_video ? DVD_SPEC_VIDEO : 0);
2186 if (
strlen(
abstract) > 37) {
2188 _(
"Abstract filename string too long (cur. %lld max. 37 chars).\n"),
2195 _(
"Application-id string too long (cur. %lld max. 128 chars).\n"),
2202 _(
"Bibliographic filename string too long (cur. %lld max. 37 chars).\n"),
2206 #ifdef DUPLICATES_ONCE 2214 #if defined(IS_CYGWIN) 2225 #ifdef DUPLICATES_ONCE 2233 _(
"Warning: Cannot write inode/link information with -no-cache-inodes.\n"));
2236 _(
"Warning: Cannot add inode hints with -no-cache-inodes.\n"));
2239 #if defined(__MINGW32__) 2244 _(
"Warning: cannot -cache-inodes on this platform - ignoring.\n"));
2265 _(
"Copyright filename string too long (cur. %lld max. 37 chars).\n"),
2292 dirmode_to_use < 0 || dirmode_to_use > 07777) {
2307 filemode_to_use < 0 || filemode_to_use > 07777) {
2311 #ifdef __warn_follow__ 2314 _(
"Warning: -follow-links does not always work correctly; be careful.\n"));
2399 new_dir_mode < 0 || new_dir_mode > 07777) {
2411 _(
"Unsupported sector type '%s'.\n"),
2417 comerrno(
EX_BAD,
_(
"Preparer string too long (cur. %lld max. 128 chars).\n"),
2424 _(
"Publisher string too long (cur. %lld max. 128 chars).\n"),
2435 _(
"stream-file-name too long (%llu), max is %d.\n"),
2446 _(
"System ID string too long\n"));
2453 if (ucs_level < 1 || ucs_level > 3)
2463 if (rationalize_udf) {
2518 _(
"Volume ID string too long (cur. %lld max. 32 chars).\n"),
2525 _(
"Volume set ID string too long (cur. %lld max. 128 chars).\n"),
2536 _(
"Volume Set Size > 1 not yet supported\n"));
2542 _(
"Volume set sequence number too big\n"));
2552 _(
"Transparent compression not supported with VMS\n"));
2558 if (
strlen(deftype) != 4) {
2560 _(
"HFS default TYPE string has illegal length.\n"));
2563 deftype = APPLE_TYPE_DEFAULT;
2567 if (
strlen(defcreator) != 4) {
2569 _(
"HFS default CREATOR string has illegal length.\n"));
2572 defcreator = APPLE_CREATOR_DEFAULT;
2574 if (afpfile && *afpfile !=
'\0')
2575 hfs_last = MAP_LAST;
2577 hfs_last = MAG_LAST;
2580 _(
"Warning: -no-mac-files no longer used ... ignoring\n"));
2599 if (*afpfile || probe || use_mac_name || hfs_select ||
2600 hfs_boot_file || magic_file ||
2601 hfs_ishidden() || gen_pt || autoname ||
2602 afe_size || icon_pos || hfs_ct ||
2603 hfs_icharset || hfs_ocharset) {
2606 if ((DO_XHFS & hfs_select) && use_udf) {
2608 if (!no_apple_hyb) {
2610 _(
"Warning: no HFS hybrid will be created with -udf and --osx-hfs\n"));
2621 error(
_(
"Warning: cannot create UDF symlinks with activated Rock Ridge\n"));
2632 error(
_(
"Warning: cannot support large files with -hfs\n"));
2639 if (apple_ext && hfs_boot_file) {
2642 if (apple_ext && autoname) {
2646 comerrno(
EX_BAD,
_(
"Can't have -hfs with -sparc-boot/-sunx86-boot\n"));
2652 if (apple_ext && use_prep_boot) {
2664 if (apple_both &&
verbose && !(hfs_select || *afpfile || magic_file)) {
2666 _(
"Warning: no Apple/Unix files will be decoded/mapped\n"));
2668 if (apple_both &&
verbose && !afe_size &&
2669 (hfs_select & (DO_FEU | DO_FEL))) {
2671 _(
"Warning: assuming PC Exchange cluster size of 512 bytes\n"));
2676 hfs_init(afpfile, 0, hfs_select);
2688 comerrno(
EX_BAD,
_(
"Need either -XA/-xa or -R/-r for -apple to become active.\n"));
2705 if (rationalize_all) {
2720 error(
_(
"Warning: Disabling Joliet support for DVD-Video/DVD-Audio.\n"));
2732 error(
_(
"Warning: creating filesystem that does not conform to ISO-9660.\n"));
2734 error(
_(
"Warning: Creating ISO-9660:1999 (version 2) filesystem.\n"));
2736 error(
_(
"Warning: ISO-9660 filenames longer than %d may cause buffer overflows in the OS.\n"),
2739 error(
_(
"Warning: creating filesystem with (nonstandard) Joliet extensions\n"));
2740 error(
_(
" but without (standard) Rock Ridge extensions.\n"));
2741 error(
_(
" It is highly recommended to add Rock Ridge\n"));
2744 error(
_(
"Warning: using transparent compression. This is a nonstandard Rock Ridge\n"));
2745 error(
_(
" extension. The resulting filesystem can only be transparently\n"));
2746 error(
_(
" read on Linux. On other operating systems you need to call\n"));
2747 error(
_(
" mkzftree by hand to decompress the files.\n"));
2750 error(
_(
"Warning: transparent decompression is a Linux Rock Ridge extension, but\n"));
2751 error(
_(
" creating filesystem without Rock Ridge attributes; files\n"));
2752 error(
_(
" will not be transparently decompressed.\n"));
2755 #if defined(USE_NLS) && defined(HAVE_NL_LANGINFO) && defined(CODESET) 2768 char *codeset = nl_langinfo(CODESET);
2771 if (codeset !=
NULL)
2773 if (codeset ==
NULL)
2775 if (*codeset ==
'\0')
2778 for (
p = (
Uchar *)codeset; *
p !=
'\0';
p++) {
2784 if (*
p ==
'_' || *
p ==
'-')
2786 codeset = (
char *)
p;
2788 if (
strcmp(
"646", codeset) != 0 &&
2789 strcmp(
"ASCII", codeset) != 0 &&
2790 strcmp(
"US-ASCII", codeset) != 0 &&
2791 strcmp(
"US_ASCII", codeset) != 0 &&
2792 strcmp(
"USASCII", codeset) != 0 &&
2793 strcmp(
"ANSI_X3.4-1968", codeset) != 0)
2796 if (codeset !=
NULL)
2800 error(
_(
"Setting input-charset to '%s' from locale.\n"),
2812 #if (defined(__CYGWIN32__) || defined(__CYGWIN__) || defined(__DJGPP__)) && !defined(IS_CYGWIN_1) 2830 fprintf(
stderr,
_(
"Unknown charset '%s'.\nKnown charsets are:\n"),
2843 _(
"Iconv based locales may change file name length.\n"));
2845 _(
"Cannot yet have different -input-charset/-output-charset.\n"));
2850 if (hfs_icharset ==
NULL ||
strcmp(hfs_icharset,
"mac-roman") == 0) {
2851 hfs_icharset =
"cp10000";
2855 if (hfs_ocharset ==
NULL) {
2858 if (hfs_ocharset ==
NULL ||
strcmp(hfs_ocharset,
"mac-roman") == 0) {
2859 hfs_ocharset =
"cp10000";
2866 fprintf(
stderr,
_(
"Unknown HFS charset '%s'.\nKnown charsets are:\n"),
2867 hfs_inls ==
NULL ? hfs_icharset : (hfs_ocharset ? hfs_ocharset :
"NULL"));
2876 _(
"Iconv based locales may change file name length.\n"));
2878 _(
"Cannot yet have different -input-hfs-charset/-output-hfs-charset.\n"));
2886 comerr(
_(
"Unable to open previous session image '%s'.\n"),
2891 #ifdef HAVE_SETREUID 2892 if (setreuid(-1,
getuid()) < 0)
2900 comerr(
_(
"Panic cannot set back effective uid.\n"));
2903 #ifdef no_more_needed 2909 if (getrlimit(RLIMIT_DATA, &rlp) == -1)
2910 errmsg(
_(
"Warning: Cannot get rlimit.\n"));
2912 rlp.rlim_cur = 33554432;
2913 if (setrlimit(RLIMIT_DATA, &rlp) == -1)
2914 errmsg(
_(
"Warning: Cannot set rlimit.\n"));
2920 mem_start = (
unsigned long) sbrk(0);
2930 _(
"Multisession usage bug: Must specify -C if -M is used.\n"));
2934 _(
"Warning: -C specified without -M: old session data will not be merged.\n"));
2939 _(
"Warning: files from previous sessions will not be included in the HFS volume.\n"));
2950 comerr(
_(
"Unable to open pathname list %s.\n"),
2982 _(
"Cannot use XA, Rock Ridge, UDF or Joliet with -stream-media-size\n"));
2985 _(
"Cannot use multi session with -stream-media-size\n"));
2993 _(
"Cannot use boot options with -stream-media-size\n"));
2997 _(
"Cannot use Apple hybrid options with -stream-media-size\n"));
3005 "THE ROCK RIDGE INTERCHANGE PROTOCOL PROVIDES SUPPORT FOR POSIX FILE SYSTEM SEMANTICS",
3006 "PLEASE CONTACT DISC PUBLISHER FOR SPECIFICATION SOURCE. SEE PUBLISHER IDENTIFIER IN PRIMARY VOLUME DESCRIPTOR FOR CONTACT INFORMATION.",
3010 "THE IEEE P1282 PROTOCOL PROVIDES SUPPORT FOR POSIX FILE SYSTEM SEMANTICS",
3011 "PLEASE CONTACT THE IEEE STANDARDS DEPARTMENT, PISCATAWAY, NJ, USA FOR THE P1282 SPECIFICATION.",
3076 memset(&de, 0,
sizeof (de));
3099 if (mrootp ==
NULL) {
3103 comerr(
_(
"Unable to find previous session PVD '%s'.\n"),
3122 extern char er_id[];
3129 _(
"No valid Rock Ridge signature found\n"));
3134 _(
"Rock Ridge signatures version %d found\n"),
3137 _(
"Rock Ridge id '%s'\n"),
er_id);
3141 fprintf(
stderr,
_(
"Bad Rock Ridge signatures found (SU record missing)\n"));
3164 set_root_info(root_info);
3179 walkinitstate(&walkstate);
3180 if (find_patlen > 0) {
3181 walkstate.patstate =
___malloc(
sizeof (
int) * find_patlen,
3182 _(
"space for pattern state"));
3185 find_timeinit(
time(0));
3187 walkstate.maxdepth = maxdepth;
3188 walkstate.mindepth = mindepth;
3189 walkstate.lname =
NULL;
3190 walkstate.tree = find_node;
3192 walkstate.pflags = 0;
3207 graft_point[0] =
'\0';
3211 graft_point,
sizeof (graft_point),
3212 nodename,
sizeof (nodename),
3214 if (graft_point[0] !=
'\0') {
3221 walkstate.auxp = &wa;
3223 treewalk(
arg, walkfunc, &walkstate);
3226 find_plusflush(plusp, &walkstate);
3235 nodename,
sizeof (nodename),
NULL,
TRUE);
3241 if (pfp && pfp !=
stdin)
3326 comerr(
_(
"Unable to open /dev/null\n"));
3461 if (opnt->of_size !=
NULL) {
3476 if (opnt->of_generate !=
NULL) {
3480 (*opnt->of_generate) ();
3495 if (udf_end_anchor_vol_desc_frag.of_size !=
NULL) {
3496 (*udf_end_anchor_vol_desc_frag.of_size) (
last_extent);
3504 if (udf_padend_avdp_frag.of_size !=
NULL) {
3555 _(
"Total extents scheduled to be written = %u\n"),
3576 _(
"Implementation botch: %s should start at %u but starts at %u.\n"),
3579 if (opnt->of_write !=
NULL) {
3591 _(
"Implementation botch: FS should end at %u but ends at %u.\n"),
3598 (
unsigned int)(((
unsigned long) sbrk(0)) - mem_start));
int full_iso9660_filenames
EXPORT siconvt_t * sic_open(char *charset)
LOCAL void read_rcfile(char *appname)
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
EXPORT void comerr(char *msg, va_alist)
struct output_fragment extension_desc
LOCAL void checkarch(char *name)
#define bindtextdomain(d, dir)
ACPI_SIZE strlen(const char *String)
struct output_fragment jpathtable_desc
struct directory * get_graft(char *arg, char *graft_point, size_t glen, char *nodename, size_t nlen, char **short_namep, BOOL do_insert)
char * strstr(char *String1, char *String2)
int untranslated_filenames
LOCAL char * escstrcpy(char *to, size_t tolen, char *from)
EXPORT char * e_strdup(char *s) const
#define BOOT_CATALOG_DEFAULT
char *abstract char * volset_id
LOCAL struct ga_flags * gl_flags
int open_merge_image(char *path)
struct output_fragment dirtree_clean
EXPORT void init_boot_catalog(char *path) const
LOCAL void hide_reloc_dir()
struct output_fragment strpath_desc
#define gettimeofday(tv, tz)
int extension_record_size
struct output_fragment dirtree_desc
EXPORT int setuid(uid_t uid)
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
struct output_fragment end_vol
struct output_fragment strdir_desc
LOCAL BOOL data_change_warn
EXPORT UInt32_t get_733(void *vp)
LOCAL void susage(int excode)
EXPORT int errmsg(char *msg, va_alist)
unsigned int of_start_extent
unsigned int jpath_blocks
LOCAL void usage(int excode)
LOCAL int getH __PR((const char *arg, void *valp, int *pac, char *const **pav, const char *opt))
struct output_fragment joliet_desc
struct output_fragment * out_list
EXPORT int errconfig(char *name)
LOCAL void list_locales()
EXPORT int joliet_sort_tree(struct directory *node)
EXPORT char * searchfileinpath(char *name, int mode, int file_mode, char *path)
struct output_fragment torito_desc
_Check_return_ _CRTIMP int __cdecl fileno(_In_ FILE *_File)
int transparent_compression
struct directory * reloc_dir
struct output_fragment voldesc_desc
unsigned int path_table_size
EXPORT int seteuid(uid_t uid)
LOCAL const struct mki_option mki_options[]
struct output_fragment interpad_desc
int volume_sequence_number
LOCAL char * get_pnames(int argc, char *const *argv, int opt, char *pname, int pnsize, FILE *fp)
struct output_fragment strfile_desc
UInt32_t last_extent_written
EXPORT void save_args(int ac, av)
struct output_fragment * of_next
#define memcpy(s1, s2, n)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
struct output_fragment endpad_desc
_Check_return_ _CRTIMP int __cdecl setmode(_In_ int _FileHandle, _In_ int _Mode)
void match_cl_re_entries()
EXPORT void comexit(int err)
struct output_fragment startpad_desc
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
struct output_fragment jdirtree_desc
EXPORT void insert_boot_cat()
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
int rr_flags(struct iso_directory_record *idr)
EXPORT char * findgequal(char *s)
unsigned int jpath_table_size
struct output_fragment pathtable_desc
EXPORT void comerrno(int err, char *msg, va_alist)
char * strchr(const char *String, int ch)
EXPORT char * generate_rr_extension_record(char *id, char *descriptor, char *source, int *size)
struct output_fragment files_desc
_Check_return_ long __cdecl strtol(_In_z_ const char *_Str, _Out_opt_ _Deref_post_z_ char **_EndPtr, _In_ int _Radix)
struct iso_directory_record * merge_isofs(char *path)
EXPORT int readsecs(UInt32_t startsecno, void *buffer, int sectorcount)
int strcmp(const char *String1, const char *String2)
_Check_return_ _CRTIMP FILE *__cdecl freopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode, _Inout_ FILE *_File)
_Check_return_opt_ _CRTIMP int __cdecl setvbuf(_Inout_ FILE *_File, _Inout_updates_opt_z_(_Size) char *_Buf, _In_ int _Mode, _In_ size_t _Size)
struct output_fragment xvoldesc_desc
int get_session_start(int *file_addr)
GLuint GLuint GLsizei GLenum type
#define MAX_ISONAME_V2_RR
int merge_previous_session(struct directory *this_dir, struct iso_directory_record *mrootp, char *reloc_root, char *reloc_old_root)
struct output_fragment version_desc
EXPORT int errmsgno(int err, char *msg, va_alist)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
char extent[ISODCL(3, 10)]