[Debburn-changes] r536 - cdrkit/trunk/genisoimage
Eduard Bloch
blade at alioth.debian.org
Sat Dec 2 11:09:57 CET 2006
Author: blade
Date: 2006-12-02 11:09:56 +0100 (Sat, 02 Dec 2006)
New Revision: 536
Modified:
cdrkit/trunk/genisoimage/genisoimage.c
cdrkit/trunk/genisoimage/genisoimage.h
cdrkit/trunk/genisoimage/tree.c
Log:
Clear warnings when multiple args have been merged and sorting fails
Modified: cdrkit/trunk/genisoimage/genisoimage.c
===================================================================
--- cdrkit/trunk/genisoimage/genisoimage.c 2006-12-02 09:33:37 UTC (rev 535)
+++ cdrkit/trunk/genisoimage/genisoimage.c 2006-12-02 10:09:56 UTC (rev 536)
@@ -284,6 +284,8 @@
{NULL, NULL}
};
+char *merge_warn_msg=0; /* use as pointer and boolean */
+
/*
* In case it isn't obvious, the option handling code was ripped off
* from GNU-ld.
@@ -1278,7 +1280,7 @@
int warn_violate = 0;
int have_cmd_line_pathspec = 0;
int rationalize_all = 0;
- char *mkisofs_call = 0; /* use as pointer and boolean */
+ char *mkisofs_call = 0; /* use as pointer and boolean */
#ifdef APPLE_HYB
char *afpfile = ""; /* mapping file for TYPE/CREATOR */
@@ -2486,8 +2488,9 @@
fprintf(stderr, "Warning: ISO-9660 filenames longer than %d may cause buffer overflows in the OS.\n",
LEN_ISONAME);
if (use_Joliet && !use_RockRidge) {
- fprintf(stderr, "Warning: creating filesystem with Joliet extensions but without Rock Ridge\n"
- " extensions. It is highly recommended to add Rock Ridge.\n");
+ fprintf(stderr,
+ "Warning: creating filesystem with Joliet extensions but without Rock Ridge\n"
+ " extensions. It is highly recommended to add Rock Ridge.\n");
}
if (transparent_compression) {
fprintf(stderr, "Warning: using transparent compression. This is a nonstandard Rock Ridge\n");
@@ -3044,6 +3047,10 @@
set_root_info(root_info);
#endif /* APPLE_HYB */
+ if(optind < argc-1)
+ merge_warn_msg="NOTE: multiple source directories have been specified and merged into the root\n"
+ "of the filesystem. Check your program arguments. genisoimage is not tar.\n";
+
/*
* Scan the actual directory (and any we find below it) for files to
* write out to the output image. Note - we take multiple source
@@ -3338,14 +3345,11 @@
*/
goof += sort_tree(root);
-/* error hier warne wie "Note: multiple source directories have been specified and merged to the root filesystem. Check your program arguments. genisoimage is not tar." */
if (goof) {
-#ifdef USE_LIBSCHILY
- comerrno(EX_BAD, "ISO9660/Rock Ridge tree sort failed.\n");
-#else
fprintf(stderr, "ISO9660/Rock Ridge tree sort failed.\n");
+ if(merge_warn_msg)
+ fprintf(stderr, merge_warn_msg);
exit(1);
-#endif
}
#ifdef UDF
if (use_Joliet || use_udf) {
@@ -3355,12 +3359,10 @@
goof += joliet_sort_tree(root);
}
if (goof) {
-#ifdef USE_LIBSCHILY
- comerrno(EX_BAD, "Joliet tree sort failed. The -joliet-long switch may help you.\n");
-#else
fprintf(stderr, "Joliet tree sort failed. The -joliet-long switch may help you.\n");
+ if(merge_warn_msg)
+ fprintf(stderr, merge_warn_msg);
exit(1);
-#endif
}
/*
* Fix a couple of things in the root directory so that everything is
Modified: cdrkit/trunk/genisoimage/genisoimage.h
===================================================================
--- cdrkit/trunk/genisoimage/genisoimage.h 2006-12-02 09:33:37 UTC (rev 535)
+++ cdrkit/trunk/genisoimage/genisoimage.h 2006-12-02 10:09:56 UTC (rev 536)
@@ -797,3 +797,8 @@
#ifndef offsetof
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
#endif
+
+/*
+ * EB: various shared stuff
+ */
+extern char *merge_warn_msg;
Modified: cdrkit/trunk/genisoimage/tree.c
===================================================================
--- cdrkit/trunk/genisoimage/tree.c 2006-12-02 09:33:37 UTC (rev 535)
+++ cdrkit/trunk/genisoimage/tree.c 2006-12-02 10:09:56 UTC (rev 536)
@@ -645,14 +645,11 @@
status = sort_directory(&this_dir->contents, (reloc_dir == this_dir));
if (status > 0) {
-#ifdef USE_LIBSCHILY
- comerrno(EX_BAD, "Unable to sort directory %s\n",
- this_dir->whole_name);
-#else
- fprintf(stderr, "Unable to sort directory %s\n",
- this_dir->whole_name);
- exit(1);
-#endif
+ fprintf(stderr, "Unable to sort directory %s\n",
+ this_dir->whole_name);
+ if(merge_warn_msg)
+ fprintf(stderr, merge_warn_msg);
+ exit(1);
}
/*
* If we are filling out a TRANS.TBL, generate the entries that will
More information about the Debburn-changes
mailing list