summaryrefslogtreecommitdiffstats
path: root/sys/dev/si
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1996-01-16 18:13:18 +0000
committerphk <phk@FreeBSD.org>1996-01-16 18:13:18 +0000
commite033942d45f4b4d6a12102665a2789f73ddd99eb (patch)
tree3c1715f2335cf42d241fed3dec1a81e1c9898b83 /sys/dev/si
parent3298f0814fd3542ee4fb7d6ef09da4566b6d1d3a (diff)
downloadFreeBSD-src-e033942d45f4b4d6a12102665a2789f73ddd99eb.zip
FreeBSD-src-e033942d45f4b4d6a12102665a2789f73ddd99eb.tar.gz
Use the new & improved printf rather than homegrown kludges.
Proposed by: bde
Diffstat (limited to 'sys/dev/si')
-rw-r--r--sys/dev/si/si.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c
index d38db1e..df7509a 100644
--- a/sys/dev/si/si.c
+++ b/sys/dev/si/si.c
@@ -30,7 +30,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHORS BE LIABLE.
*
- * $Id: si.c,v 1.32 1996/01/02 09:20:29 peter Exp $
+ * $Id: si.c,v 1.34 1996/01/09 03:01:45 peter Exp $
*/
#ifndef lint
@@ -151,10 +151,6 @@ static struct tty *si_tty;
extern int si_dsize;
extern unsigned char si_download[];
-#ifdef DEVFS
-static char chardev[] = "0123456789abcdef";
-#endif
-
struct si_softc {
int sc_type; /* adapter type */
char *sc_typename; /* adapter type string */
@@ -705,19 +701,19 @@ mem_fail:
/* path name devsw minor type uid gid perm*/
for ( x = 0; x < sc->sc_nport; x++ ) {
y = x + 1; /* For sync with the manuals that start at 1 */
- sprintf(name,"ttyA%c%c", chardev[y / 10], chardev[y % 10]);
+ sprintf(name,"ttyA%02d", y);
sc->devfs_token[x].ttyd = devfs_add_devsw(
"/", name, &si_cdevsw, x,
DV_CHR, 0, 0, 0600);
- sprintf(name,"cuaA%c%c", chardev[y / 10], chardev[y % 10]);
+ sprintf(name,"cuaA%02d", y);
sc->devfs_token[x].cuaa = devfs_add_devsw(
"/", name, &si_cdevsw, x + 128,
DV_CHR, 0, 0, 0600);
- sprintf(name,"ttyiA%c%c", chardev[y / 10], chardev[y % 10]);
+ sprintf(name,"ttyiA%02d", y);
sc->devfs_token[x].ttyi = devfs_add_devsw(
"/", name, &si_cdevsw, x + 0x10000,
DV_CHR, 0, 0, 0600);
- sprintf(name,"ttylA%c%c", chardev[y / 10], chardev[y % 10]);
+ sprintf(name,"ttylA%02d", y);
sc->devfs_token[x].ttyl = devfs_add_devsw(
"/", name, &si_cdevsw, x + 0x20000,
DV_CHR, 0, 0, 0600);
OpenPOWER on IntegriCloud