|
|
1.1 ! root 1: /* $Header: /kernel/kersrc/i286/RCS/ld.c,v 1.1 92/07/17 15:21:30 bin Exp Locker: bin $ ! 2: * ! 3: * The information contained herein is a trade secret of INETCO ! 4: * Systems, and is confidential information. It is provided under ! 5: * a license agreement, and may be copied or disclosed only under ! 6: * the terms of that agreement. Any reproduction or disclosure of ! 7: * this material without the express written authorization of ! 8: * INETCO Systems or persuant to the license agreement is unlawful. ! 9: * ! 10: * Copyright (c) 1986 ! 11: * An unpublished work by INETCO Systems, Ltd. ! 12: * All rights reserved. ! 13: */ ! 14: ! 15: /* ! 16: * Pseudo-Device Interface to Loadable Drivers. ! 17: * ! 18: * $Log: ld.c,v $ ! 19: * Revision 1.1 92/07/17 15:21:30 bin ! 20: * Initial revision ! 21: * ! 22: * Revision 1.1 88/03/24 17:39:36 src ! 23: * Initial revision ! 24: * ! 25: * 87/12/08 Allan Cornish /usr/src/sys/i8086/src/ld.c ! 26: * Block device interface added to loadable drivers. ! 27: * ! 28: * 87/10/25 Allan Cornish /usr/src/sys/i8086/drv/ld.c ! 29: * Initial version. ! 30: */ ! 31: ! 32: #include <sys/coherent.h> ! 33: #include <sys/fdisk.h> ! 34: #include <sys/buf.h> ! 35: #include <sys/con.h> ! 36: #include <sys/stat.h> ! 37: #include <errno.h> ! 38: ! 39: /* ! 40: * Driver configuration. ! 41: */ ! 42: void ld_open(); ! 43: void ld_close(); ! 44: void ld_read(); ! 45: void ld_write(); ! 46: void ld_block(); ! 47: int ld_ioctl(); ! 48: void ld_power(); ! 49: void ld_time(); ! 50: int ld_poll(); ! 51: void nulldev(); ! 52: void nonedev(); ! 53: ! 54: /* ! 55: * Loadable driver: Pseudeo-device configuration. ! 56: */ ! 57: CON ldrvpsy = { ! 58: DFCHR|DFBLK|DFPOL, /* Flags */ ! 59: 0, /* Major index */ ! 60: ld_open, /* Open */ ! 61: ld_close, /* Close */ ! 62: ld_block, /* Block */ ! 63: ld_read, /* Read */ ! 64: ld_write, /* Write */ ! 65: ld_ioctl, /* Ioctl */ ! 66: ld_power, /* Powerfail */ ! 67: ld_time, /* Timeout */ ! 68: nulldev, /* Load */ ! 69: nulldev, /* Unload */ ! 70: ld_poll /* Poll */ ! 71: }; ! 72: ! 73: /* ! 74: * Loadable driver: Code selectors. ! 75: */ ! 76: saddr_t ldrvsel[NDRV]; ! 77: ! 78: /* ! 79: * Loadable driver: Pointers to driver configuration table. ! 80: */ ! 81: CON * ldrvcon[NDRV]; ! 82: ! 83: /* ! 84: * Loadable driver: Selector referencing interrupt handler's code segment. ! 85: */ ! 86: saddr_t ldrvics[16]; ! 87: ! 88: /* ! 89: * Loadable driver: Pointers to interrupt handlers within the loadable driver. ! 90: */ ! 91: void (*ldrvipc[16])();
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.