snp.c (92056) | snp.c (92252) |
---|---|
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 9 * but requiring it would be too onerous. 10 * 11 * This software is provided ``AS IS'' without any warranties of any kind. 12 * 13 * Snoop stuff. 14 * | 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 9 * but requiring it would be too onerous. 10 * 11 * This software is provided ``AS IS'' without any warranties of any kind. 12 * 13 * Snoop stuff. 14 * |
15 * $FreeBSD: head/sys/dev/snp/snp.c 92056 2002-03-11 03:48:32Z dd $ | 15 * $FreeBSD: head/sys/dev/snp/snp.c 92252 2002-03-14 01:32:30Z alfred $ |
16 */ 17 18#include <sys/param.h> 19#include <sys/systm.h> 20#include <sys/filio.h> 21#include <sys/malloc.h> 22#include <sys/tty.h> 23#include <sys/conf.h> --- 345 unchanged lines hidden (view full) --- 369 bcopy(buf, to, n); 370 snp->snp_len += n; 371 372 if (snp->snp_flags & SNOOP_RWAIT) { 373 snp->snp_flags &= ~SNOOP_RWAIT; 374 wakeup((caddr_t)snp); 375 } 376 selwakeup(&snp->snp_sel); | 16 */ 17 18#include <sys/param.h> 19#include <sys/systm.h> 20#include <sys/filio.h> 21#include <sys/malloc.h> 22#include <sys/tty.h> 23#include <sys/conf.h> --- 345 unchanged lines hidden (view full) --- 369 bcopy(buf, to, n); 370 snp->snp_len += n; 371 372 if (snp->snp_flags & SNOOP_RWAIT) { 373 snp->snp_flags &= ~SNOOP_RWAIT; 374 wakeup((caddr_t)snp); 375 } 376 selwakeup(&snp->snp_sel); |
377 snp->snp_sel.si_pid = 0; | |
378 379 return (n); 380} 381 382static int 383snpopen(dev, flag, mode, td) 384 dev_t dev; 385 int flag, mode; --- 58 unchanged lines hidden (view full) --- 444 } else 445 printf("snp%d: bad attached tty data\n", snp->snp_unit); 446 447 snp->snp_tty = NULL; 448 snp->snp_target = NODEV; 449 450detach_notty: 451 selwakeup(&snp->snp_sel); | 377 378 return (n); 379} 380 381static int 382snpopen(dev, flag, mode, td) 383 dev_t dev; 384 int flag, mode; --- 58 unchanged lines hidden (view full) --- 443 } else 444 printf("snp%d: bad attached tty data\n", snp->snp_unit); 445 446 snp->snp_tty = NULL; 447 snp->snp_target = NODEV; 448 449detach_notty: 450 selwakeup(&snp->snp_sel); |
452 snp->snp_sel.si_pid = 0; | |
453 if ((snp->snp_flags & SNOOP_OPEN) == 0) 454 free(snp, M_SNP); 455 456 return (0); 457} 458 459static int 460snpclose(dev, flags, fmt, td) --- 207 unchanged lines hidden --- | 451 if ((snp->snp_flags & SNOOP_OPEN) == 0) 452 free(snp, M_SNP); 453 454 return (0); 455} 456 457static int 458snpclose(dev, flags, fmt, td) --- 207 unchanged lines hidden --- |