summaryrefslogtreecommitdiff
path: root/sys/kern/subr_devstat.c
diff options
context:
space:
mode:
authorArchie Cobbs <archie@FreeBSD.org>1998-12-04 22:54:57 +0000
committerArchie Cobbs <archie@FreeBSD.org>1998-12-04 22:54:57 +0000
commit2127f26023a9be443e05b592b35c77b454ba8f77 (patch)
tree951cf624a9440f22eae605ca46c2e80246f1bf08 /sys/kern/subr_devstat.c
parent790eeb2b519441c661126930cec65560727a8ec5 (diff)
Notes
Diffstat (limited to 'sys/kern/subr_devstat.c')
-rw-r--r--sys/kern/subr_devstat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/subr_devstat.c b/sys/kern/subr_devstat.c
index 5d8f4a84e9c6..8976c3b40c0f 100644
--- a/sys/kern/subr_devstat.c
+++ b/sys/kern/subr_devstat.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: subr_devstat.c,v 1.5 1998/11/14 21:58:51 wollman Exp $
+ * $Id: subr_devstat.c,v 1.6 1998/11/15 23:57:22 ken Exp $
*/
#include <sys/param.h>
@@ -73,6 +73,7 @@ devstat_add_entry(struct devstat *ds, const char *dev_name,
ds->device_number = devstat_current_devnumber++;
ds->unit_number = unit_number;
strncpy(ds->device_name, dev_name, DEVSTAT_NAME_LEN);
+ ds->device_name[DEVSTAT_NAME_LEN - 1] = 0;
ds->block_size = block_size;
ds->flags = flags;
ds->device_type = device_type;