Changeset 18692 for trunk/base


Ignore:
Timestamp:
Jul 23, 2006, 12:36:42 AM (18 years ago)
Author:
pguyot (Paul Guyot)
Message:

Prefix internal functions and use inline to avoid them to be inserted.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/darwintracelib1.0/darwintrace.c

    r18673 r18692  
    11/*
    22 * Copyright (c) 2005 Apple Computer, Inc. All rights reserved.
    3  * $Id: darwintrace.c,v 1.13 2006/07/22 03:12:58 pguyot Exp $
     3 * $Id: darwintrace.c,v 1.14 2006/07/23 00:36:42 pguyot Exp $
    44 *
    55 * @APPLE_BSD_LICENSE_HEADER_START@
     
    8080 * Prototypes.
    8181 */
    82 void log_op(const char* op, const char* procname, const char* path, int fd);
    83 void __darwintrace_setup();
     82inline void __darwintrace_log_op(const char* op, const char* procname, const char* path, int fd);
     83inline void __darwintrace_setup();
    8484inline void __darwintrace_cleanup_path(char *path);
    8585
     
    147147 * fd:                  a fd to the file, or 0 if we don't have any.
    148148 */
    149 void log_op(const char* op, const char* procname, const char* path, int fd) {
     149inline void __darwintrace_log_op(const char* op, const char* procname, const char* path, int fd) {
    150150#if !DARWINTRACE_SHOW_PROCESS
    151151        #pragma unused(procname)
     
    268268                                if (__darwintrace_fd >= 0) {
    269269                                    dprintf("darwintrace: original open path is %s\n", path);
    270                                         log_op("open", NULL, path, result);
     270                                        __darwintrace_log_op("open", NULL, path, result);
    271271                                }
    272272#if DARWINTRACE_LOG_CREATE
     
    275275                                if (__darwintrace_fd >= 0) {
    276276                                    dprintf("darwintrace: original create path is %s\n", path);
    277                                         log_op("create", NULL, path, result);
     277                                        __darwintrace_log_op("create", NULL, path, result);
    278278                                }
    279279#endif
     
    299299          if (__darwintrace_fd >= 0) {
    300300            dprintf("darwintrace: original readlink path is %s\n", path);
    301                 log_op("readlink", NULL, path, 0);
     301                __darwintrace_log_op("readlink", NULL, path, 0);
    302302          }
    303303        }
     
    327327            if(S_ISLNK(sb.st_mode)) {
    328328              /* for symlinks, print both */
    329                   log_op("execve", NULL, path, 0);
     329                  __darwintrace_log_op("execve", NULL, path, 0);
    330330            }
    331331               
     
    336336       
    337337                  /* 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);
    339339
    340340                  /* read the file for the interpreter */
     
    369369                          }
    370370#endif
    371                           log_op("execve", procname, interp, 0);
     371                          __darwintrace_log_op("execve", procname, interp, 0);
    372372                        }
    373373                  }
Note: See TracChangeset for help on using the changeset viewer.