From owner-freebsd-bugs@FreeBSD.ORG Sun Aug 14 15:40:29 2005 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 33BB616A41F for ; Sun, 14 Aug 2005 15:40:29 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5AD0043D79 for ; Sun, 14 Aug 2005 15:40:19 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j7EFeI0r061640 for ; Sun, 14 Aug 2005 15:40:18 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j7EFeITQ061636; Sun, 14 Aug 2005 15:40:18 GMT (envelope-from gnats) Resent-Date: Sun, 14 Aug 2005 15:40:18 GMT Resent-Message-Id: <200508141540.j7EFeITQ061636@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Fredrik Lindberg Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CE4A616A41F for ; Sun, 14 Aug 2005 15:39:21 +0000 (GMT) (envelope-from fli@biocandy.shapeshifter.se) Received: from mail.hamnpolare.net (manticore.shapeshifter.se [212.37.5.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5C62143D46 for ; Sun, 14 Aug 2005 15:39:20 +0000 (GMT) (envelope-from fli@biocandy.shapeshifter.se) Received: from localhost (localhost [127.0.0.1]) by mail.hamnpolare.net (Postfix) with ESMTP id 41D5E1A793 for ; Sun, 14 Aug 2005 17:39:18 +0200 (CEST) Received: from mail.hamnpolare.net ([127.0.0.1]) by localhost (manticore.shapeshifter.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 33497-14 for ; Sun, 14 Aug 2005 17:39:17 +0200 (CEST) Received: from biocandy.shapeshifter.se (h4n2fls31o270.telia.com [217.208.199.4]) by mail.hamnpolare.net (Postfix) with ESMTP id 007F71A717 for ; Sun, 14 Aug 2005 17:39:16 +0200 (CEST) Received: by biocandy.shapeshifter.se (Postfix, from userid 1001) id BB8C8415E; Sun, 14 Aug 2005 17:39:15 +0200 (CEST) Message-Id: <20050814153915.BB8C8415E@biocandy.shapeshifter.se> Date: Sun, 14 Aug 2005 17:39:15 +0200 (CEST) From: Fredrik Lindberg To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: bin/84911: [patch] ndisgen can't cope with .sys-files that begins with a number X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Aug 2005 15:40:29 -0000 >Number: 84911 >Category: bin >Synopsis: [patch] ndisgen can't cope with .sys-files that begins with a number >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Aug 14 15:40:18 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Fredrik Lindberg >Release: FreeBSD 7.0-CURRENT i386 >Organization: >Environment: System: FreeBSD biocandy.shapeshifter.se 7.0-CURRENT FreeBSD 7.0-CURRENT #1: Tue Aug 2 19:27:22 CEST 2005 root@biocandy.shapeshifter.se:/usr/obj/usr/src/sys/BIOCANDY-CURRENT i386 >Description: ndisgen uses the basename of the windows drivers .sys-file as an internal identifier. This identifier is used as variable names windrv_stub.c which is fine in most cases, however it will fail to compile if the name of the .sys-file begins with a number. >How-To-Repeat: Pass a .sys-file which begins with a number to ndisgen. >Fix: The following patch adds a ndis_ prefix to the affected variables Index: ndiscvt/ndiscvt.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/ndiscvt/ndiscvt.c,v retrieving revision 1.11 diff -r1.11 ndiscvt.c 210c210 < "objcopy --redefine-sym _binary_%s_start=%s_drv_data_start " --- > "objcopy --redefine-sym _binary_%s_start=ndis_%s_drv_data_start " 212c212 < "--redefine-sym _binary_%s_end=%s_drv_data_end %s.o %s.o\n", --- > "--redefine-sym _binary_%s_end=ndis_%s_drv_data_end %s.o %s.o\n", 387c387 < "\nextern unsigned char %s_drv_data_start[];\n", --- > "\nextern unsigned char ndis_%s_drv_data_start[];\n", 390c390 < "%s_drv_data_start;\n\n", sysfile); --- > "ndis_%s_drv_data_start;\n\n", sysfile); Index: ndiscvt/ndisgen.sh =================================================================== RCS file: /home/ncvs/src/usr.sbin/ndiscvt/ndisgen.sh,v retrieving revision 1.5 diff -r1.5 ndisgen.sh 417,419c417,419 < echo " -DDRV_DATA_START=${SYSBASE}_drv_data_start \\" >> ${MAKEFILE} < echo " -DDRV_NAME=${SYSBASE} \\" >> ${MAKEFILE} < echo " -DDRV_DATA_END=${SYSBASE}_drv_data_end" >> ${MAKEFILE} --- > echo " -DDRV_DATA_START=ndis_${SYSBASE}_drv_data_start \\" >> ${MAKEFILE} > echo " -DDRV_NAME=ndis_${SYSBASE} \\" >> ${MAKEFILE} > echo " -DDRV_DATA_END=ndis_${SYSBASE}_drv_data_end" >> ${MAKEFILE} >Release-Note: >Audit-Trail: >Unformatted: