diff options
| author | Jake Burkholder <jake@FreeBSD.org> | 2003-01-27 18:39:09 +0000 |
|---|---|---|
| committer | Jake Burkholder <jake@FreeBSD.org> | 2003-01-27 18:39:09 +0000 |
| commit | a68a96aad7ad6d715e4f7f747925fca226e076bd (patch) | |
| tree | 73075abb23adf46acceef61de97f216305d5ae95 | |
| parent | 4bb2c6860a9a8ea2adbf4a3a5692fe5d38c58fa1 (diff) | |
Notes
| -rw-r--r-- | sys/dev/sab/sab.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/sab/sab.c b/sys/dev/sab/sab.c index 2daf97b8b153..0540dcfcc4f8 100644 --- a/sys/dev/sab/sab.c +++ b/sys/dev/sab/sab.c @@ -332,7 +332,7 @@ sab_attach(device_t dev) SAB_WRITE(sc, SAB_IPC, sc->sc_ipc); for (i = 0; i < SAB_NCHAN; i++) - child[i] = device_add_child(dev, "sabtty", i); + child[i] = device_add_child(dev, "sabtty", -1); bus_generic_attach(dev); for (i = 0; i < SAB_NCHAN; i++) sc->sc_child[i] = device_get_softc(child[i]); @@ -413,11 +413,10 @@ sab_shutdown(void *v) static int sabtty_probe(device_t dev) { + char desc[32]; - if ((device_get_unit(dev) & 1) == 0) - device_set_desc(dev, "ttya"); - else - device_set_desc(dev, "ttyb"); + snprintf(desc, sizeof(desc), "tty%c", device_get_unit(dev) + 'a'); + device_set_desc_copy(dev, desc); return (0); } |
