<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/syslinux.git/utils, branch multifs</title>
<subtitle>git.kernel.org: pub/scm/boot/syslinux/syslinux.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/syslinux.git/'/>
<entry>
<title>utils/isohybrid.c: Enable promised options -u, -m, -b</title>
<updated>2014-06-24T22:50:14+00:00</updated>
<author>
<name>Thomas Schmitt</name>
<email>scdbackup@gmx.net</email>
</author>
<published>2014-06-24T08:21:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/syslinux.git/commit/?id=2a55ff620f39fca2640693def34767e6d5425cfb'/>
<id>2a55ff620f39fca2640693def34767e6d5425cfb</id>
<content type='text'>
This change enables the single-letter options -u, -m, -b as promised
by the help text.

Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change enables the single-letter options -u, -m, -b as promised
by the help text.

Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>isohybrid: Function to write UTF-16LE strings</title>
<updated>2014-06-24T03:06:51+00:00</updated>
<author>
<name>H. Peter Anvin</name>
<email>hpa@zytor.com</email>
</author>
<published>2014-06-24T03:06:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/syslinux.git/commit/?id=f9dad5340bcefe34d860e991e8743be01a4d6c3c'/>
<id>f9dad5340bcefe34d860e991e8743be01a4d6c3c</id>
<content type='text'>
Rather than open-coding the content of UTF-16LE strings, just add a
simple function to convert ASCII (only) strings to UTF-16LE.

Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rather than open-coding the content of UTF-16LE strings, just add a
simple function to convert ASCII (only) strings to UTF-16LE.

Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>utils/isohybrid.c: Introduce option --mbr and make isohybrid.c compilable standalone</title>
<updated>2014-06-24T02:48:59+00:00</updated>
<author>
<name>Thomas Schmitt</name>
<email>scdbackup@gmx.net</email>
</author>
<published>2014-06-22T20:24:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/syslinux.git/commit/?id=9b32a80b97e1ad976d304c3940f50e8d66c158b8'/>
<id>9b32a80b97e1ad976d304c3940f50e8d66c158b8</id>
<content type='text'>
Although isohybrid.c is supposed to be a companion of the local SYSLINUX
installation, there may be situations where the file isolinux.bin and the
matching MBR template do not stem directly from such an installation.

This change adds an option --mbr, which allows to load an MBR template
file. This may be an isohdp[fp]x*.bin MBR template from the local SYSLINUX
installation, or the first 512 bytes of the isohybrid-capable ISO image
from which isolinux.bin and the other ISOLINUX files are taken.

If macro ISOHYBRID_C_STANDALONE is defined, then the hardcoded MBR templates
are not accessible and isohdpfx.o is not needed at compile time. In this
case, option --mbr becomes mandatory.
I used this for testing my changes with Fedora-Live-Desktop-x86_64-20-1.iso.

isohybrid.c is then compilable without further components of ISOLINUX by:

  cc -DISOHYBRID_C_STANDALONE -Wall -o isohybrid isohybrid.c -luuid

Test run:

  cp Fedora-Live-Desktop-x86_64-20-1.iso \
     Fedora-Live-Desktop-x86_64-20-1-rehybrid.iso

  valgrind ./isohybrid --uefi --mac \
           --mbr Fedora-Live-Desktop-x86_64-20-1.mbr \
           Fedora-Live-Desktop-x86_64-20-1-rehybrid.iso

yields:

  ==13828== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 1)
  ...
  ==13828== LEAK SUMMARY:
  ==13828==    definitely lost: 2,048 bytes in 1 blocks.

(Not that valgrind would have detected the memcpy() abuse of patch 001.
 But at least i seem to have not introduced more obvious sins.)

Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Although isohybrid.c is supposed to be a companion of the local SYSLINUX
installation, there may be situations where the file isolinux.bin and the
matching MBR template do not stem directly from such an installation.

This change adds an option --mbr, which allows to load an MBR template
file. This may be an isohdp[fp]x*.bin MBR template from the local SYSLINUX
installation, or the first 512 bytes of the isohybrid-capable ISO image
from which isolinux.bin and the other ISOLINUX files are taken.

