<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/syslinux.git/com32/lib/sys/module, branch master</title>
<subtitle>git.kernel.org: pub/scm/boot/syslinux/syslinux.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/syslinux.git/'/>
<entry>
<title>add missing '\n' to dprintf</title>
<updated>2015-05-03T14:48:39+00:00</updated>
<author>
<name>Jonathan Boeing</name>
<email>jonathan.n.boeing@gmail.com</email>
</author>
<published>2015-02-10T03:01:03+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/syslinux.git/commit/?id=a66d04f09e00643aeb1ea9730b6235e352dda99f'/>
<id>a66d04f09e00643aeb1ea9730b6235e352dda99f</id>
<content type='text'>
Signed-off-by: Jonathan Boeing &lt;jonathan.n.boeing@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Jonathan Boeing &lt;jonathan.n.boeing@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>module: convert to dprintf() to aid debugging</title>
<updated>2013-07-26T15:35:59+00:00</updated>
<author>
<name>Matt Fleming</name>
<email>matt.fleming@intel.com</email>
</author>
<published>2013-07-26T15:35:59+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/syslinux.git/commit/?id=0006a5e1bc8742fbbc6fbe52d1d12bab05eef311'/>
<id>0006a5e1bc8742fbbc6fbe52d1d12bab05eef311</id>
<content type='text'>
dprintf() is much more useful than DBG_PRINT() when trying to figure out
where a module is failing to load because we can enable the debug
statements at runtime.

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
dprintf() is much more useful than DBG_PRINT() when trying to figure out
where a module is failing to load because we can enable the debug
statements at runtime.

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'syslinux-5.11-pre2' into firmware</title>
<updated>2013-06-17T10:57:29+00:00</updated>
<author>
<name>Matt Fleming</name>
<email>matt.fleming@intel.com</email>
</author>
<published>2013-06-17T10:57:29+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/syslinux.git/commit/?id=a0bb1928c8652aada30243089c53754ddd9b99df'/>
<id>a0bb1928c8652aada30243089c53754ddd9b99df</id>
<content type='text'>
syslinux-5.11-pre2

Conflicts:
	core/elflink/load_env32.c
	version
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
syslinux-5.11-pre2

Conflicts:
	core/elflink/load_env32.c
	version
</pre>
</div>
</content>
</entry>
<entry>
<title>PATH: use a linked list internally</title>
<updated>2013-06-13T10:51:03+00:00</updated>
<author>
<name>Matt Fleming</name>
<email>matt.fleming@intel.com</email>
</author>
<published>2013-06-13T10:46:40+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/syslinux.git/commit/?id=19455794d144c2c38f483890e0d384bc43b5fd63'/>
<id>19455794d144c2c38f483890e0d384bc43b5fd63</id>
<content type='text'>
In retrospect, choosing the colon character as the entry separator for
the PATH directive was not a smart move, as that character is also used
in TFTP-style paths. This conflict manifests as PXELINUX being unable to
find and load files.

An example dnsmasq log looks like,

dnsmasq-tftp: sent /arch/boot/syslinux/lpxelinux.0 to 192.168.0.90
dnsmasq-tftp: file /arch/ldlinux.c32 not found
dnsmasq-tftp: file /arch//ldlinux.c32 not found
dnsmasq-tftp: file /arch//boot/isolinux/ldlinux.c32 not found
dnsmasq-tftp: file /arch//isolinux/ldlinux.c32 not found
dnsmasq-tftp: file /arch//boot/syslinuxldlinux.c32 not found
dnsmasq-tftp: sent /arch//boot/syslinux/ldlinux.c32 to 192.168.0.90
dnsmasq-tftp: error 0 No error, file close received from 192.168.0.90
dnsmasq-tftp: failed sending /arch//boot/syslinux/ldlinux.c32 to 192.168.0.90
dnsmasq-tftp: sent /arch/boot/syslinux/archiso.cfg to 192.168.0.90
dnsmasq-tftp: sent /arch/boot/syslinux/whichsys.c32 to 192.168.0.90
dnsmasq-tftp: file /arch/libcom32.c32 not found
dnsmasq-tftp: file /arch//libcom32.c32 not found
dnsmasq-tftp: file /arch/libcom32.c32 not found
dnsmasq-tftp: file /arch//arch//boot/syslinux/libcom32.c32 not found

