cvs commit: src/usr.sbin/ndiscvt inf.c

Bill Paul wpaul at FreeBSD.org
Tue Jan 27 01:06:06 PST 2004


wpaul       2004/01/27 01:05:52 PST

  FreeBSD src repository

  Modified files:
    usr.sbin/ndiscvt     inf.c 
  Log:
  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.
  
  Revision  Changes    Path
  1.12      +22 -1     src/usr.sbin/ndiscvt/inf.c


More information about the cvs-src mailing list