Lines Matching refs:me
236 struct mapent *me = NULL; in mapline_to_mapent() local
283 mp = me; in mapline_to_mapent()
284 if ((me = (struct mapent *)malloc(sizeof (*me))) == NULL) in mapline_to_mapent()
286 (void) memset((char *)me, 0, sizeof (*me)); in mapline_to_mapent()
288 *mapents = me; in mapline_to_mapent()
290 mp->map_next = me; in mapline_to_mapent()
304 if ((me->map_root = strdup(w1)) == NULL) in mapline_to_mapent()
309 me->map_mntpnt = strdup(""); in mapline_to_mapent()
311 me->map_mntpnt = strdup(w); in mapline_to_mapent()
312 if (me->map_mntpnt == NULL) in mapline_to_mapent()
329 if ((me->map_mntopts = strdup(w)) == NULL) in mapline_to_mapent()
356 if (((me->map_fsw = strdup(w)) == NULL) || in mapline_to_mapent()
357 ((me->map_fswq = strdup(wq)) == NULL)) in mapline_to_mapent()
369 len = strlen(me->map_fsw) + strlen(w) + 4; in mapline_to_mapent()
372 sprintf(fsw, "%s %s", me->map_fsw, w); in mapline_to_mapent()
373 free(me->map_fsw); in mapline_to_mapent()
374 me->map_fsw = fsw; in mapline_to_mapent()
375 len = strlen(me->map_fswq) + strlen(wq) + 4; in mapline_to_mapent()
378 sprintf(fswq, "%s %s", me->map_fswq, wq); in mapline_to_mapent()
379 free(me->map_fswq); in mapline_to_mapent()
380 me->map_fswq = fswq; in mapline_to_mapent()
386 me->map_mntlevel = -1; in mapline_to_mapent()
387 me->map_modified = FALSE; in mapline_to_mapent()
388 me->map_faked = FALSE; in mapline_to_mapent()
389 me->map_err = MAPENT_NOERR; in mapline_to_mapent()
391 me->map_next = NULL; in mapline_to_mapent()
434 struct mapent *me = mapents; in hierarchical_sort() local
448 while (me != NULL) { in hierarchical_sort()
450 path = me->map_mntpnt; in hierarchical_sort()
512 prevnode->mapent = me; in hierarchical_sort()
513 me = me->map_next; in hierarchical_sort()
538 struct mapent *me = NULL; in push_options() local
542 me = node->mapent; in push_options()
543 if (me != NULL) { /* not all nodes point to a mapentry */ in push_options()
544 me->map_err = err; in push_options()
545 if ((rc = set_mapent_opts(me, me->map_mntopts, in push_options()
579 set_mapent_opts(struct mapent *me, char *opts, char *defaultopts, in set_mapent_opts() argument
604 if (me->map_mntopts != NULL) in set_mapent_opts()
605 free(me->map_mntopts); in set_mapent_opts()
606 if ((me->map_mntopts = strdup(entryopts)) == NULL) in set_mapent_opts()
642 (strcmp(me->map_mntopts, NO_OPTS) == 0)) { in set_mapent_opts()
643 free(me->map_mntopts); in set_mapent_opts()
644 if ((rc = fstype_opts(me, opts, defaultopts, in set_mapent_opts()
650 if (((me->map_fstype = strdup(fstype)) == NULL) || in set_mapent_opts()
651 ((me->map_mounter = strdup(mounter)) == NULL)) { in set_mapent_opts()
652 if (me->map_fstype != NULL) in set_mapent_opts()
653 free(me->map_fstype); in set_mapent_opts()
710 fstype_opts(struct mapent *me, char *opts, char *defaultopts, in fstype_opts() argument
736 me->map_mntopts = strdup(pushopts); in fstype_opts()
738 me->map_mntopts = strdup(pushentryopts); in fstype_opts()
740 if (!me->map_mntopts) { in fstype_opts()
767 struct mapent *me; in modify_mapents() local
784 me = *mapents; in modify_mapents()
785 while (me->map_next != NULL) in modify_mapents()
786 me = me->map_next; in modify_mapents()
787 me->map_next = faked_mapents; in modify_mapents()
792 me = *mapents; in modify_mapents()
793 while (me != NULL) { in modify_mapents()
794 if ((me->map_mntlevel == -1) || (me->map_err) || in modify_mapents()
795 (mount_access == FALSE && me->map_mntlevel == 0)) { in modify_mapents()
799 if (me->map_err) in modify_mapents()
800 dump_mapent_err(me, key, mapname); in modify_mapents()
802 if (me == (*mapents)) { in modify_mapents()
804 *mapents = me->map_next; in modify_mapents()
814 me->map_next = NULL; in modify_mapents()
815 free_mapent(me); in modify_mapents()
816 me = *mapents; in modify_mapents()
818 mp->map_next = me->map_next; in modify_mapents()
819 me->map_next = NULL; in modify_mapents()
820 free_mapent(me); in modify_mapents()
821 me = mp->map_next; in modify_mapents()
830 if (me->map_mntlevel == 1 && in modify_mapents()
831 (strcmp(me->map_fstype, MNTTYPE_AUTOFS) != 0) && in modify_mapents()
832 (me->map_faked != TRUE)) { in modify_mapents()
833 if ((rc = convert_mapent_to_automount(me, mapname, in modify_mapents()
837 strcpy(w, (me->map_mntpnt+strlen(subdir))); in modify_mapents()
838 strcpy(me->map_mntpnt, w); in modify_mapents()
839 mp = me; in modify_mapents()
840 me = me->map_next; in modify_mapents()
1043 struct mapent *me; in mark_and_fake_level1_noroot() local
1074 if ((me = (struct mapent *)malloc(sizeof (*me))) in mark_and_fake_level1_noroot()
1080 (void) memset((char *)me, 0, sizeof (*me)); in mark_and_fake_level1_noroot()
1082 if ((me->map_fs = (struct mapfs *) in mark_and_fake_level1_noroot()
1085 (void) memset(me->map_fs, 0, sizeof (struct mapfs)); in mark_and_fake_level1_noroot()
1093 me->map_root = strdup(w1); in mark_and_fake_level1_noroot()
1097 me->map_mntpnt = strdup(faked_map_mntpnt); in mark_and_fake_level1_noroot()
1098 me->map_fstype = strdup(MNTTYPE_AUTOFS); in mark_and_fake_level1_noroot()
1099 me->map_mounter = strdup(MNTTYPE_AUTOFS); in mark_and_fake_level1_noroot()
1102 if ((rc = automount_opts(&me->map_mntopts, mapopts)) in mark_and_fake_level1_noroot()
1105 me->map_fs->mfs_dir = strdup(mapname); in mark_and_fake_level1_noroot()
1106 me->map_mntlevel = 1; in mark_and_fake_level1_noroot()
1107 me->map_modified = FALSE; in mark_and_fake_level1_noroot()
1108 me->map_faked = TRUE; /* mark as faked */ in mark_and_fake_level1_noroot()
1109 if (me->map_root == NULL || in mark_and_fake_level1_noroot()
1110 me->map_mntpnt == NULL || in mark_and_fake_level1_noroot()
1111 me->map_fstype == NULL || in mark_and_fake_level1_noroot()
1112 me->map_mounter == NULL || in mark_and_fake_level1_noroot()
1113 me->map_mntopts == NULL || in mark_and_fake_level1_noroot()
1114 me->map_fs->mfs_dir == NULL) { in mark_and_fake_level1_noroot()
1122 *faked_mapents = me; in mark_and_fake_level1_noroot()
1124 me->map_next = *faked_mapents; in mark_and_fake_level1_noroot()
1125 *faked_mapents = me; in mark_and_fake_level1_noroot()
1127 node->mapent = me; in mark_and_fake_level1_noroot()
1144 convert_mapent_to_automount(struct mapent *me, char *mapname, in convert_mapent_to_automount() argument
1147 struct mapfs *mfs = me->map_fs; /* assumes it exists */ in convert_mapent_to_automount()
1155 while (me->map_fs->mfs_next != NULL) { in convert_mapent_to_automount()
1156 mfs = me->map_fs->mfs_next; in convert_mapent_to_automount()
1161 me->map_fs->mfs_next = mfs->mfs_next; /* nulls eventually */ in convert_mapent_to_automount()
1166 if (me->map_fstype) in convert_mapent_to_automount()
1167 free(me->map_fstype); in convert_mapent_to_automount()
1168 if ((me->map_fstype = strdup(MNTTYPE_AUTOFS)) == NULL) in convert_mapent_to_automount()
1171 if (me->map_mounter) in convert_mapent_to_automount()
1172 free(me->map_mounter); in convert_mapent_to_automount()
1173 if ((me->map_mounter = strdup(me->map_fstype)) == NULL) in convert_mapent_to_automount()
1176 if (me->map_fs->mfs_dir) in convert_mapent_to_automount()
1177 free(me->map_fs->mfs_dir); in convert_mapent_to_automount()
1178 if ((me->map_fs->mfs_dir = strdup(mapname)) == NULL) in convert_mapent_to_automount()
1182 if (me->map_mntopts) in convert_mapent_to_automount()
1183 free(me->map_mntopts); in convert_mapent_to_automount()
1184 if ((rc = automount_opts(&me->map_mntopts, mapopts)) != PARSE_OK) in convert_mapent_to_automount()
1188 me->map_modified = TRUE; in convert_mapent_to_automount()
1270 struct mapent *me = mapents; in parse_fsinfo() local
1276 while (me != NULL) { in parse_fsinfo()
1279 if (strcmp(me->map_fstype, MNTTYPE_NFS) == 0) { in parse_fsinfo()
1280 err = parse_nfs(mapname, me, me->map_fsw, in parse_fsinfo()
1281 me->map_fswq, &bufp, &bufq, wordsz); in parse_fsinfo()
1283 err = parse_special(me, me->map_fsw, me->map_fswq, in parse_fsinfo()
1287 if (err != PARSE_OK || *me->map_fsw != '\0' || in parse_fsinfo()
1288 *me->map_fswq != '\0') { in parse_fsinfo()
1293 me->map_fsw); in parse_fsinfo()
1297 me = me->map_next; in parse_fsinfo()
1318 parse_nfs(mapname, me, fsw, fswq, lp, lq, wsize) in parse_nfs() argument
1319 struct mapent *me; in parse_nfs()
1336 mfsp = &me->map_fs;
1551 parse_special(me, w, wq, lp, lq, wsize) in parse_special() argument
1552 struct mapent *me; in parse_special()
1590 me->map_fs = mfs;
1686 free_mapent(me) in free_mapent() argument
1687 struct mapent *me; in free_mapent()
1692 while (me) {
1693 while (me->map_fs) {
1694 mfs = me->map_fs;
1703 me->map_fs = mfs->mfs_next;
1707 if (me->map_root)
1708 free(me->map_root);
1709 if (me->map_mntpnt)
1710 free(me->map_mntpnt);
1711 if (me->map_mntopts)
1712 free(me->map_mntopts);
1713 if (me->map_fstype)
1714 free(me->map_fstype);
1715 if (me->map_mounter)
1716 free(me->map_mounter);
1717 if (me->map_fsw)
1718 free(me->map_fsw);
1719 if (me->map_fswq)
1720 free(me->map_fswq);
1722 m = me;
1723 me = me->map_next;
1737 struct mapent *me; in trace_mapents() local
1740 for (me = mapents; me; me = me->map_next) { in trace_mapents()
1742 me->map_fstype ? me->map_fstype : "", in trace_mapents()
1743 me->map_mounter ? me->map_mounter : "", in trace_mapents()
1744 me->map_root ? me->map_root : "", in trace_mapents()
1745 me->map_mntpnt ? me->map_mntpnt : "", in trace_mapents()
1746 me->map_mntopts ? me->map_mntopts : ""); in trace_mapents()
1747 for (mfs = me->map_fs; mfs; mfs = mfs->mfs_next) in trace_mapents()
1753 me->map_fsw ? me->map_fsw:"", in trace_mapents()
1754 me->map_fswq ? me->map_fsw:""); in trace_mapents()
1756 me->map_mntlevel, in trace_mapents()
1757 me->map_modified ? "modify=TRUE":"modify=FALSE", in trace_mapents()
1758 me->map_faked ? "faked=TRUE":"faked=FALSE", in trace_mapents()
1759 me->map_err); in trace_mapents()
1817 struct mapent *me, *ms, *mp; local
2023 me = NULL;
2026 mp = me;
2027 me = (struct mapent *)malloc(sizeof (*me));
2028 if (me == NULL)
2030 (void) memset((char *)me, 0, sizeof (*me));
2033 ms = me;
2035 mp->map_next = me;
2043 me->map_root = strdup(name);
2044 if (me->map_root == NULL)
2053 me->map_mntpnt = strdup(name);
2054 if (me->map_mntpnt == NULL)
2057 me->map_fstype = strdup(fstype);
2058 if (me->map_fstype == NULL)
2060 me->map_mounter = strdup(mounter);
2061 if (me->map_mounter == NULL)
2063 me->map_mntopts = strdup(entryopts);
2064 if (me->map_mntopts == NULL)
2071 me->map_fs = mfs;
2080 me->map_mntlevel = -1;
2081 me->map_modified = FALSE;
2082 me->map_faked = FALSE;
2134 static void dump_mapent_err(struct mapent *me, char *key, char *mapname) in dump_mapent_err() argument
2136 switch (me->map_err) { in dump_mapent_err()
2145 me->map_mntpnt, mapname, key, uatfs_err); in dump_mapent_err()