snp.c (10624) | snp.c (11921) |
---|---|
1/* 2 * Copyright (c) 1995 Ugen J.S.Antsilevich 3 * 4 * Redistribution and use in source forms, with and without modification, 5 * are permitted provided that this entire comment appears intact. 6 * 7 * Redistribution in binary form may occur without any restrictions. 8 * Obviously, it would be nice if you gave credit where credit is due --- 168 unchanged lines hidden (view full) --- 177 struct snoop *snp; 178 char *buf; 179 int n; 180{ 181 int s_free, s_tail; 182 int s, len, nblen; 183 caddr_t from, to; 184 char *nbuf; | 1/* 2 * Copyright (c) 1995 Ugen J.S.Antsilevich 3 * 4 * Redistribution and use in source forms, with and without modification, 5 * are permitted provided that this entire comment appears intact. 6 * 7 * Redistribution in binary form may occur without any restrictions. 8 * Obviously, it would be nice if you gave credit where credit is due --- 168 unchanged lines hidden (view full) --- 177 struct snoop *snp; 178 char *buf; 179 int n; 180{ 181 int s_free, s_tail; 182 int s, len, nblen; 183 caddr_t from, to; 184 char *nbuf; |
185 struct tty *tp; | |
186 187 188 if (n == 0) 189 return 0; 190 191#ifdef DIAGNOSTIC 192 if (n < 0) 193 panic("bad snoop char count"); --- 272 unchanged lines hidden (view full) --- 466 467 468int 469snpselect(dev, rw, p) 470 dev_t dev; 471 int rw; 472 struct proc *p; 473{ | 185 186 187 if (n == 0) 188 return 0; 189 190#ifdef DIAGNOSTIC 191 if (n < 0) 192 panic("bad snoop char count"); --- 272 unchanged lines hidden (view full) --- 465 466 467int 468snpselect(dev, rw, p) 469 dev_t dev; 470 int rw; 471 struct proc *p; 472{ |
474 int unit = minor(dev), s; | 473 int unit = minor(dev); |
475 struct snoop *snp = &snoopsw[unit]; 476 477 if (rw != FREAD) 478 return 1; 479 480 if (snp->snp_len > 0) 481 return 1; 482 --- 13 unchanged lines hidden --- | 474 struct snoop *snp = &snoopsw[unit]; 475 476 if (rw != FREAD) 477 return 1; 478 479 if (snp->snp_len > 0) 480 return 1; 481 --- 13 unchanged lines hidden --- |