The last line of the log is the indication that there's a problem.
Internally, Syslinux adds the location of ldlinux.c32 to PATH by
querying the current working directory once ldlinux.c32 is successfully
loaded. Under PXELINUX that means the initial PATH string will be,

   "::/arch/boot/syslinux/"

The PATH parsing code doesn't know how to correctly parse the "::"
string and hence, the file is searched for relative to the 210 dhcp
option directory - /arch/.

Implement PATH with a linked list which *greatly* simplifies the path
code, and means we no longer have to parse strings backwards and
forwards.

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In retrospect, choosing the colon character as the entry separator for
the PATH directive was not a smart move, as that character is also used
in TFTP-style paths. This conflict manifests as PXELINUX being unable to
find and load files.

An example dnsmasq log looks like,

dnsmasq-tftp: sent /arch/boot/syslinux/lpxelinux.0 to 192.168.0.90
dnsmasq-tftp: file /arch/ldlinux.c32 not found
dnsmasq-tftp: file /arch//ldlinux.c32 not found
dnsmasq-tftp: file /arch//boot/isolinux/ldlinux.c32 not found
dnsmasq-tftp: file /arch//isolinux/ldlinux.c32 not found
dnsmasq-tftp: file /arch//boot/syslinuxldlinux.c32 not found
dnsmasq-tftp: sent /arch//boot/syslinux/ldlinux.c32 to 192.168.0.90
dnsmasq-tftp: error 0 No error, file close received from 192.168.0.90
dnsmasq-tftp: failed sending /arch//boot/syslinux/ldlinux.c32 to 192.168.0.90
dnsmasq-tftp: sent /arch/boot/syslinux/archiso.cfg to 192.168.0.90
dnsmasq-tftp: sent /arch/boot/syslinux/whichsys.c32 to 192.168.0.90
dnsmasq-tftp: file /arch/libcom32.c32 not found
dnsmasq-tftp: file /arch//libcom32.c32 not found
dnsmasq-tftp: file /arch/libcom32.c32 not found
dnsmasq-tftp: file /arch//arch//boot/syslinux/libcom32.c32 not found

The last line of the log is the indication that there's a problem.
Internally, Syslinux adds the location of ldlinux.c32 to PATH by
querying the current working directory once ldlinux.c32 is successfully
loaded. Under PXELINUX that means the initial PATH string will be,

   "::/arch/boot/syslinux/"

The PATH parsing code doesn't know how to correctly parse the "::"
string and hence, the file is searched for relative to the 210 dhcp
option directory - /arch/.

Implement PATH with a linked list which *greatly* simplifies the path
code, and means we no longer have to parse strings backwards and
forwards.

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'syslinux-5.01' into firmware</title>
<updated>2013-01-29T15:11:28+00:00</updated>
<author>
<name>Matt Fleming</name>
<email>matt.fleming@intel.com</email>
</author>
<published>2013-01-29T14:01:07+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/syslinux.git/commit/?id=bf20364b582c383b4927f898de213b1cc0981a80'/>
<id>bf20364b582c383b4927f898de213b1cc0981a80</id>
<content type='text'>
Conflicts:
	Makefile
	NEWS
	com32/cmenu/Makefile
	com32/elflink/ldlinux/Makefile
	com32/gfxboot/Makefile
	com32/gpllib/Makefile
	com32/include/sys/module.h
	com32/lib/Makefile
	com32/lib/sys/module/elf_module.c
	com32/menu/Makefile
	com32/rosh/Makefile
	com32/samples/Makefile
	core/init.c
	mk/elf.mk

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	Makefile
	NEWS
	com32/cmenu/Makefile
	com32/elflink/ldlinux/Makefile
	com32/gfxboot/Makefile
	com32/gpllib/Makefile
	com32/include/sys/module.h
	com32/lib/Makefile
	com32/lib/sys/module/elf_module.c
	com32/menu/Makefile
	com32/rosh/Makefile
	com32/samples/Makefile
	core/init.c
	mk/elf.mk

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>module: Replace cur_module with module_current()</title>
<updated>2013-01-23T15:05:29+00:00</updated>
<author>
<name>Matt Fleming</name>
<email>matt.fleming@intel.com</email>
</author>
<published>2013-01-23T14:46:08+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/syslinux.git/commit/?id=7c42c59ebd9d33efe3a5f12542580a8c1379447d'/>
<id>7c42c59ebd9d33efe3a5f12542580a8c1379447d</id>
<content type='text'>
It's easy for cur_module and prev_module to get out of sync with
reality (the actual module that is running), so add module_current()
which returns the module at the head of the module_list, i.e. the
module that was loaded most recently. Better still, by using the list
we don't have to do any kind of stacking of module pointers ourselves.

