Projects
Browse Source     Search     Timeline     Wiki

Changeset 23563

Show
Ignore:
Timestamp:
03/21/08 15:52:53 (9 months ago)
Author:
zarzycki@…
Message:

<rdar://problem/5810463> 10A34: Nothing in Installer log window

Location:
trunk/launchd/src
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/launchd/src/launchd_runtime.c

    r23545 r23563  
    12831283 
    12841284        while ((lm = STAILQ_FIRST(&logmsg_queue))) { 
    1285                 lm->from_name -= (size_t)lm; 
    1286                 lm->about_name -= (size_t)lm; 
    1287                 lm->msg -= (size_t)lm; 
    1288                 lm->session_name -= (size_t)lm; 
     1285                lm->from_name_offset = lm->from_name - (char *)lm; 
     1286                lm->about_name_offset = lm->about_name - (char *)lm; 
     1287                lm->msg_offset = lm->msg - (char *)lm; 
     1288                lm->session_name_offset = lm->session_name - (char *)lm; 
    12891289 
    12901290                memcpy(offset, lm, lm->obj_sz); 
  • trunk/launchd/src/libvproc.c

    r23510 r23563  
    413413 
    414414        for (lm = (struct logmsg_s *)outdata; tmp_cnt > 0; lm = ((void *)lm + lm->obj_sz)) { 
    415                 lm->from_name += (size_t)lm; 
    416                 lm->about_name += (size_t)lm; 
    417                 lm->msg += (size_t)lm; 
    418                 lm->session_name += (size_t)lm; 
     415                lm->from_name = (char *)lm + lm->from_name_offset; 
     416                lm->about_name = (char *)lm + lm->about_name_offset; 
     417                lm->msg = (char *)lm + lm->msg_offset; 
     418                lm->session_name = (char *)lm + lm->session_name_offset; 
    419419 
    420420                tv.tv_sec = lm->when / USEC_PER_SEC; 
  • trunk/launchd/src/libvproc_internal.h

    r23471 r23563  
    5959 
    6060struct logmsg_s { 
    61         STAILQ_ENTRY(logmsg_s) sqe; 
     61        union { 
     62                STAILQ_ENTRY(logmsg_s) sqe; 
     63                uint64_t __pad; 
     64        }; 
    6265        int64_t when; 
    6366        pid_t from_pid; 
     
    6770        int err_num; 
    6871        int pri; 
    69         const char *from_name; 
    70         const char *about_name; 
    71         const char *session_name; 
    72         const char *msg; 
     72        union { 
     73                const char *from_name; 
     74                uint64_t from_name_offset; 
     75        }; 
     76        union { 
     77                const char *about_name; 
     78                uint64_t about_name_offset; 
     79        }; 
     80        union { 
     81                const char *session_name; 
     82                uint64_t session_name_offset; 
     83        }; 
     84        union { 
     85                const char *msg; 
     86                uint64_t msg_offset; 
     87        }; 
    7388        size_t obj_sz; 
    7489        char data[0];