[syslinux] extlinux and install script
H. Peter Anvin
hpa at zytor.com
Wed Jul 2 19:57:02 PDT 2008
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
More information about the Syslinux
mailing list