Re: cvs commit: src/usr.sbin/ndiscvt ndisgen.sh

From: Ben Kaduk <minimarmot_at_gmail.com>
Date: Sat, 23 Jul 2005 01:49:34 +0000
On 7/23/05, Ben Kaduk <minimarmot_at_gmail.com> wrote:
> On 7/22/05, Jung-uk Kim <jkim_at_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, Stereo
> >
> >   Use egrep(1) to match two strings, i. e., `Signature' and `Class=Net'.
> >
> >   - 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_at_freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/cvs-src
> > To unsubscribe, send any mail to "cvs-src-unsubscribe_at_freebsd.org"
> >
> 
> 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:
> 
> ---------begin ndisgen output ----------
> 
> 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.
> 
>         > /usr/src/sys/modules/if_ndis/bcmwl5a.inf
> 
>         I don't recognize this file format. It may not be a valid .INF file.
> 
> --------- 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
> 
> I tried removing the ^M's from the ends of lines, but this made no
> difference.  Any thoughts to explain this behaviour?
> 
> Thanks
> 
> Ben Kaduk
> 

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
_at__at_ -196,7 +196,7 _at__at_
 echo -n "      > "
 read INFPATH
 if [ ${INFPATH} ] && [ -e ${INFPATH} ]; then
-       INFTYPE=`${EGREP} -i -c "Signature|^.S.i.g.n.a.t.u.r.e" ${INFPATH}`
+       INFTYPE=`${EGREP} -i -c "^Signature|^.S.i.g.n.a.t.u.r.e" ${INFPATH}`
        if [ ${INFTYPE} -le 0 ]; then
                echo ""
                echo "  I don't recognize this file format. It may not
be a valid .INF file."
_at__at_ -207,7 +207,7 _at__at_
                return
        fi

-       INFTYPE=`${EGREP} -i -c "Class.*=.*Net" ${INFPATH}`
+       INFTYPE=`${EGREP} -i -c "^Class.*=.*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
Received on Fri Jul 22 2005 - 23:49:39 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:39 UTC