If macro ISOHYBRID_C_STANDALONE is defined, then the hardcoded MBR templates
are not accessible and isohdpfx.o is not needed at compile time. In this
case, option --mbr becomes mandatory.
I used this for testing my changes with Fedora-Live-Desktop-x86_64-20-1.iso.

isohybrid.c is then compilable without further components of ISOLINUX by:

  cc -DISOHYBRID_C_STANDALONE -Wall -o isohybrid isohybrid.c -luuid

Test run:

  cp Fedora-Live-Desktop-x86_64-20-1.iso \
     Fedora-Live-Desktop-x86_64-20-1-rehybrid.iso

  valgrind ./isohybrid --uefi --mac \
           --mbr Fedora-Live-Desktop-x86_64-20-1.mbr \
           Fedora-Live-Desktop-x86_64-20-1-rehybrid.iso

yields:

  ==13828== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 1)
  ...
  ==13828== LEAK SUMMARY:
  ==13828==    definitely lost: 2,048 bytes in 1 blocks.

(Not that valgrind would have detected the memcpy() abuse of patch 001.
 But at least i seem to have not introduced more obvious sins.)

Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>utils/isohybrid.c: Change all fseek(3) to fseeko(3)</title>
<updated>2014-06-24T02:48:57+00:00</updated>
<author>
<name>Thomas Schmitt</name>
<email>scdbackup@gmx.net</email>
</author>
<published>2014-06-22T20:24:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/syslinux.git/commit/?id=8b7a805803bd5247a15dfcd60df8a22586b07fd0'/>
<id>8b7a805803bd5247a15dfcd60df8a22586b07fd0</id>
<content type='text'>
It seems unwise to offer future programmers fseek(3) calls for copy+paste.
They are simply insufficient for large image files.

This change switches all calls of fseek(3) to fseeko(3) and takes care
that the offset value if of type off_t.

Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It seems unwise to offer future programmers fseek(3) calls for copy+paste.
They are simply insufficient for large image files.

This change switches all calls of fseek(3) to fseeko(3) and takes care
that the offset value if of type off_t.

Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>utils/isohybrid.c: Write GPT backup to the very end of the image</title>
<updated>2014-06-24T02:48:57+00:00</updated>
<author>
<name>Thomas Schmitt</name>
<email>scdbackup@gmx.net</email>
</author>
<published>2014-06-22T20:24:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/syslinux.git/commit/?id=46abb1f5a685191e0ca11dba5b8ba5e3811b6dae'/>
<id>46abb1f5a685191e0ca11dba5b8ba5e3811b6dae</id>
<content type='text'>
The GPT backup header block should start 512 bytes before the end of the
image file (resp. end of the disk device). This block and the backup GPT
array were wrongly written 512 bytes too early.

This change brings the backup GPT at its correct position.

Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The GPT backup header block should start 512 bytes before the end of the
image file (resp. end of the disk device). This block and the backup GPT
array were wrongly written 512 bytes too early.

This change brings the backup GPT at its correct position.

Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>utils/isohybrid.c: Correct end block address of first GPT partition</title>
<updated>2014-06-24T02:48:56+00:00</updated>
<author>
<name>Thomas Schmitt</name>
<email>scdbackup@gmx.net</email>
</author>
<published>2014-06-22T20:24:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/syslinux.git/commit/?id=a9343ca8943ae2089d46f74ce521946fb6f9f56d'/>
<id>a9343ca8943ae2089d46f74ce521946fb6f9f56d</id>
<content type='text'>
The GPT partition 1 covers the whole ISO filesystem size. GPT specs
demand that the partition end block number shall be the last valid
block in the partition. isohybrid.c rather wrote the number of the
first block after the partition end.

This change reduces the number by 1.

Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The GPT partition 1 covers the whole ISO filesystem size. GPT specs
demand that the partition end block number shall be the last valid
block in the partition. isohybrid.c rather wrote the number of the
first block after the partition end.

