summaryrefslogtreecommitdiffstats
path: root/comms/ltmdm/files/current-fix
blob: 749ae352613dcb53ff8600d639b7fc5fd5e618a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
--- work/sys/dev/ltmdm/ltmdmsio.c	Tue Mar 12 02:47:31 2002
+++ work/sys/dev/ltmdm/ltmdmsio.c	Tue Jun 11 04:49:45 2002
@@ -123,12 +123,6 @@
 #define lt_enable_intr()    enable_intr()
 #endif
 
-#if __FreeBSD_version >= 500023 /* >= 20010912 */
-#define proc thread         /* temporary hack: struct proc -> stuct thread */
-#define suser(p) suser_td(p)
-#endif
-
-
 #define LOTS_OF_EVENTS  64  /* helps separate urgent events from input */
 
 #define CALLOUT_MASK        0x80
@@ -1470,7 +1464,7 @@
 }
 
 static int
-sioopen(dev_t dev, int flag, int mode, struct proc *p)
+sioopen(dev_t dev, int flag, int mode, struct thread *td)
 {
     struct com_s    *com;
     int     error;
@@ -1528,7 +1522,7 @@
             }
         }
         if (tp->t_state & TS_XCLUDE &&
-            suser(p)) {
+            suser(td)) {
             error = EBUSY;
             goto out;
         }
@@ -1639,7 +1633,7 @@
 }
 
 static int
-sioclose(dev_t dev, int flag, int mode, struct proc *p)
+sioclose(dev_t dev, int flag, int mode, struct thread *td)
 {
     struct com_s    *com;
     int     mynor;
@@ -1906,8 +1900,7 @@
             if ((modem_status ^ com->last_modem_status) & MSR_DCD) {
                 tc = timecounter;
                 count = tc->tc_get_timecount(tc);
-                pps_event(&com->pps, tc, count, 
-                          (modem_status & MSR_DCD) ? 
+                pps_event(&com->pps, (modem_status & MSR_DCD) ? 
                           PPS_CAPTUREASSERT : PPS_CAPTURECLEAR);
             }
         }
@@ -2053,7 +2046,7 @@
 }
 
 static int
-sioioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
+sioioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
 {
     struct com_s    *com;
     int     error;
@@ -2084,7 +2077,7 @@
         }
         switch (cmd) {
         case TIOCSETA:
-            error = suser(p);
+            error = suser(td);
             if (error != 0)
                 return (error);
             *ct = *(struct termios *)data;
@@ -2134,7 +2127,7 @@
         if (lt->c_ospeed != 0)
             dt->c_ospeed = tp->t_ospeed;
     }
-    error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
+    error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, td);
     if (error != ENOIOCTL)
         return (error);
     s = splfunc();
@@ -2175,7 +2168,7 @@
         break;
     case TIOCMSDTRWAIT:
         /* must be root since the wait applies to following logins */
-        error = suser(p);
+        error = suser(td);
         if (error != 0) {
             splx(s);
             return (error);
OpenPOWER on IntegriCloud