Lines Matching defs:ulp

1283 	struct uuidlist *ulp;
1288 TAILQ_FOREACH(ulp, &ulhead, ul_list) {
1290 strcmp(fsb->f_mntfromname, ulp->ul_mntfromname))
1293 strcmp(fsb->f_mntonname, ulp->ul_mntonname))
1296 bcopy(&ulp->ul_uuid, uuid, sizeof(ulp->ul_uuid));
1299 return (ulp);
1308 struct uuidlist *ulp;
1310 TAILQ_FOREACH(ulp, &ulhead, ul_list) {
1311 if (!bcmp(ulp->ul_uuid, uuid, sizeof(ulp->ul_uuid)))
1314 return (ulp);
1323 struct uuidlist *ulp;
1325 TAILQ_FOREACH(ulp, &ulhead, ul_list) {
1326 if (ulp->ul_fsid == fsid)
1329 return (ulp);
1381 struct uuidlist *ulp;
1396 if ((ulp = get_uuid_from_list(fsb, uuid, UL_CHECK_MNTON))) {
1405 if (!ulp->ul_davalid)
1407 else if (bcmp(ulp->ul_dauuid, dauuid, sizeof(dauuid)))
1412 if (ulp->ul_davalid) {
1418 uuidstring(ulp->ul_dauuid, buf);
1426 uuidstring(ulp->ul_dauuid, buf);
1431 if (ulp->ul_exported) {
1454 TAILQ_REMOVE(&ulhead, ulp, ul_list);
1455 free(ulp);
1456 ulp = NULL;
1458 ulp->ul_exported = 1;
1482 if (!ulp) {
1486 while ((ulp = find_uuid(uuid))) {
1490 fsb->f_mntonname, ulp->ul_mntonname, buf);
1497 ulp = add_uuid_to_list(fsb, (davalid ? dauuid : NULL), uuid);
1498 if (!ulp) {
1501 ulp->ul_exported = 1;
1503 } else if (!ulp->ul_mntfromname[0]) {
1506 * mountdexptab, it's possible this ulp doesn't
1511 strlcpy(ulp->ul_mntfromname, fsb->f_mntfromname, sizeof(ulp->ul_mntfromname));
1519 return (ulp);
1528 struct uuidlist *ulp;
1530 TAILQ_FOREACH(ulp, &ulhead, ul_list) {
1531 ulp->ul_exported = 0;
1573 struct uuidlist *ulp;
1582 TAILQ_FOREACH(ulp, &ulhead, ul_list) {
1584 if (!ulp->ul_exported)
1587 if (ulp->ul_davalid)
1588 uuidstring(ulp->ul_dauuid, buf);
1591 uuidstring(ulp->ul_uuid, buf2);
1592 fprintf(ulfile, "%s %s 0x%08X %s\n", buf, buf2, ulp->ul_fsid, ulp->ul_mntonname);
1593 LIST_FOREACH(xid, &ulp->ul_exportids, xid_list) {
1607 struct uuidlist *ulp;
1626 ulp = NULL;
1635 if (!ulp) {
1670 LIST_INSERT_HEAD(&ulp->ul_exportids, xid, xid_list);
1673 ulp = malloc(sizeof(*ulp));
1674 if (ulp == NULL) {
1678 bzero(ulp, sizeof(*ulp));
1679 LIST_INIT(&ulp->ul_exportids);
1683 ulp->ul_davalid = 0;
1684 bzero(ulp->ul_dauuid, sizeof(ulp->ul_dauuid));
1688 ulp->ul_davalid = 1;
1689 for (i=0; i < (int)sizeof(ulp->ul_dauuid); i++, cp+=2) {
1695 free(ulp);
1696 ulp = NULL;
1699 ulp->ul_dauuid[i] = HEXSTRTOI(cp);
1702 if (ulp == NULL)
1705 for (i=0; i < (int)sizeof(ulp->ul_uuid); i++, cp+=2) {
1711 free(ulp);
1712 ulp = NULL;
1715 ulp->ul_uuid[i] = HEXSTRTOI(cp);
1717 if (ulp == NULL)
1722 free(ulp);
1726 if (sscanf(cp, "%i", &ulp->ul_fsid) != 1) {
1729 free(ulp);
1737 free(ulp);
1741 strncpy(ulp->ul_mntonname, cp, MAXPATHLEN);
1742 ulp->ul_mntonname[MAXPATHLEN-1] = '\0';
1745 if (!check_dirpath(ulp->ul_mntonname) ||
1746 (statfs(ulp->ul_mntonname, &fsb) < 0) ||
1747 strcmp(ulp->ul_mntonname, fsb.f_mntonname)) {
1751 ulp->ul_mntonname, linenum, _PATH_MOUNTEXPLIST);
1752 ulp->ul_mntfromname[0] = '\0';
1753 TAILQ_INSERT_TAIL(&ulhead, ulp, ul_list);
1758 strncpy(ulp->ul_mntfromname, fsb.f_mntfromname, MAXPATHLEN);
1759 ulp->ul_mntfromname[MAXPATHLEN-1] = '\0';
1765 davalid = get_uuid_from_diskarb(ulp->ul_mntfromname, dauuid);
1767 if (!ulp->ul_davalid)
1769 else if (bcmp(ulp->ul_dauuid, dauuid, sizeof(dauuid)))
1774 if (ulp->ul_davalid) {
1780 uuidstring(ulp->ul_dauuid, buf);
1789 uuidstring(ulp->ul_dauuid, buf);
1795 ulp->ul_mntonname, buf, buf2);
1796 free(ulp);
1800 TAILQ_INSERT_TAIL(&ulhead, ulp, ul_list);
1806 find_export_id(struct uuidlist *ulp, u_int32_t id)
1810 LIST_FOREACH(xid, &ulp->ul_exportids, xid_list) {
1819 get_export_id(struct uuidlist *ulp, char *path)
1824 LIST_FOREACH(xid, &ulp->ul_exportids, xid_list) {
1841 while (find_export_id(ulp, xid->xid_id)) {
1846 ulp->ul_mntonname);
1851 LIST_INSERT_HEAD(&ulp->ul_exportids, xid, xid_list);
1864 struct uuidlist *ulp;
1866 ulp = TAILQ_FIRST(&ulhead);
1867 while (ulp) {
1869 while (ulp && fsuuid) {
1870 if (ulp->ul_davalid && !bcmp(ulp->ul_dauuid, fsuuid, sizeof(ulp->ul_dauuid)))
1872 if (!bcmp(ulp->ul_uuid, fsuuid, sizeof(ulp->ul_uuid)))
1874 ulp = TAILQ_NEXT(ulp, ul_list);
1876 if (!ulp)
1879 if (!fspath || !strcmp(ulp->ul_mntonname, fspath))
1881 ulp = TAILQ_NEXT(ulp, ul_list);
1884 return (ulp);
1899 struct uuidlist *ulp, *bestulp;
1930 TAILQ_FOREACH(ulp, &ulhead, ul_list) {
1931 if (subdir_check(ulp->ul_mntonname, path) < 0)
1933 len = strlen(ulp->ul_mntonname);
1935 bestulp = ulp;
1936 bestlen = strlen(ulp->ul_mntonname);
2003 struct uuidlist *ulp, *bestulp;
2072 ulp = NULL;
2373 if (!(ulp = get_uuid(&fsb, uuid))) {
2397 ulp = bestulp;
2398 mntonname = ulp->ul_mntonname;
2399 bcopy(ulp->ul_uuid, uuid, sizeof(uuid));
2417 xf->xf_fsid = ulp->ul_fsid;
2510 xid = get_export_id(ulp, subdir);