| /xnu-12377.81.4/tools/tests/personas/ |
| H A D | persona_test_run_src.sh | 155 local file="${TMPDIR}/plookup" 157 ${PERSONA_MGR} lookup ${largs} > "${file}" 160 _ID=$(cat "${file}" | grep "+id: " | head -1 | sed 's/.*+id:[ ]*\([0-9][0-9]*\).*/\1/') 163 local type=$(cat "${file}" | grep "+type: " | head -1 | sed 's/.*+type:[ ]*\([0-9][0-9]*\).*/\1/') 180 _LOGIN=$(cat "${file}" | grep "+login: " | head -1 | sed 's/.*+login:[ ]*"\([^"]*\)".*/\1/') 196 local file=$1 208 local cpid="$(cat "$file" | grep "Child: PID:" | sed 's/.*Child: PID:\([0-9][0-9]*\).*/\1/')" 212 …l=( $(cat "$file" | grep "Child: Persona:" | sed 's/.*Child: Persona: \([0-9][0-9]*\) (err:\([0-9]… 224 …l=( $(cat "$file" | grep "Child: UID:" | sed 's/.*UID:\([0-9][0-9]*\), GID:\([0-9][0-9]*\).*/\1 \2… 261 local file="child.${pna_id}.u$uid" [all …]
|
| /xnu-12377.81.4/tests/vfs/ |
| H A D | unlinkat_nodeletebusy.c | 49 static char file[PATH_MAX]; variable 61 if (file[0] != '\0') { in cleanup() 62 unlink(file); in cleanup() 74 file[0] = '\0'; 84 snprintf(file, sizeof(file), "%s/%s", testdir, "file"); 89 T_ASSERT_POSIX_SUCCESS((fd = open(file, O_CREAT | O_RDWR, 0777)), "Creating test file"); 92 T_ASSERT_POSIX_SUCCESS(unlinkat(AT_FDCWD, file, 0), "Unlinking when file is opened"); 98 T_ASSERT_POSIX_SUCCESS((fd = open(file, O_CREAT | O_RDWR, 0777)), "Creating test file"); 101 …T_ASSERT_POSIX_FAILURE(unlinkat(AT_FDCWD, file, AT_NODELETEBUSY), EBUSY, "Unlinking when file is o… 107 …T_ASSERT_POSIX_SUCCESS(unlinkat(AT_FDCWD, file, AT_NODELETEBUSY), "Unlinking when file is NOT open…
|
| H A D | sandbox_fstat.c | 43 static char file[PATH_MAX], file_rsrcfork[PATH_MAX]; variable 64 if (file[0] != '\0') { in cleanup() 65 unlink(file); in cleanup() 79 file); in create_profile_string() 89 …T_EXPECT_POSIX_FAILURE(stat(file, &sb), expected_error, "Calling stat() should FAIL with '%s'", st… in do_test() 91 T_EXPECT_POSIX_SUCCESS(stat(file, &sb), "Calling stat() for the file should PASS"); in do_test() 95 …T_EXPECT_POSIX_SUCCESS(fd = open(file, O_CREAT | O_WRONLY, 0666), "Opening with the O_CREAT | O_WR… in do_test() 124 file[0] = '\0'; 137 snprintf(file, sizeof(file), "%s/%s", testdir_path, "file"); 138 snprintf(file_rsrcfork, sizeof(file_rsrcfork), "%s/%s", file, _PATH_RSRCFORKSPEC); [all …]
|
| H A D | open_symlink.c | 45 static char file[PATH_MAX], sym[PATH_MAX]; variable 60 if (file[0] != '\0') { in cleanup() 61 unlink(file); in cleanup() 75 file[0] = sym[0] = '\0'; 85 snprintf(file, sizeof(file), "%s/%s", testdir, "file"); 89 T_ASSERT_POSIX_SUCCESS((fd = open(file, O_CREAT | O_RDWR, 0777)), "Creating file %s", file); 92 T_ASSERT_POSIX_SUCCESS(symlink(file, sym), "Creating symlink %s -> %s", sym, file); 95 T_ASSERT_POSIX_SUCCESS(close(fd), "Closing %s", file);
|
| H A D | linkat_flags.c | 41 static char file[PATH_MAX], sym[PATH_MAX], symloop[PATH_MAX], dirloop[PATH_MAX]; variable 86 if (file[0] != '\0') { in cleanup() 87 unlink(file); in cleanup() 102 error = fstatat(AT_FDCWD, file, &buf, 0); in verify_stat() 123 file[0] = sym[0] = dirloop[0] = '\0'; 141 snprintf(file, sizeof(file), "%s/%s", testdir_path, "file"); 155 T_ASSERT_POSIX_SUCCESS((fd = open(file, O_CREAT | O_RDWR, 0777)), "Creating %s", file); 156 T_ASSERT_POSIX_SUCCESS(symlink(file, sym), "Creating symbolic link %s ---> %s", sym, file); 163 T_ASSERT_POSIX_SUCCESS(close(fd), "Closing %s", file); 169 …T_ASSERT_POSIX_SUCCESS(linkat(AT_FDCWD, file, AT_FDCWD, lfile1, 0), "Calling linkat() while name1 … [all …]
|
| H A D | named_fork_path.c | 43 static char file[PATH_MAX], file_rfork[PATH_MAX]; variable 65 if (file[0] != '\0') { in cleanup() 66 unlink(file); in cleanup() 87 file, file2); in create_profile_string() 105 file[0] = file2[0] = rsrc[0] = '\0'; 118 snprintf(file, sizeof(file), "%s/%s", testdir_path, "file"); 119 snprintf(file_rfork, sizeof(file_rfork), "%s/..namedfork/rsrc", file); 127 T_ASSERT_POSIX_SUCCESS((fd = open(file, O_CREAT | O_RDWR, 0777)), "Creating %s", file); 132 …TTR_RESOURCEFORK_NAME, xattr, xattr_len, 0, 0), "Setting ResourceFork of %s to '%s'", file, xattr); 170 T_ASSERT_POSIX_SUCCESS(close(fd), "Closing %s", file);
|
| H A D | sandbox_appledouble_write.c | 50 static char file[PATH_MAX], file2[PATH_MAX]; variable 71 if (file[0] != '\0') { in cleanup() 72 unlink(file); in cleanup() 91 file, file2); in create_profile_string() 102 file[0] = file2[0] = '\0'; 129 snprintf(file, sizeof(file), "%s/%s", testdir_path, FILE);
|
| /xnu-12377.81.4/tools/lldbmacros/lint/ |
| H A D | syntax_checker.py | 24 print("Error: Unknown arguments", file=sys.stderr) 29 print("Error: Cannot recognize %s as a file" % fname, file=sys.stderr) 41 print("Error: Found a TAB character at %s:%d" % (fname, lineno), file=sys.stderr) 44 print("Error: Found a non ascii character at %s:%d" % (fname, lineno), file=sys.stderr) 47 … print("Error: Syntax check failed. Please fix the errors and try again.", file=sys.stderr) 51 with open(fname, 'r') as file: 52 source = file.read() + '\n' 55 print(str(exc), file=sys.stderr) 56 … print("Error: Compilation failed. Please fix the errors and try again.", file=sys.stderr)
|
| /xnu-12377.81.4/SETUP/config/ |
| H A D | mkheaders.c | 121 char *file, *name; in do_header() local 129 file = toheader(hname); in do_header() 131 inf = fopen(file, "r"); in do_header() 134 (void) unlink(file); in do_header() 135 outf = fopen(file, "w"); in do_header() 137 perror(file); in do_header() 142 file = path("meta_features.h"); in do_header() 143 outf = fopen(file, "a"); in do_header() 145 perror(file); in do_header() 193 unlink(file); in do_header() [all …]
|
| H A D | openp.c | 58 int openp(const char *fpath, char *file, char *complete, int flags, int mode); 79 openp(const char *fpath, char *file, char *complete, int flags, int mode) in openp() argument 83 if (searchp(fpath, file, complete, func) < 0) { in openp() 90 fopenp(const char *fpath, char *file, char *complete, const char *ftype) in fopenp() argument 93 if (searchp(fpath, file, complete, ffunc) < 0) { in fopenp()
|
| H A D | searchp.c | 68 searchp(const char *spath, char *file, char *fullname, int (*func)(char *)) in searchp() argument 74 nextpath = ((*file == '/') ? "" : spath); in searchp() 81 if (nextchar != nextpath && *file) { in searchp() 86 nextchar = file; /* append file */ in searchp()
|
| /xnu-12377.81.4/libkern/kxld/ |
| H A D | kxld_util.c | 55 static void unswap_macho_32(u_char *file, enum NXByteOrder host_order, 57 static void unswap_macho_64(u_char *file, enum NXByteOrder host_order, 283 validate_and_swap_macho_32(u_char *file, u_long size in validate_and_swap_macho_32() argument 290 struct mach_header *mach_hdr = (struct mach_header *) ((void *) file); in validate_and_swap_macho_32() 306 check(file); in validate_and_swap_macho_32() 343 load_hdr = (struct load_command *) ((void *) (file + offset)); in validate_and_swap_macho_32() 405 relocs = (struct relocation_info *) ((void *) (file + sects[j].reloff)); in validate_and_swap_macho_32() 437 symtab = (struct nlist *) ((void *) (file + symtab_hdr->symoff)); in validate_and_swap_macho_32() 464 validate_and_swap_macho_64(u_char *file, u_long size in validate_and_swap_macho_64() argument 471 struct mach_header_64 *mach_hdr = (struct mach_header_64 *) ((void *) file); in validate_and_swap_macho_64() [all …]
|
| /xnu-12377.81.4/libkern/libkern/ |
| H A D | zlib.h | 1143 ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); 1151 ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); 1159 ZEXTERN int ZEXPORT gzwrite OF((gzFile file, 1167 ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...)); 1180 ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); 1187 ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); 1196 ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); 1202 ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); 1208 ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); 1218 ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); [all …]
|
| /xnu-12377.81.4/osfmk/ipc/ |
| H A D | mig_log.c | 103 char *file, in MigEventTracer() argument 109 size, kpd, retcode, ports, oolports, ool, file, line); in MigEventTracer() 119 char *file, in MigEventErrors() argument 123 printf("%d|%d|%d -- %s %d\n", who, what, *(int *)par, file, line); in MigEventErrors() 125 printf("%d|%d|%s -- %s %d\n", who, what, (char *)par, file, line); in MigEventErrors()
|
| /xnu-12377.81.4/tests/nvram_tests/ |
| H A D | run_tests.py | 93 for file in os.listdir(file_path): 94 if file.endswith(".c") and "helper" not in file: 95 test_files.append(file.rsplit(".", maxsplit=1)[0]) 111 for file in os.listdir(build_path): 112 if not file.endswith(".dSYM"): 113 test_files.append(file)
|
| /xnu-12377.81.4/EXTERNAL_HEADERS/corecrypto/ |
| H A D | cc_macros.h | 31 CC_UNUSED static char *cc_strstr(const char *file) { in cc_strstr() argument 33 (void) file; in cc_strstr() 36 char *p=strstr(file, cc_char); in cc_strstr() 42 #define __CC_DEBUG_REQUIRE_MESSAGE(name, assertion, label, message, file, line, value) \ argument 43 {char *___t = cc_strstr(file); cc_printf( "require: %s, %s%s:%d\n", assertion, (message!=0) ? messa…
|
| /xnu-12377.81.4/osfmk/corecrypto/ |
| H A D | cc_macros.h | 56 cc_strstr(const char *file) in cc_strstr() argument 59 (void) file; in cc_strstr() 62 char *p = strstr(file, cc_char); in cc_strstr() 70 #define __CC_DEBUG_REQUIRE_MESSAGE(name, assertion, label, message, file, line, value) \ argument 71 {char *___t = cc_strstr(file); cc_printf( "require: %s, %s%s:%d\n", assertion, (message!=0) ? messa…
|
| /xnu-12377.81.4/ |
| H A D | README.md | 117 of their `System/Library/Extensions/System.kext/Info.plist` file. 164 2. Copy exiting boot configurations to alternate file 220 The directory containing the header file should have a Makefile that 222 If you are adding the first header file in a directory, you will need to 225 Add your header file to the correct file list depending on where you want 227 from each file list are - 229 a. `DATAFILES` : To make header file available in user level - 233 b. `DRIVERKIT_DATAFILES` : To make header file available to DriverKit userspace drivers - 236 c. `PRIVATE_DATAFILES` : To make header file available to Apple internal in 240 d. `EMBEDDED_PRIVATE_DATAFILES` : To make header file available in user [all …]
|
| /xnu-12377.81.4/bsd/sys/ |
| H A D | kernel_types.h | 54 struct file; 55 typedef struct file * file_t; 56 __CCT_DECLARE_CONSTRAINED_PTR_TYPES(struct file, file); 127 typedef struct file * file_t; 128 __CCT_DECLARE_CONSTRAINED_PTR_TYPES(struct file, file);
|
| /xnu-12377.81.4/tests/ |
| H A D | poll.c | 56 int file, dir, pipes[2]; variable 63 file = open(LAUNCHD_PATH, O_RDONLY | O_NONBLOCK); 64 T_QUIET; T_ASSERT_POSIX_SUCCESS(file, "open(%s)", LAUNCHD_PATH); 76 pfd[0].fd = file; pfd[0].revents = 0; 86 pfd[1].fd = file; pfd[1].revents = 0; 94 pfd[0].fd = file; pfd[0].revents = 0; 103 pfd[0].fd = file; pfd[0].revents = 0;
|
| /xnu-12377.81.4/osfmk/mach/ |
| H A D | doubleagent_mig.defs | 6 * This file contains Original Code and/or Modifications of Original Code 8 * Version 2.0 (the 'License'). You may not use this file except in 16 * http://www.opensource.apple.com/apsl/ and read it before using this file. 56 in file_size : int64_t; /* AD file size */ 66 in file_size : int64_t; /* AD file size */ 77 in file_size : int64_t; /* AD file size */ 85 in file_size : int64_t; /* AD file size */ 88 out is_empty : boolean_t /* true if we've removed the last xattr in file */
|
| H A D | mach_notify.defs | 6 * This file contains Original Code and/or Modifications of Original Code 8 * Version 2.0 (the 'License'). You may not use this file except in 16 * http://www.opensource.apple.com/apsl/ and read it before using this file. 29 * The mach/notify.h file is hand-crafted. 32 * routines to send Mach notifications. This file exists simply to give
|
| /xnu-12377.81.4/config/ |
| H A D | newvers.pl | 165 my $file; 166 foreach $file (@ARGV) { 167 print "newvers.pl: Stamping version \"$VERSION_LONG\" into \"$file\" ..."; 168 my $data = &ReadFile($file); 183 &WriteFile($file, $data);
|
| /xnu-12377.81.4/tools/ |
| H A D | symbolify.py | 22 def nm(file): argument 23 cmd = "nm %s" % file 28 def __init__(self, file, min_width=16): argument 30 self.symbols = [parse_nm_output(l) for l in nm(file)]
|
| /xnu-12377.81.4/tests/unit/ |
| H A D | README.md | 32 - Add a `<test-name>.c` file in this directory with the test code. 33 - In the added .c file, add a line that looks like `#define UT_MODULE osfmk` 71 file at the root of the repository so that IDEs that support this file (VSCode, CLion) know about t… 78 This reads the `compile_commands.json` file and generates an Xcode project named `ut_xnu_proj.xcode… 94 This reads the `compile_commands.json` file and generates a `.vscode/launch.json` file for VSCode t… 96 (if you have such existing file it will be overwritten) 111 This reads the `compile_commands.json` file and edits the files in `.idea` for CLion to know about 133 2. Run the unit-test and tell the coverage lib where to save the .profraw file: 137 3. Convert the .profraw file to .profdata file: 143 High-level per-file textual report: [all …]
|