From owner-cvs-src@FreeBSD.ORG Tue Jan 27 01:06:06 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5ED3616A4CE; Tue, 27 Jan 2004 01:06:06 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EFC6043D5F; Tue, 27 Jan 2004 01:05:52 -0800 (PST) (envelope-from wpaul@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i0R95q0B023003; Tue, 27 Jan 2004 01:05:52 -0800 (PST) (envelope-from wpaul@repoman.freebsd.org) Received: (from wpaul@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i0R95qxx023002; Tue, 27 Jan 2004 01:05:52 -0800 (PST) (envelope-from wpaul) Message-Id: <200401270905.i0R95qxx023002@repoman.freebsd.org> From: Bill Paul Date: Tue, 27 Jan 2004 01:05:52 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/usr.sbin/ndiscvt inf.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2004 09:06:06 -0000 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