snp.c (46568) | snp.c (46676) |
---|---|
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 --- 57 unchanged lines hidden (view full) --- 66 dev_t dev; 67{ 68 struct cdevsw *cdp; 69 int maj; 70 71 maj = major(dev); 72 if ((u_int)maj >= nchrdev) 73 return (NULL); | 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 --- 57 unchanged lines hidden (view full) --- 66 dev_t dev; 67{ 68 struct cdevsw *cdp; 69 int maj; 70 71 maj = major(dev); 72 if ((u_int)maj >= nchrdev) 73 return (NULL); |
74 cdp = cdevsw[maj]; | 74 cdp = devsw(dev); |
75 if (cdp == NULL) 76 return (NULL); 77 return ((*cdp->d_devtotty)(dev)); 78} 79 80#define SNP_INPUT_BUF 5 /* This is even too much,the maximal 81 * interactive mode write is 3 bytes 82 * length for function keys... --- 459 unchanged lines hidden --- | 75 if (cdp == NULL) 76 return (NULL); 77 return ((*cdp->d_devtotty)(dev)); 78} 79 80#define SNP_INPUT_BUF 5 /* This is even too much,the maximal 81 * interactive mode write is 3 bytes 82 * length for function keys... --- 459 unchanged lines hidden --- |