+## range of g is fsgroup
+ while (sq_get_data(sq, &group)) {
+ fid = atoi(index(group, ':')+1);
+ *index(group, ':') = 0;
+## retrieve (type = f.#type, loc = f.#name, id = f.mach_id,
+## access = f.#access, mount = f.#mount, comments = f.#comments,
+## name = f.#label, trans = g.#key)
+## where f.filsys_id = g.filsys_id and g.group_id = fid
+## sort by #trans, #name {
+ strtrim(type);
+ if (!strcmp(type, "NFS") || !strcmp(type, "RVD")) {
+ strtrim(loc);
+ strtrim(access);
+ strtrim(mount);
+ if (mach = hash_lookup(machines, id)) {
+ for (p = machbuf; *mach && *mach != '.'; mach++) {
+ if (isupper(*mach))
+ *p++ = tolower(*mach);
+ else
+ *p++ = *mach;
+ *p = 0;
+ }
+ fprintf(out, "%s.filsys\tHS UNSPECA \"%s %s %s %s %s\"\n",
+ group, type, loc, machbuf, access, mount);
+ }
+ } else if (!strcmp(type, "ERR")) {
+ strtrim(comments);
+ fprintf(out, "%s.filsys\tHS UNSPECA \"ERR %s\"\n",
+ group, comments);
+ }
+## }
+ free(group);
+ }
+ sq_destroy(sq);