[Midnightbsd-cvs] src [8668] trunk/sys: do not include date and time the driver is built.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Sep 25 16:35:27 EDT 2016


Revision: 8668
          http://svnweb.midnightbsd.org/src/?rev=8668
Author:   laffer1
Date:     2016-09-25 16:35:26 -0400 (Sun, 25 Sep 2016)
Log Message:
-----------
 do not include date and time the driver is built. constify strings.

Modified Paths:
--------------
    trunk/sys/conf/files.amd64
    trunk/sys/conf/files.i386
    trunk/sys/dev/hpt27xx/hpt27xx_config.c
    trunk/sys/dev/hpt27xx/os_bsd.h
    trunk/sys/dev/hpt27xx/osm_bsd.c
    trunk/sys/modules/hpt27xx/Makefile

Modified: trunk/sys/conf/files.amd64
===================================================================
--- trunk/sys/conf/files.amd64	2016-09-25 20:34:02 UTC (rev 8667)
+++ trunk/sys/conf/files.amd64	2016-09-25 20:35:26 UTC (rev 8668)
@@ -193,8 +193,7 @@
 dev/fdc/fdc_isa.c		optional	fdc isa
 dev/fdc/fdc_pccard.c		optional	fdc pccard
 dev/hpt27xx/os_bsd.c		optional	hpt27xx
-dev/hpt27xx/osm_bsd.c		optional	hpt27xx \
-	compile-with "${NORMAL_C} ${NO_WFORMAT_SECURITY}"
+dev/hpt27xx/osm_bsd.c		optional	hpt27xx
 dev/hpt27xx/hpt27xx_config.c	optional	hpt27xx
 dev/hptmv/entry.c		optional	hptmv
 dev/hptmv/mv.c			optional	hptmv

Modified: trunk/sys/conf/files.i386
===================================================================
--- trunk/sys/conf/files.i386	2016-09-25 20:34:02 UTC (rev 8667)
+++ trunk/sys/conf/files.i386	2016-09-25 20:35:26 UTC (rev 8668)
@@ -180,8 +180,7 @@
 dev/glxsb/glxsb.c		optional glxsb
 dev/glxsb/glxsb_hash.c		optional glxsb
 dev/hpt27xx/os_bsd.c		optional hpt27xx
-dev/hpt27xx/osm_bsd.c		optional hpt27xx \
-	compile-with "${NORMAL_C} ${NO_WFORMAT_SECURITY}"
+dev/hpt27xx/osm_bsd.c		optional hpt27xx
 dev/hpt27xx/hpt27xx_config.c	optional hpt27xx
 dev/hptmv/entry.c		optional hptmv
 dev/hptmv/mv.c			optional hptmv

Modified: trunk/sys/dev/hpt27xx/hpt27xx_config.c
===================================================================
--- trunk/sys/dev/hpt27xx/hpt27xx_config.c	2016-09-25 20:34:02 UTC (rev 8667)
+++ trunk/sys/dev/hpt27xx/hpt27xx_config.c	2016-09-25 20:35:26 UTC (rev 8668)
@@ -58,9 +58,9 @@
 	return 0;
 }
 
-char driver_name[] = "hpt27xx";
-char driver_name_long[] = "RocketRAID 27xx controller driver";
-char driver_ver[] = "v1.0 (" __DATE__ " " __TIME__ ")";
+const char driver_name[] = "hpt27xx";
+const char driver_name_long[] = "RocketRAID 27xx controller driver";
+const char driver_ver[] = "v1.0";
 int  osm_max_targets = 0xff;
 
 

Modified: trunk/sys/dev/hpt27xx/os_bsd.h
===================================================================
--- trunk/sys/dev/hpt27xx/os_bsd.h	2016-09-25 20:34:02 UTC (rev 8667)
+++ trunk/sys/dev/hpt27xx/os_bsd.h	2016-09-25 20:35:26 UTC (rev 8668)
@@ -135,9 +135,9 @@
 #include <dev/hpt27xx/ldm.h>
 
 /* driver parameters */
-extern char driver_name[];
-extern char driver_name_long[];
-extern char driver_ver[];
+extern const char driver_name[];
+extern const char driver_name_long[];
+extern const char driver_ver[];
 extern int  osm_max_targets;
 
 /*

Modified: trunk/sys/dev/hpt27xx/osm_bsd.c
===================================================================
--- trunk/sys/dev/hpt27xx/osm_bsd.c	2016-09-25 20:34:02 UTC (rev 8667)
+++ trunk/sys/dev/hpt27xx/osm_bsd.c	2016-09-25 20:35:26 UTC (rev 8668)
@@ -167,7 +167,8 @@
 
 		HPT_ASSERT((f->size & (f->alignment-1))==0);
 
-		for (order=0, size=PAGE_SIZE; size<f->size; order++, size<<=1) ;
+		for (order=0, size=PAGE_SIZE; size<f->size; order++, size<<=1)
+			;
 
 		KdPrint(("%s: %d*%d=%d bytes, order %d",
 			f->tag, f->count, f->size, f->count*f->size, order));
@@ -1036,6 +1037,7 @@
 	}
 
 	if (!i) {
+		if (bootverbose)
 			os_printk("no controller detected.");
 		return;
 	}
@@ -1177,7 +1179,7 @@
 	}	
 
 	make_dev(&hpt_cdevsw, DRIVER_MINOR, UID_ROOT, GID_OPERATOR,
-	    S_IRUSR | S_IWUSR, driver_name);
+	    S_IRUSR | S_IWUSR, "%s", driver_name);
 }
 
 #if defined(KLD_MODULE) && (__FreeBSD_version >= 503000)
@@ -1224,6 +1226,7 @@
 
 static void hpt_init(void *dummy)
 {
+	if (bootverbose)
 		os_printk("%s %s", driver_name_long, driver_ver);
 
 	override_kernel_driver();

Modified: trunk/sys/modules/hpt27xx/Makefile
===================================================================
--- trunk/sys/modules/hpt27xx/Makefile	2016-09-25 20:34:02 UTC (rev 8667)
+++ trunk/sys/modules/hpt27xx/Makefile	2016-09-25 20:35:26 UTC (rev 8668)
@@ -12,6 +12,3 @@
 	uudecode -p < ${HPT27XX}/$(MACHINE_ARCH)-elf.hpt27xx_lib.o.uu > ${.TARGET}
 
 .include <bsd.kmod.mk>
-
-CWARNFLAGS.osm_bsd.c=	${NO_WFORMAT_SECURITY}
-CWARNFLAGS+=		${CWARNFLAGS.${.IMPSRC:T}}



More information about the Midnightbsd-cvs mailing list