[MKISOFS]
authorColin Finck <colin@reactos.org>
Sun, 5 Mar 2017 22:54:33 +0000 (22:54 +0000)
committerColin Finck <colin@reactos.org>
Sun, 5 Mar 2017 22:54:33 +0000 (22:54 +0000)
Update mkisofs to schily-2017-02-16, which comes with the following fixes:
- Fix null termination in libschily's Win32 implementation of opendir (submitted upstream by me).
  The bug was triggered when building an ISO from a directory instead of a graft-points (.lst) file.
- Prevent -duplicates-once from being used together with -cache-inodes. These options exclude each other.

svn path=/trunk/; revision=74112

reactos/sdk/tools/mkisofs/schilytools/cdrecord/version.h
reactos/sdk/tools/mkisofs/schilytools/include/schily/schily.h
reactos/sdk/tools/mkisofs/schilytools/libschily/dirent.c
reactos/sdk/tools/mkisofs/schilytools/mkisofs/mkisofs.c

index 3161c33..5941b33 100644 (file)
@@ -1,6 +1,6 @@
-/* @(#)version.h       1.92 16/01/26 Copyright 2007-2016 J. Schilling */
+/* @(#)version.h       1.93 16/12/15 Copyright 2007-2016 J. Schilling */
 
 /*
  * The version for cdrtools programs
  */
 
 /*
  * The version for cdrtools programs
  */
-#define        VERSION "3.02a06"
+#define        VERSION "3.02a07"
index 74a88e8..d48abbe 100644 (file)
@@ -1,4 +1,4 @@
-/* @(#)schily.h        1.121 16/11/04 Copyright 1985-2016 J. Schilling */
+/* @(#)schily.h        1.122 16/12/18 Copyright 1985-2016 J. Schilling */
 /*
  *     Definitions for libschily
  *
 /*
  *     Definitions for libschily
  *
@@ -543,7 +543,7 @@ extern      int     _openfd64       __PR((const char *, int));
 #ifdef __never__
 #undef error
 #define        error           js_error
 #ifdef __never__
 #undef error
 #define        error           js_error
-#endif
+#endif /* __never__ */
 #undef dprintf
 #define        dprintf         js_dprintf
 #undef fprintf
 #undef dprintf
 #define        dprintf         js_dprintf
 #undef fprintf
@@ -558,9 +558,9 @@ extern      int     _openfd64       __PR((const char *, int));
 #ifndef        HAVE_SNPRINTF
 #undef snprintf
 #define        snprintf        js_snprintf
 #ifndef        HAVE_SNPRINTF
 #undef snprintf
 #define        snprintf        js_snprintf
-#endif
-#endif
-#endif
+#endif /* HAVE_SNPRINTF */
+#endif /* SCHILY_PRINT */
+#endif /* NO_SCHILY_PRINT */
 
 #ifndef        NO_SCHILY_GETLINE       /* Define to disable *getline() redirect */
 #undef getline
 
 #ifndef        NO_SCHILY_GETLINE       /* Define to disable *getline() redirect */
 #undef getline
index aa35830..097956c 100644 (file)
@@ -1,11 +1,11 @@
-/* @(#)dirent.c        1.3 12/03/20 Copyright 2011 J. Schilling */
+/* @(#)dirent.c        1.4 17/02/02 Copyright 2011-2017 J. Schilling */
 #include <schily/mconfig.h>
 #ifndef lint
 static UConst char sccsid[] =
 #include <schily/mconfig.h>
 #ifndef lint
 static UConst char sccsid[] =
-       "@(#)dirent.c   1.3 12/03/20 Copyright 2011 J. Schilling";
+       "@(#)dirent.c   1.4 17/02/02 Copyright 2011-2017 J. Schilling";
 #endif
 /*
 #endif
 /*
- *     Copyright (c) 2011 J. Schilling
+ *     Copyright (c) 2011-2017 J. Schilling
  */
 /*
  * The contents of this file are subject to the terms of the
  */
 /*
  * The contents of this file are subject to the terms of the
@@ -14,6 +14,8 @@ static        UConst char sccsid[] =
  * with the License.
  *
  * See the file CDDL.Schily.txt in this distribution for details.
  * with the License.
  *
  * See the file CDDL.Schily.txt in this distribution for details.
+ * A copy of the CDDL is also available via the Internet at
+ * http://www.opensource.org/licenses/cddl1.txt
  *
  * When distributing Covered Code, include this CDDL HEADER in each
  * file and include the License file CDDL.Schily.txt from this distribution.
  *
  * When distributing Covered Code, include this CDDL HEADER in each
  * file and include the License file CDDL.Schily.txt from this distribution.
@@ -84,7 +86,8 @@ opendir(dname)
                dp->dd_dirname[len] = '\\';
                len++;
        }
                dp->dd_dirname[len] = '\\';
                len++;
        }
-       dp->dd_dirname[len] = '*';
+       dp->dd_dirname[len++] = '*';
+       dp->dd_dirname[len]   = '\0';
        dp->dd_handle = -1;
        dp->dd_state  = 0;
 
        dp->dd_handle = -1;
        dp->dd_state  = 0;
 
index a7136a5..e8a697f 100644 (file)
@@ -1,8 +1,8 @@
-/* @(#)mkisofs.c       1.288 16/12/13 joerg */
+/* @(#)mkisofs.c       1.289 17/01/05 joerg */
 #include <schily/mconfig.h>
 #ifndef lint
 static UConst char sccsid[] =
 #include <schily/mconfig.h>
 #ifndef lint
 static UConst char sccsid[] =