This change reduces the number by 1.

Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>utils/isohybrid.c: Correct blocking factor in APM partition block counts</title>
<updated>2014-06-24T02:48:55+00:00</updated>
<author>
<name>Thomas Schmitt</name>
<email>scdbackup@gmx.net</email>
</author>
<published>2014-06-22T20:24:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/syslinux.git/commit/?id=ee9c8a36dc63c54794f5836d5c908d7e4c84fa04'/>
<id>ee9c8a36dc63c54794f5836d5c908d7e4c84fa04</id>
<content type='text'>
The block counts in the APM partitions assumed 512 bytes per block,
whereas the start block numbers assume 2048 as announced in the APM header.

This change divides the affected block counts by 4 to correct the assumption.

Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The block counts in the APM partitions assumed 512 bytes per block,
whereas the start block numbers assume 2048 as announced in the APM header.

This change divides the affected block counts by 4 to correct the assumption.

Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>utils/isohybrid.c: Encode GPT partition names as UTF-16LE</title>
<updated>2014-06-24T02:48:54+00:00</updated>
<author>
<name>Thomas Schmitt</name>
<email>scdbackup@gmx.net</email>
</author>
<published>2014-06-22T20:24:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/syslinux.git/commit/?id=8059839edcfe819ca9cd135c67a905eb53943204'/>
<id>8059839edcfe819ca9cd135c67a905eb53943204</id>
<content type='text'>
The worst sin of isohybrid.c was to compose GPT partition names by
8-bit characters and to memcpy() them as if they were 16 bit wide.
GPT names are encoded as UTF-16LE. It is trivial to create this encoding
from 7-bit ASCII.

This change introduces two byte arrays with the desired UTF-16LE names
which replace the string constants "ISOHybrid ISO" and "ISOHybrid".

Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The worst sin of isohybrid.c was to compose GPT partition names by
8-bit characters and to memcpy() them as if they were 16 bit wide.
GPT names are encoded as UTF-16LE. It is trivial to create this encoding
from 7-bit ASCII.

This change introduces two byte arrays with the desired UTF-16LE names
which replace the string constants "ISOHybrid ISO" and "ISOHybrid".

Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>isohybrid: define _FILE_OFFSET_BITS in the file itself</title>
<updated>2014-06-20T03:52:47+00:00</updated>
<author>
<name>H. Peter Anvin</name>
<email>hpa@zytor.com</email>
</author>
<published>2014-06-20T03:52:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/syslinux.git/commit/?id=ede6eb35f3cd70a90cbcd10f72276afd449642a9'/>
<id>ede6eb35f3cd70a90cbcd10f72276afd449642a9</id>
<content type='text'>
On general principles, define _FILE_OFFSET_BITS in the file itself
(even though it is also in the Makefile.)

Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On general principles, define _FILE_OFFSET_BITS in the file itself
(even though it is also in the Makefile.)

Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>isohybrid: fix overflow on 32 bit system</title>
<updated>2014-06-20T03:50:57+00:00</updated>
<author>
<name>Kai Kang</name>
<email>kai.kang@windriver.com</email>
</author>
<published>2014-06-20T03:32:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/syslinux.git/commit/?id=bc360f8dbdf27bff07bb5db8d0ea9a7b10d8e3d1'/>
<id>bc360f8dbdf27bff07bb5db8d0ea9a7b10d8e3d1</id>
<content type='text'>
When call isohybrid with option '-u', it overflows on a 32 bits host. It
seeks to 512 bytes before the end of the image to install gpt header. If
the size of image is larger than LONG_MAX, it overflows fseek() and
cause error:

isohybrid: image-x86-64-20140505110100.iso: seek error - 8: Invalid argument

Replace fseek with fseeko to fix this issue.

Signed-off-by: Kai Kang &lt;kai.kang@windriver.com&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When call isohybrid with option '-u', it overflows on a 32 bits host. It
seeks to 512 bytes before the end of the image to install gpt header. If
the size of image is larger than LONG_MAX, it overflows fseek() and
cause error:

isohybrid: image-x86-64-20140505110100.iso: seek error - 8: Invalid argument

Replace fseek with fseeko to fix this issue.

Signed-off-by: Kai Kang &lt;kai.kang@windriver.com&gt;
Signed-off-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
