Changeset 18692 for trunk/base
- Timestamp:
- Jul 23, 2006, 12:36:42 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/base/src/darwintracelib1.0/darwintrace.c
r18673 r18692 1 1 /* 2 2 * Copyright (c) 2005 Apple Computer, Inc. All rights reserved. 3 * $Id: darwintrace.c,v 1.1 3 2006/07/22 03:12:58pguyot Exp $3 * $Id: darwintrace.c,v 1.14 2006/07/23 00:36:42 pguyot Exp $ 4 4 * 5 5 * @APPLE_BSD_LICENSE_HEADER_START@ … … 80 80 * Prototypes. 81 81 */ 82 voidlog_op(const char* op, const char* procname, const char* path, int fd);83 void __darwintrace_setup();82 inline void __darwintrace_log_op(const char* op, const char* procname, const char* path, int fd); 83 inline void __darwintrace_setup(); 84 84 inline void __darwintrace_cleanup_path(char *path); 85 85 … … 147 147 * fd: a fd to the file, or 0 if we don't have any. 148 148 */ 149 voidlog_op(const char* op, const char* procname, const char* path, int fd) {149 inline void __darwintrace_log_op(const char* op, const char* procname, const char* path, int fd) { 150 150 #if !DARWINTRACE_SHOW_PROCESS 151 151 #pragma unused(procname) … … 268 268 if (__darwintrace_fd >= 0) { 269 269 dprintf("darwintrace: original open path is %s\n", path); 270 log_op("open", NULL, path, result);270 __darwintrace_log_op("open", NULL, path, result); 271 271 } 272 272 #if DARWINTRACE_LOG_CREATE … … 275 275 if (__darwintrace_fd >= 0) { 276 276 dprintf("darwintrace: original create path is %s\n", path); 277 log_op("create", NULL, path, result);277 __darwintrace_log_op("create", NULL, path, result); 278 278 } 279 279 #endif … … 299 299 if (__darwintrace_fd >= 0) { 300 300 dprintf("darwintrace: original readlink path is %s\n", path); 301 log_op("readlink", NULL, path, 0);301 __darwintrace_log_op("readlink", NULL, path, 0); 302 302 } 303 303 } … … 327 327 if(S_ISLNK(sb.st_mode)) { 328 328 /* for symlinks, print both */ 329 log_op("execve", NULL, path, 0);329 __darwintrace_log_op("execve", NULL, path, 0); 330 330 } 331 331 … … 336 336 337 337 /* once we have an open fd, if a full path was requested, do it */ 338 log_op("execve", NULL, path, fd);338 __darwintrace_log_op("execve", NULL, path, fd); 339 339 340 340 /* read the file for the interpreter */ … … 369 369 } 370 370 #endif 371 log_op("execve", procname, interp, 0);371 __darwintrace_log_op("execve", procname, interp, 0); 372 372 } 373 373 }
Note: See TracChangeset
for help on using the changeset viewer.