-       "@(#)mkisofs.c  1.288 16/12/13 joerg";
+       "@(#)mkisofs.c  1.289 17/01/05 joerg";
 #endif
 /*
  * Program mkisofs.c - generate iso9660 filesystem  based upon directory
 #endif
 /*
  * Program mkisofs.c - generate iso9660 filesystem  based upon directory
@@ -11,7 +11,7 @@ static        UConst char sccsid[] =
  * Written by Eric Youngdale (1993).
  *
  * Copyright 1993 Yggdrasil Computing, Incorporated
  * Written by Eric Youngdale (1993).
  *
  * Copyright 1993 Yggdrasil Computing, Incorporated
- * Copyright (c) 1997-2016 J. Schilling
+ * Copyright (c) 1997-2017 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
  *
  * 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
@@ -132,14 +132,13 @@ BOOL      legacy = FALSE;         /* Implement legacy support for historic CLI */
 int    all_files = 1;          /* New default is to include all files */
 BOOL   Hflag = FALSE;          /* Follow links on cmdline (-H) */
 BOOL   follow_links = FALSE;   /* Follow all links (-L)        */
 int    all_files = 1;          /* New default is to include all files */
 BOOL   Hflag = FALSE;          /* Follow links on cmdline (-H) */
 BOOL   follow_links = FALSE;   /* Follow all links (-L)        */
-#if    defined(IS_CYGWIN) || defined(__MINGW32__) || defined(_MSC_VER)
+#if    defined(__MINGW32__) || defined(_MSC_VER)
 /*
 /*
- * Do not cache inodes on Cygwin by default
- * See below in main(), cache for 64bit ino_t
+ * Never cache inodes on DOS or Win-DOS.
  */
 int    cache_inodes = 0;
 #else
  */
 int    cache_inodes = 0;
 #else
-int    cache_inodes = 1; /* Cache inodes if OS has unique inodes */
+int    cache_inodes = -1;      /* Cache inodes if OS has unique inodes */
 #endif
 int    rationalize = 0;        /* Need to call stat_fix()      */
 int    rationalize_uid = 0;
 #endif
 int    rationalize = 0;        /* Need to call stat_fix()      */
 int    rationalize_uid = 0;
@@ -2088,14 +2087,6 @@ main(argc, argv)
        modification_date.l_usec = tv_begun.tv_usec;
        modification_date.l_gmtoff = -100;
 
        modification_date.l_usec = tv_begun.tv_usec;
        modification_date.l_gmtoff = -100;
 
-#if    defined(IS_CYGWIN)
-       /*
-        * If we have 64 bit inode numbers, Cygwin should be able to work
-        * correctly on NTFS.
-        */
-       if (sizeof (ino_t) >= 8)
-               cache_inodes = 1;
-#endif
        cac--;
        cav++;
        c = getvargs(&cac, &cav, GA_NO_PROPS, flags);
        cac--;
        cav++;
        c = getvargs(&cac, &cav, GA_NO_PROPS, flags);
@@ -2119,7 +2110,7 @@ args_ok:
        if (pversion) {
                printf(_("mkisofs %s (%s-%s-%s)\n\n\
 Copyright (C) 1993-1997 %s\n\
        if (pversion) {
                printf(_("mkisofs %s (%s-%s-%s)\n\n\
 Copyright (C) 1993-1997 %s\n\
-Copyright (C) 1997-2016 %s\n"),
+Copyright (C) 1997-2017 %s\n"),
                        version_string,
                        HOST_CPU, HOST_VENDOR, HOST_OS,
                        _("Eric Youngdale"),
                        version_string,
                        HOST_CPU, HOST_VENDOR, HOST_OS,
                        _("Eric Youngdale"),
@@ -2212,6 +2203,25 @@ Copyright (C) 1997-2016 %s\n"),
                        (Llong)strlen(biblio));
                }
        }
                        (Llong)strlen(biblio));
                }
        }
+#ifdef DUPLICATES_ONCE
+       /*
+        * If -duplicates-once was specified, do not implicitly enable
+        * -cache-inodes.
+        */
+       if (cache_inodes < 0 && duplicates_once)
+               cache_inodes = 0;
+#endif
+#if    defined(IS_CYGWIN)
+       /*
+        * If we have 64 bit inode numbers, Cygwin should be able to work
+        * correctly on NTFS, otherwise disable caching unless it has
+        * been enforced via -cache-inodes.
+        */
+       if (cache_inodes < 0 && sizeof (ino_t) < 8)
+               cache_inodes = 0;
+#endif
+       if (cache_inodes < 0)
+               cache_inodes = 1;
 #ifdef DUPLICATES_ONCE
        if (!cache_inodes && !duplicates_once) {
 #else
 #ifdef DUPLICATES_ONCE
        if (!cache_inodes && !duplicates_once) {
 #else