snp.c (8876) | snp.c (10624) |
---|---|
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 --- 325 unchanged lines hidden (view full) --- 334detach_notty: 335 selwakeup(&snp->snp_sel); 336 snp->snp_sel.si_pid = 0; 337 338 return (0); 339} 340 341int | 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 --- 325 unchanged lines hidden (view full) --- 334detach_notty: 335 selwakeup(&snp->snp_sel); 336 snp->snp_sel.si_pid = 0; 337 338 return (0); 339} 340 341int |
342snpclose(dev, flag) | 342snpclose(dev, flags, fmt, p) |
343 dev_t dev; | 343 dev_t dev; |
344 int flag; | 344 int flags; 345 int fmt; 346 struct proc *p; |
345{ 346 register int unit = minor(dev); 347 struct snoop *snp = &snoopsw[unit]; 348 349 snp->snp_blen = 0; 350 free(snp->snp_buf, M_TTYS); 351 snp->snp_flags &= ~SNOOP_OPEN; 352 --- 9 unchanged lines hidden (view full) --- 362 snp->snp_buf = malloc(SNOOP_MINLEN, M_TTYS, M_WAITOK); 363 snp->snp_flags |= SNOOP_DOWN; 364 365 return (snp_detach(snp)); 366} 367 368 369int | 347{ 348 register int unit = minor(dev); 349 struct snoop *snp = &snoopsw[unit]; 350 351 snp->snp_blen = 0; 352 free(snp->snp_buf, M_TTYS); 353 snp->snp_flags &= ~SNOOP_OPEN; 354 --- 9 unchanged lines hidden (view full) --- 364 snp->snp_buf = malloc(SNOOP_MINLEN, M_TTYS, M_WAITOK); 365 snp->snp_flags |= SNOOP_DOWN; 366 367 return (snp_detach(snp)); 368} 369 370 371int |
370snpioctl(dev, cmd, data, flag) | 372snpioctl(dev, cmd, data, flags, p) |
371 dev_t dev; 372 int cmd; 373 caddr_t data; | 373 dev_t dev; 374 int cmd; 375 caddr_t data; |
374 int flag; | 376 int flags; 377 struct proc *p; |
375{ 376 int unit = minor(dev), s; 377 dev_t tdev; 378 struct snoop *snp = &snoopsw[unit]; 379 struct tty *tp, *tpo; 380 381 switch (cmd) { 382 case SNPSTTY: --- 110 unchanged lines hidden --- | 378{ 379 int unit = minor(dev), s; 380 dev_t tdev; 381 struct snoop *snp = &snoopsw[unit]; 382 struct tty *tp, *tpo; 383 384 switch (cmd) { 385 case SNPSTTY: --- 110 unchanged lines hidden --- |