Annotation of coherent/d/PS2_KERNEL/io.386/msgstub.c, revision 1.1.1.1

1.1       root        1: /* $Header: /kernel/kersrc/io.386/RCS/msgstub.c,v 1.2 92/08/04 12:54:08 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) 1985
                     11:  *     An unpublished work by INETCO Sys/
                     12: 
                     13: #include <sys/coherent.h>
                     14: #include <errno.h>
                     15: #include <sys/inode.h>
                     16: #include <sys/fdisk.h>
                     17: #include <sys/buf.h>
                     18: #include <sys/con.h>
                     19: 
                     20: fdisk(dev, fp)
                     21: dev_t dev;
                     22: register struct fdisk_s *fp;
                     23: {
                     24:        register struct hdisk_s *hp;
                     25:        BUF *bp;
                     26:        int s, i;
                     27:        int ret = 0;
                     28: 
                     29:        s = sphi();
                     30:        dopen(dev, IPR, DFBLK);
                     31: 
                     32:        if (u.u_error == 0) {           /* special device now open */
                     33: 
                     34:                if (bp = bread(dev, (daddr_t) 0, 1)) {  /* data read */
                     35: 
                     36:                        /* buffer cache is in kernel data space */
                     37: #ifdef _I386
                     38:                        hp = bp->b_vaddr;
                     39: #else
                     40:                        hp = FP_OFF(bp->b_faddr);
                     41: #endif
                     42: 
                     43:                        if(hp->hd_sig==HDSIG) {
                     44:                                for (i=0; i < NPARTN; ++i)
                     45:                                        *fp++ = hp->hd_partn[i];
                     46:                                ret   = 1;
                     47:                        }
                     48:                        brelease(bp);
                     49:                }
                     50:                dclose(dev);
                     51:        }
                     52:        spl(s);
                     53:        return ret;
                     54: }
                     55: io.386/fl.c

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.