Lines Matching defs:path

324 my_GetFileInformationByName(const char *path, BY_HANDLE_FILE_INFORMATION *bhfi)
330 h = CreateFile(path, FILE_READ_ATTRIBUTES, 0, NULL,
1892 /* Assert that path is a symlink that (optionally) contains contents. */
1895 const char *path, const char *contents, int isdir)
1897 if (is_symlink(file, line, path, contents, isdir))
1901 path, contents);
1903 failure_start(file, line, "File %s is not a symlink", path);
1934 const char *path, int mode, int csize, const void *contents)
1941 f = fopen(path, "wb");
1943 failure_start(file, line, "Could not create file %s", path);
1957 "Could not write file %s", path);
1967 fd = open(path, O_CREAT | O_WRONLY, mode >= 0 ? mode : 0644);
1969 failure_start(file, line, "Could not create %s", path);
1973 if (0 != chmod(path, mode)) {
1974 failure_start(file, line, "Could not chmod %s", path);
1989 "Could not write to %s", path);
1996 assertion_file_mode(file, line, path, mode);
2656 const char *path = "cannodumptest";
2659 assertion_make_file(__FILE__, __LINE__, path, 0644, 0, NULL);
2660 if (chflags(path, UF_NODUMP) < 0)
2662 if (stat(path, &sb) < 0)
2670 const char *path = "cannodumptest";
2673 assertion_make_file(__FILE__, __LINE__, path, 0644, 0, NULL);
2674 fd = open(path, O_RDONLY | O_NONBLOCK);
2701 fd = open(path, O_RDONLY | O_NONBLOCK);
2724 /* Get extended attribute value from a path */
2726 getXattr(const char *path, const char *name, size_t *sizep)
2732 size = lgetxattr(path, name, NULL, 0);
2734 size = getxattr(path, name, NULL, 0, 0, XATTR_NOFOLLOW);
2736 size = lgetea(path, name, NULL, 0);
2738 size = extattr_get_link(path, EXTATTR_NAMESPACE_USER, name + 5,
2745 size = lgetxattr(path, name, value, size);
2747 size = getxattr(path, name, value, size, 0, XATTR_NOFOLLOW);
2749 size = lgetea(path, name, value, size);
2751 size = extattr_get_link(path, EXTATTR_NAMESPACE_USER, name + 5,
2764 (void)path; /* UNUSED */
2772 * Set extended attribute on a path
2776 setXattr(const char *path, const char *name, const void *value, size_t size)
2780 if (lsetxattr(path, name, value, size, 0) == 0)
2782 if (setxattr(path, name, value, size, 0, XATTR_NOFOLLOW) == 0)
2784 if (lsetea(path, name, value, size, 0) == 0)
2786 if (extattr_set_link(path, EXTATTR_NAMESPACE_USER, name + 5, value,
2793 (void)path; /* UNUSED */
2804 sunacl_get(int cmd, int *aclcnt, int fd, const char *path)
2829 if (path != NULL)
2830 cnt = acl(path, cntcmd, 0, NULL);
2840 if (path != NULL)
2841 cnt = acl(path, cmd, cnt, aclp);
2858 * Set test ACLs on a path
2865 setTestAcl(const char *path)
2997 r = acl_set_file(path, ACL_TYPE_NFS4, acl);
3000 r = richacl_set_file(path, richacl);
3003 r = acl(path, ACE_SETACL,
3006 r = acl_set_file(path, ACL_TYPE_EXTENDED, acl);
3020 r = acl_set_file(path, ACL_TYPE_ACCESS, acl);
3023 r = acl(path, SETACL,
3036 (void)path; /* UNUSED */
3632 printf(" -p <path> Path to executable to be tested.\n");
3633 printf(" Default: path taken from " ENVBASE " environment variable.\n");
3739 printf("Use -r option to specify full path to reference directory\n");
3825 /* Fixup path for relative directories. */