diff options
author | thompsa <thompsa@FreeBSD.org> | 2008-04-15 04:17:13 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2008-04-15 04:17:13 +0000 |
commit | b5d5b802b92d4b1c41d22000ef8ec058c320512d (patch) | |
tree | 393572d63a160d8cb7ef14aaef02aeb9030147c9 | |
parent | a0a0cca9c8ea37871018c42888915fd12b51bb6d (diff) | |
download | FreeBSD-src-b5d5b802b92d4b1c41d22000ef8ec058c320512d.zip FreeBSD-src-b5d5b802b92d4b1c41d22000ef8ec058c320512d.tar.gz |
Use a ndis_ prefix on the C variable instead of directly using the .sys
filename, this would fail if the filename started with a number.
PR: bin/84911
Submitted by: Fredrik Lindberg
-rw-r--r-- | usr.sbin/ndiscvt/ndiscvt.c | 8 | ||||
-rw-r--r-- | usr.sbin/ndiscvt/ndisgen.sh | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/ndiscvt/ndiscvt.c b/usr.sbin/ndiscvt/ndiscvt.c index 733af8a..34d3120 100644 --- a/usr.sbin/ndiscvt/ndiscvt.c +++ b/usr.sbin/ndiscvt/ndiscvt.c @@ -207,9 +207,9 @@ bincvt(char *sysfile, char *outfile, void *img, int fsize) } snprintf(sysbuf, sizeof(sysbuf), - "objcopy --redefine-sym _binary_%s_start=%s_drv_data_start " + "objcopy --redefine-sym _binary_%s_start=ndis_%s_drv_data_start " "--strip-symbol _binary_%s_size " - "--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", tname, sysfile, tname, tname, sysfile, outfile, outfile); printf("%s", sysbuf); system(sysbuf); @@ -384,10 +384,10 @@ main(int argc, char *argv[]) ptr++; } fprintf(outfp, - "\nextern unsigned char %s_drv_data_start[];\n", + "\nextern unsigned char ndis_%s_drv_data_start[];\n", sysfile); fprintf(outfp, "static unsigned char *drv_data = " - "%s_drv_data_start;\n\n", sysfile); + "ndis_%s_drv_data_start;\n\n", sysfile); bincvt(sysfile, outfile, img, fsize); goto done; } diff --git a/usr.sbin/ndiscvt/ndisgen.sh b/usr.sbin/ndiscvt/ndisgen.sh index 6de8fe6..e8c8ce3 100644 --- a/usr.sbin/ndiscvt/ndisgen.sh +++ b/usr.sbin/ndiscvt/ndisgen.sh @@ -414,9 +414,9 @@ echo "KMOD= ${SYSBASE}" >> ${MAKEFILE} echo "SRCS+= ${STUBFILE} ${DNAME}.h bus_if.h device_if.h" >> ${MAKEFILE} echo "OBJS+=${FRMLIST} ${DNAME}.o" >> ${MAKEFILE} echo "CFLAGS+= \\" >> ${MAKEFILE} -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} echo "CLEANFILES+= \\" >> ${MAKEFILE} echo " ${INFFILE} \\" >> ${MAKEFILE} echo " ${DNAME}.h \\" >> ${MAKEFILE} |