[syslinux] extlinux and install script

Hiro Yoshioka hyoshiok at miraclelinux.com
Wed Jul 2 21:01:33 PDT 2008


From: "H. Peter Anvin" <hpa at zytor.com>
Subject: Re: [syslinux] extlinux and install script
Date: Wed, 02 Jul 2008 19:57:02 -0700
Message-ID: <486C3FFE.2090707 at zytor.com>

> Hiro Yoshioka wrote:
> > I think it should check if it is ext2 or ext3. So I wrote the
> > following patch and it fix the above issue. (I'm using ubuntu, the
> > syslinux is 3.36-4ubuntu)
> > --- extlinux.c.orig	2007-02-10 20:47:08.000000000 +0000
> > +++ extlinux.c	2008-07-02 15:20:20.000000000 +0000
> > @@ -708,8 +708,13 @@
> >      /* Didn't find it in /proc/mounts, try /etc/mtab */
> >      if ( (mtab = setmntent("/etc/mtab", "r")) ) {
> >        while ( (mnt = getmntent(mtab)) ) {
> > -	devname = mnt->mnt_fsname;
> > -	break;
> > +        if ( (!strcmp(mnt->mnt_type, "ext2") ||
> > +              !strcmp(mnt->mnt_type, "ext3")) &&
> > +             !stat(mnt->mnt_fsname, &dst) &&
> > +             dst.st_rdev == st.st_dev ) {
> > + 	  devname = mnt->mnt_fsname;
> > +	  break;
> > +	}
> >        }
> >      }
> >    }
> > I have read the latest source code and the above issue is still
> > remained.
> > 
> 
> So it does (although the *real* problem is the lack of the stat and device number comparison.)  I just applied a (slightly different) patch to this and pushed it out as 3.71-pre3; could you try it out?
> 
> 	-hpa

Hi, I've just read your patch. It looks good. I'll try it.

Thanks for your quick help.

Regards,
  Hiro




More information about the Syslinux mailing list