Set a pointer to syslinux_version()->version_string in mbinfo. Signed-off-by: Sebastian Herbszt <herbszt at gmx.de> diff --git a/com32/mboot/mboot.c b/com32/mboot/mboot.c index 8425e06..76ef7a0 100644 --- a/com32/mboot/mboot.c +++ b/com32/mboot/mboot.c @@ -222,6 +222,13 @@ int main(int argc, char *argv[]) /* Add auxilliary information */ mboot_make_memmap(); mboot_apm(); + + /* Set boot loader name */ + const struct syslinux_version *sv; + sv = syslinux_version(); + mbinfo.boot_loader_name = (uint32_t)sv->version_string; + mbinfo.flags |= MB_INFO_BOOT_LOADER_NAME; + if (opt.solaris) mboot_solaris_dhcp_hack(); diff --git a/com32/mboot/mboot.h b/com32/mboot/mboot.h index 993b31a..4238333 100644 --- a/com32/mboot/mboot.h +++ b/com32/mboot/mboot.h @@ -50,6 +50,7 @@ #include <syslinux/loadfile.h> #include <syslinux/movebits.h> #include <syslinux/bootpm.h> +#include <syslinux/config.h> #include "mb_header.h" #include "mb_info.h"
On 03/21/2010 09:27 AM, Sebastian Herbszt wrote:> Set a pointer to syslinux_version()->version_string in mbinfo. > > Signed-off-by: Sebastian Herbszt <herbszt at gmx.de> > > diff --git a/com32/mboot/mboot.c b/com32/mboot/mboot.c > index 8425e06..76ef7a0 100644 > --- a/com32/mboot/mboot.c > +++ b/com32/mboot/mboot.c > @@ -222,6 +222,13 @@ int main(int argc, char *argv[]) > /* Add auxilliary information */ > mboot_make_memmap(); > mboot_apm(); > + > + /* Set boot loader name */ > + const struct syslinux_version *sv; > + sv = syslinux_version(); > + mbinfo.boot_loader_name = (uint32_t)sv->version_string; > + mbinfo.flags |= MB_INFO_BOOT_LOADER_NAME; > + > if (opt.solaris) > mboot_solaris_dhcp_hack(); >Sorry, this doesn't work. You have to map the string, otherwise it is liable to be overwritten during shuffling. -hpa
On 03/21/2010 09:27 AM, Sebastian Herbszt wrote:> Set a pointer to syslinux_version()->version_string in mbinfo. > > Signed-off-by: Sebastian Herbszt <herbszt at gmx.de>I pushed a fixed version of this into the git tree; if you could test it out I would be grateful. -hpa
H. Peter Anvin> On 03/21/2010 09:27 AM, Sebastian Herbszt wrote: >> Set a pointer to syslinux_version()->version_string in mbinfo. >> >> Signed-off-by: Sebastian Herbszt <herbszt at gmx.de> > > I pushed a fixed version of this into the git tree; if you could test it > out I would be grateful. > > -hpaWorks fine. Thanks. Sebastian
On 03/30/2010 01:10 PM, Sebastian Herbszt wrote:> H. Peter Anvin >> On 03/21/2010 09:27 AM, Sebastian Herbszt wrote: >>> Set a pointer to syslinux_version()->version_string in mbinfo. >>> >>> Signed-off-by: Sebastian Herbszt <herbszt at gmx.de> >> >> I pushed a fixed version of this into the git tree; if you could test it >> out I would be grateful. >> >> -hpa > > Works fine. Thanks. > > SebastianHm... this string includes a leading CR LF which is really rather a bug. Does anyone object if I change the API call to not have the leading CR LF? -hpa
H. Peter Anvin wrote:> On 03/30/2010 01:10 PM, Sebastian Herbszt wrote: >> H. Peter Anvin >>> On 03/21/2010 09:27 AM, Sebastian Herbszt wrote: >>>> Set a pointer to syslinux_version()->version_string in mbinfo. >>>> >>>> Signed-off-by: Sebastian Herbszt <herbszt at gmx.de> >>> >>> I pushed a fixed version of this into the git tree; if you could test it >>> out I would be grateful. >>> >>> -hpa >> >> Works fine. Thanks. >> >> Sebastian > > Hm... this string includes a leading CR LF which is really rather a bug. > > Does anyone object if I change the API call to not have the leading CR LF? > > -hpaI already have some local patches to remove the leading CR LF. Sebastian