diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2006-01-13 19:26:08 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2006-01-13 19:26:08 +0000 |
| commit | 8ec67ba0edc8355f41e85a4bd27de2e7ed012e2d (patch) | |
| tree | 00a85577d6209e54db0868cbd768ecb3eb3fef3a /sys/dev/si | |
| parent | 4f29a1a7ad1b3dd7b37301006640bb0fa446971f (diff) | |
Notes
Diffstat (limited to 'sys/dev/si')
| -rw-r--r-- | sys/dev/si/si.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c index 2f9f872668c8..96a03d845ac3 100644 --- a/sys/dev/si/si.c +++ b/sys/dev/si/si.c @@ -541,7 +541,8 @@ try_next: pp->sp_pend = IDLE_CLOSE; pp->sp_state = 0; /* internal flag */ #ifdef SI_DEBUG - sprintf(pp->sp_name, "si%r%r", unit, x); + sprintf(pp->sp_name, "si%r%r", unit, + (int)(pp - sc->sc_ports)); #endif tp = pp->sp_tty = ttyalloc(); tp->t_sc = pp; @@ -552,7 +553,8 @@ try_next: tp->t_oproc = si_start; tp->t_param = siparam; tp->t_stop = si_stop; - ttycreate(tp, NULL, 0, MINOR_CALLOUT, "A%r%r", unit, x); + ttycreate(tp, NULL, 0, MINOR_CALLOUT, "A%r%r", unit + (int)(pp - sc->sc_ports)); } try_next2: if (modp->sm_next == 0) { @@ -576,7 +578,9 @@ try_next2: done_chartimes = 1; } - make_dev(&si_Scdevsw, 0, 0, 0, 0600, "si_control"); + if (unit == 0) + make_dev(&si_Scdevsw, 0, UID_ROOT, GID_WHEEL, 0600, + "si_control"); return (0); } |
