freebsd-dev/usr.sbin/ndiscvt
wpaul 9ad3d8fcae Some Windows .INF files are deliberately sabotaged to prevent them from
loading on a particular version of Windows. For example, a .INF file
for a Windows 2000 driver may have an empty [foo.NT.5.1] section which
will be ingored on Win2K (whose .INF parser won't look for sections
decorated with .NT.5.1) in favor of a [foo] section. Likewise, a
WinXP file will have an empty [foo] section which will be ignored in
favor of [foo.NT.5.1].

The problem is, we can handle both Win2K and WinXP drivers, and we
don't want to exclude either one.

As a workaround, we try to pretend we are WinXP by default and search
for sections decorated with .NT.5.1, but if we don't turn up any records,
we assume that maybe we're being fooled by a sabotaged .INF file and
make one more pass looking for undecorated sections instead.

This allows us to parse the .INF files for both the Win2K and the WinXP
Centrino wireless drivers.

I'd give anything for 5 minutes alone in a room with whoever wrote
Microsoft's .INF file parser. Just 5 minutes. That's all.
2004-01-27 09:05:52 +00:00
..
inf-parse.y Clean up ndiscvt a bit (leaving out the -i flag didn't work) and add 2004-01-02 04:31:06 +00:00
inf-token.l - Handle doubled double quotes: 2004-01-11 21:10:35 +00:00
inf.c Some Windows .INF files are deliberately sabotaged to prevent them from 2004-01-27 09:05:52 +00:00
inf.h
Makefile Grrrr. Remove -g flag that snuck in. 2003-12-18 03:52:40 +00:00
ndiscvt.8 Clean up ndiscvt a bit (leaving out the -i flag didn't work) and add 2004-01-02 04:31:06 +00:00
ndiscvt.c Fix usage() (-d is really -n). 2004-01-02 23:35:57 +00:00