1 /* (c) Copyright 1988 by the Massachusetts Institute of Technology. */
2 /* For copying and distribution information, please see the file */
3 /* <mit-copyright.h>. */
5 #include <mit-copyright.h>
8 char *malloc(), *strsave();
11 struct np *next; /* this must be the first field */
15 struct np **nfsphys = NULL;
17 int match_phys(mach, directory)
25 ## int id, maxmach, mid;
28 printf("Building NFSphys table\n");
29 ## range of n is nfsphys
30 ## retrieve (maxmach = max(machine.mach_id))
32 nfsphys = (struct np **) malloc(maxmach * sizeof(struct np *));
33 bzero(nfsphys, maxmach * sizeof(struct np *));
34 ## retrieve (id = n.nfsphys_id, mid = n.mach_id, dir = n.#dir)
36 n = (struct np *) malloc(sizeof(struct np));
39 n->dir = strsave(strtrim(dir));
40 p = (struct np *)&nfsphys[mid];
47 if ((n = nfsphys[mach]) == NULL)
50 if (!strncmp(directory, n->dir, strlen(n->dir)))
58 ##int match_filsys(mach, device, user)
66 ## repeat retrieve (fid = f.filsys_id, mid = f.mach_id, dev = n.#device)
67 ## where f.label = u.login and n.nfsphys_id = f.phys_id and
69 if (mid == mach && !strcmp(device, strtrim(dev)))
72 ## repeat retrieve unique (fid = f.filsys_id) where f.mach_id = @mach and
75 ## repeat retrieve unique (fid = f.filsys_id) where f.mach_id = @mach and
76 ## f.phys_id = n.nfsphys_id and n.#device = @device