Lines Matching refs:me

237 	struct mapent *me = NULL;  in mapline_to_mapent()  local
284 mp = me; in mapline_to_mapent()
285 if ((me = (struct mapent *)malloc(sizeof (*me))) == NULL) in mapline_to_mapent()
287 (void) memset((char *)me, 0, sizeof (*me)); in mapline_to_mapent()
289 *mapents = me; in mapline_to_mapent()
291 mp->map_next = me; in mapline_to_mapent()
305 if ((me->map_root = strdup(w1)) == NULL) in mapline_to_mapent()
310 me->map_mntpnt = strdup(""); in mapline_to_mapent()
312 me->map_mntpnt = strdup(w); in mapline_to_mapent()
313 if (me->map_mntpnt == NULL) in mapline_to_mapent()
330 if ((me->map_mntopts = strdup(w)) == NULL) in mapline_to_mapent()
357 if (((me->map_fsw = strdup(w)) == NULL) || in mapline_to_mapent()
358 ((me->map_fswq = strdup(wq)) == NULL)) in mapline_to_mapent()
370 len = strlen(me->map_fsw) + strlen(w) + 4; in mapline_to_mapent()
373 sprintf(fsw, "%s %s", me->map_fsw, w); in mapline_to_mapent()
374 free(me->map_fsw); in mapline_to_mapent()
375 me->map_fsw = fsw; in mapline_to_mapent()
376 len = strlen(me->map_fswq) + strlen(wq) + 4; in mapline_to_mapent()
379 sprintf(fswq, "%s %s", me->map_fswq, wq); in mapline_to_mapent()
380 free(me->map_fswq); in mapline_to_mapent()
381 me->map_fswq = fswq; in mapline_to_mapent()
387 me->map_mntlevel = -1; in mapline_to_mapent()
388 me->map_modified = FALSE; in mapline_to_mapent()
389 me->map_faked = FALSE; in mapline_to_mapent()
390 me->map_err = MAPENT_NOERR; in mapline_to_mapent()
392 me->map_next = NULL; in mapline_to_mapent()
435 struct mapent *me = mapents; in hierarchical_sort() local
449 while (me != NULL) { in hierarchical_sort()
451 path = me->map_mntpnt; in hierarchical_sort()
513 prevnode->mapent = me; in hierarchical_sort()
514 me = me->map_next; in hierarchical_sort()
539 struct mapent *me = NULL; in push_options() local
543 me = node->mapent; in push_options()
544 if (me != NULL) { /* not all nodes point to a mapentry */ in push_options()
545 me->map_err = err; in push_options()
546 if ((rc = set_mapent_opts(me, me->map_mntopts, in push_options()
578 set_mapent_opts(struct mapent *me, char *opts, char *defaultopts, in set_mapent_opts() argument
603 if (me->map_mntopts != NULL) in set_mapent_opts()
604 free(me->map_mntopts); in set_mapent_opts()
605 if ((me->map_mntopts = strdup(entryopts)) == NULL) in set_mapent_opts()
614 (strcmp(me->map_mntopts, NO_OPTS) == 0)) { in set_mapent_opts()
615 free(me->map_mntopts); in set_mapent_opts()
616 if ((rc = fstype_opts(me, opts, defaultopts, in set_mapent_opts()
622 if (((me->map_fstype = strdup(fstype)) == NULL) || in set_mapent_opts()
623 ((me->map_mounter = strdup(mounter)) == NULL)) { in set_mapent_opts()
624 if (me->map_fstype != NULL) in set_mapent_opts()
625 free(me->map_fstype); in set_mapent_opts()
682 fstype_opts(struct mapent *me, char *opts, char *defaultopts, in fstype_opts() argument
704 me->map_mntopts = strdup(pushentryopts); in fstype_opts()
706 if (!me->map_mntopts) { in fstype_opts()
733 struct mapent *me; in modify_mapents() local
750 me = *mapents; in modify_mapents()
751 while (me->map_next != NULL) in modify_mapents()
752 me = me->map_next; in modify_mapents()
753 me->map_next = faked_mapents; in modify_mapents()
758 me = *mapents; in modify_mapents()
759 while (me != NULL) { in modify_mapents()
760 if ((me->map_mntlevel == -1) || (me->map_err) || in modify_mapents()
761 (mount_access == FALSE && me->map_mntlevel == 0)) { in modify_mapents()
765 if (me->map_err) in modify_mapents()
766 dump_mapent_err(me, key, mapname); in modify_mapents()
768 if (me == (*mapents)) { in modify_mapents()
770 *mapents = me->map_next; in modify_mapents()
780 me->map_next = NULL; in modify_mapents()
781 free_mapent(me); in modify_mapents()
782 me = *mapents; in modify_mapents()
784 mp->map_next = me->map_next; in modify_mapents()
785 me->map_next = NULL; in modify_mapents()
786 free_mapent(me); in modify_mapents()
787 me = mp->map_next; in modify_mapents()
796 if (me->map_mntlevel == 1 && in modify_mapents()
797 (strcmp(me->map_fstype, MNTTYPE_AUTOFS) != 0) && in modify_mapents()
798 (me->map_faked != TRUE)) { in modify_mapents()
799 if ((rc = convert_mapent_to_automount(me, mapname, in modify_mapents()
803 strcpy(w, (me->map_mntpnt+strlen(subdir))); in modify_mapents()
804 strcpy(me->map_mntpnt, w); in modify_mapents()
805 mp = me; in modify_mapents()
806 me = me->map_next; in modify_mapents()
1009 struct mapent *me; in mark_and_fake_level1_noroot() local
1040 if ((me = (struct mapent *)malloc(sizeof (*me))) in mark_and_fake_level1_noroot()
1046 (void) memset((char *)me, 0, sizeof (*me)); in mark_and_fake_level1_noroot()
1048 if ((me->map_fs = (struct mapfs *) in mark_and_fake_level1_noroot()
1051 (void) memset(me->map_fs, 0, sizeof (struct mapfs)); in mark_and_fake_level1_noroot()
1059 me->map_root = strdup(w1); in mark_and_fake_level1_noroot()
1063 me->map_mntpnt = strdup(faked_map_mntpnt); in mark_and_fake_level1_noroot()
1064 me->map_fstype = strdup(MNTTYPE_AUTOFS); in mark_and_fake_level1_noroot()
1065 me->map_mounter = strdup(MNTTYPE_AUTOFS); in mark_and_fake_level1_noroot()
1068 if ((rc = automount_opts(&me->map_mntopts, mapopts)) in mark_and_fake_level1_noroot()
1071 me->map_fs->mfs_dir = strdup(mapname); in mark_and_fake_level1_noroot()
1072 me->map_mntlevel = 1; in mark_and_fake_level1_noroot()
1073 me->map_modified = FALSE; in mark_and_fake_level1_noroot()
1074 me->map_faked = TRUE; /* mark as faked */ in mark_and_fake_level1_noroot()
1075 if (me->map_root == NULL || in mark_and_fake_level1_noroot()
1076 me->map_mntpnt == NULL || in mark_and_fake_level1_noroot()
1077 me->map_fstype == NULL || in mark_and_fake_level1_noroot()
1078 me->map_mounter == NULL || in mark_and_fake_level1_noroot()
1079 me->map_mntopts == NULL || in mark_and_fake_level1_noroot()
1080 me->map_fs->mfs_dir == NULL) { in mark_and_fake_level1_noroot()
1088 *faked_mapents = me; in mark_and_fake_level1_noroot()
1090 me->map_next = *faked_mapents; in mark_and_fake_level1_noroot()
1091 *faked_mapents = me; in mark_and_fake_level1_noroot()
1093 node->mapent = me; in mark_and_fake_level1_noroot()
1110 convert_mapent_to_automount(struct mapent *me, char *mapname, in convert_mapent_to_automount() argument
1113 struct mapfs *mfs = me->map_fs; /* assumes it exists */ in convert_mapent_to_automount()
1121 while (me->map_fs->mfs_next != NULL) { in convert_mapent_to_automount()
1122 mfs = me->map_fs->mfs_next; in convert_mapent_to_automount()
1127 me->map_fs->mfs_next = mfs->mfs_next; /* nulls eventually */ in convert_mapent_to_automount()
1132 if (me->map_fstype) in convert_mapent_to_automount()
1133 free(me->map_fstype); in convert_mapent_to_automount()
1134 if ((me->map_fstype = strdup(MNTTYPE_AUTOFS)) == NULL) in convert_mapent_to_automount()
1137 if (me->map_mounter) in convert_mapent_to_automount()
1138 free(me->map_mounter); in convert_mapent_to_automount()
1139 if ((me->map_mounter = strdup(me->map_fstype)) == NULL) in convert_mapent_to_automount()
1142 if (me->map_fs->mfs_dir) in convert_mapent_to_automount()
1143 free(me->map_fs->mfs_dir); in convert_mapent_to_automount()
1144 if ((me->map_fs->mfs_dir = strdup(mapname)) == NULL) in convert_mapent_to_automount()
1148 if (me->map_mntopts) in convert_mapent_to_automount()
1149 free(me->map_mntopts); in convert_mapent_to_automount()
1150 if ((rc = automount_opts(&me->map_mntopts, mapopts)) != PARSE_OK) in convert_mapent_to_automount()
1154 me->map_modified = TRUE; in convert_mapent_to_automount()
1236 struct mapent *me = mapents; in parse_fsinfo() local
1242 while (me != NULL) { in parse_fsinfo()
1245 if (strcmp(me->map_fstype, MNTTYPE_NFS) == 0) { in parse_fsinfo()
1246 err = parse_nfs(mapname, me, me->map_fsw, in parse_fsinfo()
1247 me->map_fswq, &bufp, &bufq, wordsz); in parse_fsinfo()
1249 err = parse_special(me, me->map_fsw, me->map_fswq, in parse_fsinfo()
1253 if (err != PARSE_OK || *me->map_fsw != '\0' || in parse_fsinfo()
1254 *me->map_fswq != '\0') { in parse_fsinfo()
1259 me->map_fsw); in parse_fsinfo()
1263 me = me->map_next; in parse_fsinfo()
1284 parse_nfs(mapname, me, fsw, fswq, lp, lq, wsize) in parse_nfs() argument
1285 struct mapent *me; in parse_nfs()
1302 mfsp = &me->map_fs;
1517 parse_special(me, w, wq, lp, lq, wsize) in parse_special() argument
1518 struct mapent *me; in parse_special()
1556 me->map_fs = mfs;
1652 free_mapent(me) in free_mapent() argument
1653 struct mapent *me; in free_mapent()
1658 while (me) {
1659 while (me->map_fs) {
1660 mfs = me->map_fs;
1669 me->map_fs = mfs->mfs_next;
1673 if (me->map_root)
1674 free(me->map_root);
1675 if (me->map_mntpnt)
1676 free(me->map_mntpnt);
1677 if (me->map_mntopts)
1678 free(me->map_mntopts);
1679 if (me->map_fstype)
1680 free(me->map_fstype);
1681 if (me->map_mounter)
1682 free(me->map_mounter);
1683 if (me->map_fsw)
1684 free(me->map_fsw);
1685 if (me->map_fswq)
1686 free(me->map_fswq);
1688 m = me;
1689 me = me->map_next;
1703 struct mapent *me; in trace_mapents() local
1706 for (me = mapents; me; me = me->map_next) { in trace_mapents()
1708 me->map_fstype ? me->map_fstype : "", in trace_mapents()
1709 me->map_mounter ? me->map_mounter : "", in trace_mapents()
1710 me->map_root ? me->map_root : "", in trace_mapents()
1711 me->map_mntpnt ? me->map_mntpnt : "", in trace_mapents()
1712 me->map_mntopts ? me->map_mntopts : ""); in trace_mapents()
1713 for (mfs = me->map_fs; mfs; mfs = mfs->mfs_next) in trace_mapents()
1719 me->map_fsw ? me->map_fsw:"", in trace_mapents()
1720 me->map_fswq ? me->map_fsw:""); in trace_mapents()
1722 me->map_mntlevel, in trace_mapents()
1723 me->map_modified ? "modify=TRUE":"modify=FALSE", in trace_mapents()
1724 me->map_faked ? "faked=TRUE":"faked=FALSE", in trace_mapents()
1725 me->map_err); in trace_mapents()
1783 struct mapent *me, *ms, *mp; local
1964 me = NULL;
1967 mp = me;
1968 me = (struct mapent *)malloc(sizeof (*me));
1969 if (me == NULL)
1971 (void) memset((char *)me, 0, sizeof (*me));
1974 ms = me;
1976 mp->map_next = me;
1984 me->map_root = strdup(name);
1985 if (me->map_root == NULL)
1994 me->map_mntpnt = strdup(name);
1995 if (me->map_mntpnt == NULL)
1998 me->map_fstype = strdup(fstype);
1999 if (me->map_fstype == NULL)
2001 me->map_mounter = strdup(mounter);
2002 if (me->map_mounter == NULL)
2004 me->map_mntopts = strdup(entryopts);
2005 if (me->map_mntopts == NULL)
2012 me->map_fs = mfs;
2021 me->map_mntlevel = -1;
2022 me->map_modified = FALSE;
2023 me->map_faked = FALSE;
2075 static void dump_mapent_err(struct mapent *me, char *key, char *mapname) in dump_mapent_err() argument
2077 switch (me->map_err) { in dump_mapent_err()
2086 me->map_mntpnt, mapname, key, uatfs_err); in dump_mapent_err()