|
|
1.1 root 1: /* rfalloc.c - rfalloc */
2:
3: #include <conf.h>
4: #include <kernel.h>
5: #include <fserver.h>
6: #include <rfile.h>
7:
8: /*------------------------------------------------------------------------
9: * rfalloc -- allocate pseudo device for a remote file; return id
10: *------------------------------------------------------------------------
11: */
12: rfalloc()
13: {
14: int i;
15: PStype ps;
16:
17: disable(ps);
18: for (i=0 ; i<Nrf ; i++)
19: if (Rf.rftab[i].rf_state == RFREE) {
20: Rf.rftab[i].rf_state = RUSED;
21: restore(ps);
22: return(i);
23: }
24: restore(ps);
25: return(SYSERR);
26: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.