[syslinux] isohybrid.h

Geert Stappers stappers at stappers.nl
Tue May 4 02:23:33 PDT 2010


Op 20100504 om 12:10 schreef P J P:
> 
> Please see: http://pjp.dgplug.org/tools/syslinux-3.86-isohybrid.patch.8
> 

The 432 in isohdpfx.head at line
 unsigned char isohdpfx[][432] = \
looks odd.

With a header file it can look as clean as
 #include "isohybrid.h"
 unsigned char isohdpfx[][MBRSIZE] = \


Groeten
Geert Stappers

P.S.
I do like see my name somewhere in the isohybrid.c source code

diff --git a/utils/Makefile b/utils/Makefile
index 2696b92..864eccd 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -48,7 +48,7 @@ isohdpfx.c: $(ISOHDPFX) bin2Carray.pl isohdpfx.head isohdpfx.tail
 	for f in $(ISOHDPFX); do $(PERL) bin2Carray.pl < $$f >> $@ ; done
 	cat isohdpfx.tail >> $@
 
-isohybrid: isohybrid.c isohdpfx.c
+isohybrid: isohybrid.c isohybrid.h isohdpfx.c
 	$(CC) $(UMAKEDEPS) $(CFLGAS) -o $@ isohybrid.c isohdpfx.c
 
 gethostip: gethostip.o
diff --git a/utils/isohdpfx.head b/utils/isohdpfx.head
index b83d48e..c4b68ba 100644
--- a/utils/isohdpfx.head
+++ b/utils/isohdpfx.head
@@ -1,3 +1,5 @@
 
-unsigned char isohdpfx[][432] = \
+#include "isohybrid.h"
+
+unsigned char isohdpfx[][MBRSIZE] = \
 {
diff --git a/utils/isohybrid.c b/utils/isohybrid.c
index 05a16eb..146ba69 100644
--- a/utils/isohybrid.c
+++ b/utils/isohybrid.c
@@ -37,9 +37,7 @@
 #include <sys/stat.h>
 #include <inttypes.h>
 
-#define VERSION     "0.9"
-#define BUFSIZE     2048
-#define MBRSIZE      432
+#include "isohybrid.h"
 
 char *prog = NULL;
 extern int opterr, optind;
diff --git a/utils/isohybrid.h b/utils/isohybrid.h
new file mode 100644
index 0000000..0af4f34
--- /dev/null
+++ b/utils/isohybrid.h
@@ -0,0 +1,27 @@
+/*
+ * isohybrid.h: header file for isohybrid.c: Post process an ISO 9660
+ * image generated with mkisofs or genisoimage to allow - hybrid booting -
+ * as a CD-ROM or as a hard disk.
+ *
+ * Copyright (C) 2010 Geert Stappers <stappers at stappers.nl>
+ *
+ * isohybrid is a free software; you can redistribute it and/or modify it
+ * under the terms of GNU General Public License as published by Free Software
+ * Foundation; either version 2 of the license, or (at your option) any later
+ * version.
+ *
+ * isohybrid 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 isohybrid; if not, see: <http://www.gnu.org/licenses>.
+ *
+ */
+
+#define VERSION     "0.10"
+#define BUFSIZE     2048
+#define MBRSIZE      432
+
+/* End of header file */




More information about the Syslinux mailing list