diff options
author | Mystery Man <unknown@mandriva.org> | 2002-07-09 13:18:50 +0000 |
---|---|---|
committer | Mystery Man <unknown@mandriva.org> | 2002-07-09 13:18:50 +0000 |
commit | 061aa98f8ab5e8b097f3c67e8074f3b057d1d1bf (patch) | |
tree | 6a497ebd94857616d1351e47418c0c3d6db4f563 /mdk-stage1/ppp/sunos4/ppp_vdcmd.c | |
parent | a6a904a31e39b74144c53f0cc4086d496b70c09a (diff) | |
download | drakx-061aa98f8ab5e8b097f3c67e8074f3b057d1d1bf.tar drakx-061aa98f8ab5e8b097f3c67e8074f3b057d1d1bf.tar.gz drakx-061aa98f8ab5e8b097f3c67e8074f3b057d1d1bf.tar.bz2 drakx-061aa98f8ab5e8b097f3c67e8074f3b057d1d1bf.tar.xz drakx-061aa98f8ab5e8b097f3c67e8074f3b057d1d1bf.zip |
This commit was manufactured by cvs2svn to create tag 'V1_1_8_3mdk'.V1_1_8_3mdk
Diffstat (limited to 'mdk-stage1/ppp/sunos4/ppp_vdcmd.c')
-rw-r--r-- | mdk-stage1/ppp/sunos4/ppp_vdcmd.c | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/mdk-stage1/ppp/sunos4/ppp_vdcmd.c b/mdk-stage1/ppp/sunos4/ppp_vdcmd.c deleted file mode 100644 index 68095c92e..000000000 --- a/mdk-stage1/ppp/sunos4/ppp_vdcmd.c +++ /dev/null @@ -1,81 +0,0 @@ -#include <sys/types.h> -#include <sys/errno.h> -#include <sys/conf.h> -#include <sun/vddrv.h> - -extern struct streamtab pppinfo; -extern int ppp_count; -extern int nchrdev; - -static struct vdldrv vd = { - VDMAGIC_PSEUDO, - "ppp" -}; - -extern int nodev(); - -static struct cdevsw ppp_cdevsw = { - nodev, nodev, nodev, nodev, nodev, nodev, nodev, 0, - &pppinfo -}; - -static struct cdevsw old_entry; - -int -ppp_vdcmd(fun, vdp, vdi, vds) - unsigned int fun; - struct vddrv *vdp; - addr_t vdi; - struct vdstat *vds; -{ - static int majnum = -1; - int n, maj; - - switch (fun) { - case VDLOAD: - /* - * It seems like modload doesn't install the cdevsw entry - * for us. Oh well... - */ - for (maj = 1; maj < nchrdev; ++maj) - if (cdevsw[maj].d_open == vd_unuseddev) - break; - if (maj >= nchrdev) - return ENODEV; - vd.Drv_charmajor = maj; - old_entry = cdevsw[maj]; - cdevsw[maj] = ppp_cdevsw; - vd.Drv_cdevsw = &ppp_cdevsw; - vdp->vdd_vdtab = (struct vdlinkage *) &vd; - majnum = maj; - break; - - case VDUNLOAD: - if (ppp_count > 0) - return EBUSY; - if (vd.Drv_charmajor > 0) - cdevsw[vd.Drv_charmajor] = old_entry; - break; - - case VDSTAT: - /* - * We have to fool the modstat command into thinking - * that this module is actually a driver! This is - * so that installation commands that use the -exec - * option of modload to run a shell script find out - * the block and/or char major numbers of the driver - * loaded (so that the shell script can go off to - * /dev and *MAKE* the bloody device nodes- remember - * they might change from one load to another if - * you don't hardwire the number!). - */ - vds->vds_magic = VDMAGIC_DRV; - vds->vds_modinfo[0] = (char) 0; - vds->vds_modinfo[1] = (char) majnum; - break; - - default: - return EIO; - } - return 0; -} |