Annotation of xinu/sys/LSI/ibget.c, revision 1.1.1.1

1.1       root        1: /* ibget.c - ibget */
                      2: 
                      3: #include <conf.h>
                      4: #include <kernel.h>
                      5: #include <disk.h>
                      6: #include <lfile.h>
                      7: #include <dir.h>
                      8: 
                      9: /*------------------------------------------------------------------------
                     10:  *  ibget  --  get an iblock from disk given its number
                     11:  *------------------------------------------------------------------------
                     12:  */
                     13: ibget(diskdev, inum, loc)
                     14: int    diskdev;
                     15: IBADDR inum;
                     16: struct iblk    *loc;
                     17: {
                     18:        char    *from, *to;
                     19:        int     i;
                     20:        char    *buff;
                     21: 
                     22:        buff = getbuf(dskdbp);
                     23:        read(diskdev, buff, ibtodb(inum));
                     24:        from = buff + ibdisp(inum);
                     25:        to = (char *)loc;
                     26:        for (i=0 ; i<sizeof(struct iblk) ; i++)
                     27:                *to++ = *from++;
                     28:        freebuf(buff);
                     29: }

unix.superglobalmegacorp.com

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