summaryrefslogtreecommitdiffstats
path: root/usr.sbin/config/mkioconf.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-04-24 18:59:19 +0000
committerpeter <peter@FreeBSD.org>1999-04-24 18:59:19 +0000
commit6994e5b80181dda0367cc24342a59efbbfd24a10 (patch)
treefb0aa7dbe0a0bfc6150eaeb6ca9b74bbd2cb7c3e /usr.sbin/config/mkioconf.c
parent3843abdc03deacf817f6459a1690b2911648a571 (diff)
downloadFreeBSD-src-6994e5b80181dda0367cc24342a59efbbfd24a10.zip
FreeBSD-src-6994e5b80181dda0367cc24342a59efbbfd24a10.tar.gz
More cleanups, tweaks and features.
- make this work: options FOO123=456 *without quotes* - grumble (but accept) vector xxxintr, and tty/net/bio/cam flags. - complain if a device is specified twice (eg: 2 x psm0) - don't require quotes around: port IO_COM2 - recognize negative numbers. (ie: options CAM_DEBUG_UNIT=-1) - GC some more unused stuff (we don't have composite disks from config(8)). - various other nits (snprintf paranoia etc)
Diffstat (limited to 'usr.sbin/config/mkioconf.c')
-rw-r--r--usr.sbin/config/mkioconf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/config/mkioconf.c b/usr.sbin/config/mkioconf.c
index f4927c7..96b1619 100644
--- a/usr.sbin/config/mkioconf.c
+++ b/usr.sbin/config/mkioconf.c
@@ -36,7 +36,7 @@
static char sccsid[] = "@(#)mkioconf.c 8.2 (Berkeley) 1/21/94";
#endif
static const char rcsid[] =
- "$Id: mkioconf.c,v 1.52 1999/04/18 14:27:33 kato Exp $";
+ "$Id: mkioconf.c,v 1.53 1999/04/19 14:40:55 peter Exp $";
#endif /* not lint */
#include <err.h>
@@ -60,7 +60,7 @@ devstr(struct device *dp)
return "nexus0";
if (dp->d_unit >= 0) {
- sprintf(buf, "%s%d", dp->d_name, dp->d_unit);
+ snprintf(buf, sizeof(buf), "%s%d", dp->d_name, dp->d_unit);
return buf;
} else
return dp->d_name;
@@ -319,7 +319,7 @@ qu(num)
return ("'?'");
if (num == UNKNOWN)
return (" -1");
- (void) sprintf(errbuf, "%3d", num);
+ (void) snprintf(errbuf, sizeof(errbuf), "%3d", num);
return (errbuf);
}
@@ -330,6 +330,6 @@ wnum(num)
if (num == QUES || num == UNKNOWN)
return ("?");
- (void) sprintf(errbuf, "%d", num);
+ (void) snprintf(errbuf, sizeof(errbuf), "%d", num);
return (errbuf);
}
OpenPOWER on IntegriCloud