* [PATCH] sg snprintf()s in 2.5.59
@ 2003-01-30 5:45 Douglas Gilbert
0 siblings, 0 replies; only message in thread
From: Douglas Gilbert @ 2003-01-30 5:45 UTC (permalink / raw)
To: linux-scsi; +Cc: patmans
[-- Attachment #1: Type: text/plain, Size: 183 bytes --]
Patrick Mansfield reminded me that the attached patch
hasn't made it into the 2.5 series yet. It's absence
causes some corruption for long sg_driverfs_dev.name
strings.
Doug Gilbert
[-- Attachment #2: sg_2559_snpr.diff --]
[-- Type: text/plain, Size: 991 bytes --]
--- linux/drivers/scsi/sg.c 2003-01-14 10:46:58.000000000 +1100
+++ linux/drivers/scsi/sg.c2559snpr 2003-01-30 16:38:47.000000000 +1100
@@ -19,7 +19,7 @@
*/
#include <linux/config.h>
#ifdef CONFIG_PROC_FS
-static char *sg_version_str = "Version: 3.5.27 (20020812)";
+static char *sg_version_str = "Version: 3.5.27 (20030130)";
#endif
static int sg_version_num = 30527; /* 2 digits for each component */
/*
@@ -1455,9 +1455,9 @@
sdp->sg_tablesize = scsidp->host ? scsidp->host->sg_tablesize : 0;
memset(&sdp->sg_driverfs_dev, 0, sizeof (struct device));
- sprintf(sdp->sg_driverfs_dev.bus_id, "%s:gen",
+ snprintf(sdp->sg_driverfs_dev.bus_id, BUS_ID_SIZE, "%s:gen",
scsidp->sdev_driverfs_dev.bus_id);
- sprintf(sdp->sg_driverfs_dev.name, "%sgeneric",
+ snprintf(sdp->sg_driverfs_dev.name, DEVICE_NAME_SIZE, "%sgeneric",
scsidp->sdev_driverfs_dev.name);
sdp->sg_driverfs_dev.parent = &scsidp->sdev_driverfs_dev;
sdp->sg_driverfs_dev.bus = scsidp->sdev_driverfs_dev.bus;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-01-30 5:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-30 5:45 [PATCH] sg snprintf()s in 2.5.59 Douglas Gilbert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox