Annotation of xinu/sys/unmount.c, revision 1.1.1.1

1.1       root        1: /* unmount.c - unmount */
                      2: 
                      3: #include <conf.h>
                      4: #include <kernel.h>
                      5: #include <name.h>
                      6: 
                      7: /*------------------------------------------------------------------------
                      8:  *  unmount  -  remove an entry from the name prefix mapping table
                      9:  *------------------------------------------------------------------------
                     10:  */
                     11: SYSCALL        unmount(prefix)
                     12: char   *prefix;
                     13: {
                     14:        struct  nament  *nptr;
                     15:        PStype  ps;
                     16:        int     i;
                     17: 
                     18:        if (prefix == NULL)
                     19:                prefix = NULLSTR;
                     20:        else if (strlen(prefix) >= NAMPLEN)
                     21:                return(SYSERR);
                     22:        disable(ps);
                     23:        for (i=0 ; i<Nam.nnames ; i++) {
                     24:                nptr = &Nam.nametab[i];
                     25:                if (strcmp(prefix, nptr->npre) == 0) {
                     26:                        for(Nam.nnames-- ; i<Nam.nnames ; i++)
                     27:                                Nam.nametab[i] = Nam.nametab[i+1];
                     28:                        restore(ps);
                     29:                        return(OK);
                     30:                }
                     31:        }
                     32:        restore(ps);
                     33:        return(SYSERR);
                     34: }

unix.superglobalmegacorp.com

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