From 6127f4ed3f8f0a613ae452fc871915d0298f5f6e Mon Sep 17 00:00:00 2001 From: dyoung Date: Mon, 11 Feb 2008 03:36:25 +0000 Subject: [PATCH] Don't get under the device_t abstraction by measuring the length of dv_xname, especially not to set the length of a buffer that (apparently) belongs to the kernel ABI. Instead, set the buffer length to 16, which is the current length of dv_xname. --- sys/dev/i2o/iopio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/i2o/iopio.h b/sys/dev/i2o/iopio.h index 5aedd3bf1924..b372da198f38 100644 --- a/sys/dev/i2o/iopio.h +++ b/sys/dev/i2o/iopio.h @@ -1,4 +1,4 @@ -/* $NetBSD: iopio.h,v 1.4 2006/08/27 21:39:39 christos Exp $ */ +/* $NetBSD: iopio.h,v 1.5 2008/02/11 03:36:25 dyoung Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -50,7 +50,7 @@ struct iop_tidmap { u_short it_tid; u_short it_flags; - char it_dvname[sizeof(((struct device *)NULL)->dv_xname)]; + char it_dvname[16]; }; #define IT_CONFIGURED 0x02 /* target configured */