This fixes a bug where cur_module contained a stale pointer (the
module had actually been unloaded) but the pointer value had since
been reallocated for a new module in spawn_load(), meaning that the
following check,

    if (!strcmp(cur_module-&gt;name, module-&gt;name))

was always going to be true, even though *no* module was actually
loaded at this point as we were reloading ldlinux.c32 from
start_ldlinux(). This could have been fixed with a NULL-assignment
after module_unload(), but using the modules_head list to detect the
current module is much cleaner.

Note that the core module loaded in load_env32() is always on the
list, therefore module_current() will always return a valid pointer.

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's easy for cur_module and prev_module to get out of sync with
reality (the actual module that is running), so add module_current()
which returns the module at the head of the module_list, i.e. the
module that was loaded most recently. Better still, by using the list
we don't have to do any kind of stacking of module pointers ourselves.

This fixes a bug where cur_module contained a stale pointer (the
module had actually been unloaded) but the pointer value had since
been reallocated for a new module in spawn_load(), meaning that the
following check,

    if (!strcmp(cur_module-&gt;name, module-&gt;name))

was always going to be true, even though *no* module was actually
loaded at this point as we were reloading ldlinux.c32 from
start_ldlinux(). This could have been fixed with a NULL-assignment
after module_unload(), but using the modules_head list to detect the
current module is much cleaner.

Note that the core module loaded in load_env32() is always on the
list, therefore module_current() will always return a valid pointer.

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>module: Check for NULL ctors and dtors</title>
<updated>2013-01-23T15:05:28+00:00</updated>
<author>
<name>Matt Fleming</name>
<email>matt.fleming@intel.com</email>
</author>
<published>2013-01-23T13:40:24+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/syslinux.git/commit/?id=4027dbf9df88e3feaa3744c6622e4ae7cf8ecd6e'/>
<id>4027dbf9df88e3feaa3744c6622e4ae7cf8ecd6e</id>
<content type='text'>
Don't dereference a NULL ctor/dtor as that can cause us to crash.

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't dereference a NULL ctor/dtor as that can cause us to crash.

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>module: Check the return value of malloc()</title>
<updated>2013-01-23T15:05:28+00:00</updated>
<author>
<name>Matt Fleming</name>
<email>matt.fleming@intel.com</email>
</author>
<published>2013-01-17T14:50:29+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/syslinux.git/commit/?id=cd079794e8908b9402840cde322bbd32ae08523c'/>
<id>cd079794e8908b9402840cde322bbd32ae08523c</id>
<content type='text'>
Instead of blindly writing through a possible-NULL pointer, check the
return value of malloc().

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of blindly writing through a possible-NULL pointer, check the
return value of malloc().

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>elf: remove long-since-obsolete shallow module machinery</title>
<updated>2013-01-18T00:52:20+00:00</updated>
<author>
<name>H. Peter Anvin</name>
<email>hpa@linux.intel.com</email>
</author>
<published>2013-01-18T00:52:20+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/syslinux.git/commit/?id=14fe8af6c11e71619de9be1afd4556ebbc770db3'/>
<id>14fe8af6c11e71619de9be1afd4556ebbc770db3</id>
<content type='text'>
Meant to handle symbols exported from the core, but we just
pregenerate the dynamic section instead.

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>
Meant to handle symbols exported from the core, but we just
pregenerate the dynamic section instead.

Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>module: Check return value of malloc()</title>
<updated>2013-01-16T12:22:42+00:00</updated>
<author>
<name>Matt Fleming</name>
<email>matt.fleming@intel.com</email>
</author>
<published>2013-01-15T14:57:45+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/syslinux.git/commit/?id=8deea7fccbf76bca2ec62057afc774540da1603e'/>
<id>8deea7fccbf76bca2ec62057afc774540da1603e</id>
<content type='text'>
And return NULL after printing an appropriate error message if the
call failed.

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
And return NULL after printing an appropriate error message if the
call failed.

Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
