Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Jul 2005 01:49:34 +0000
From:      Ben Kaduk <minimarmot@gmail.com>
To:        Jung-uk Kim <jkim@freebsd.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: cvs commit: src/usr.sbin/ndiscvt ndisgen.sh
Message-ID:  <47d0403c05072218491c78e2e9@mail.gmail.com>
In-Reply-To: <47d0403c05072218091264a990@mail.gmail.com>
References:  <200507220549.j6M5nfhO059858@repoman.freebsd.org> <47d0403c05072218091264a990@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 7/23/05, Ben Kaduk <minimarmot@gmail.com> wrote:
> On 7/22/05, Jung-uk Kim <jkim@freebsd.org> wrote:
> > jkim        2005-07-22 05:49:41 UTC
> >
> >   FreeBSD src repository
> >
> >   Modified files:
> >     usr.sbin/ndiscvt     ndisgen.sh
> >   Log:
> >   Fix ndisgen(8) for amd64
> >
> >   - file(1) does not recognize UTF-16 encoded .INF file:
> >
> >           netbc564.inf: MPEG ADTS, layer I, v1,  96 kBits, 32 kHz, Ster=
eo
> >
> >   Use egrep(1) to match two strings, i. e., `Signature' and `Class=3DNe=
t'.
> >
> >   - Fix linking failure.  Generate a temporary Makefile to emluate
> >   official kernel module build process.
> >
> >   - Some minor typo/style fixes.
> >
> >   Reviewed by:    obrien
> >
> >   Revision  Changes    Path
> >   1.2       +116 -72   src/usr.sbin/ndiscvt/ndisgen.sh
> > _______________________________________________
> > cvs-src@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/cvs-src
> > To unsubscribe, send any mail to "cvs-src-unsubscribe@freebsd.org"
> >
>=20
> I think this commit broke ndisgen for my broadcom bcm4324 chipset
> (dell truemobile 1400 mini-pci), since the only other commit since my
> last
> working version (6.0-Release Beta 1) claimed to be grammatical fixes.
> ndisgen fails to recognize my .inf file, which the old version recognized=
:
>=20
> ---------begin ndisgen output ----------
>=20
> A .INF file is most often provided as an ASCII file, however
>         files with multilanguage support are provided in Unicode format.
>         Please type in the path to your .INF file now.
>=20
>         > /usr/src/sys/modules/if_ndis/bcmwl5a.inf
>=20
>         I don't recognize this file format. It may not be a valid .INF fi=
le.
>=20
> --------- end ndisgen output --------
> the driver files that worked are here:
> https://netfiles.uiuc.edu/kaduk/www/bcmwl5a.inf
> https://netfiles.uiuc.edu/kaduk/www/bcmwl5.sys
>=20
> I tried removing the ^M's from the ends of lines, but this made no
> difference.  Any thoughts to explain this behaviour?
>=20
> Thanks
>=20
> Ben Kaduk
>=20

I know it's bad form to reply to myself, but this patch seems to allow
ndisgen to recognize my .inf file:

prolepsis# diff -u /usr/sbin/ndisgen /root/ndisgen.old
--- /usr/sbin/ndisgen   Sat Jul 23 01:47:31 2005
+++ /root/ndisgen.old   Sat Jul 23 01:39:50 2005
@@ -196,7 +196,7 @@
 echo -n "      > "
 read INFPATH
 if [ ${INFPATH} ] && [ -e ${INFPATH} ]; then
-       INFTYPE=3D`${EGREP} -i -c "Signature|^.S.i.g.n.a.t.u.r.e" ${INFPATH=
}`
+       INFTYPE=3D`${EGREP} -i -c "^Signature|^.S.i.g.n.a.t.u.r.e" ${INFPAT=
H}`
        if [ ${INFTYPE} -le 0 ]; then
                echo ""
                echo "  I don't recognize this file format. It may not
be a valid .INF file."
@@ -207,7 +207,7 @@
                return
        fi

-       INFTYPE=3D`${EGREP} -i -c "Class.*=3D.*Net" ${INFPATH}`
+       INFTYPE=3D`${EGREP} -i -c "^Class.*=3D.*Net" ${INFPATH}`
        if [ ${INFTYPE} -gt 0 ]; then
                echo ""
                echo "  This .INF file appears to be ASCII."



Apparently egrep isn't recognizing "^" as the beginning of a line.

Hope this helps,

Ben Kaduk



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47d0403c05072218491c78e2e9>