Changeset 23563
- Timestamp:
- 03/21/08 15:52:53 (9 months ago)
- Location:
- trunk/launchd/src
- Files:
-
- 3 modified
-
launchd_runtime.c (modified) (1 diff)
-
libvproc.c (modified) (1 diff)
-
libvproc_internal.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/launchd/src/launchd_runtime.c
r23545 r23563 1283 1283 1284 1284 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; 1289 1289 1290 1290 memcpy(offset, lm, lm->obj_sz); -
trunk/launchd/src/libvproc.c
r23510 r23563 413 413 414 414 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; 419 419 420 420 tv.tv_sec = lm->when / USEC_PER_SEC; -
trunk/launchd/src/libvproc_internal.h
r23471 r23563 59 59 60 60 struct logmsg_s { 61 STAILQ_ENTRY(logmsg_s) sqe; 61 union { 62 STAILQ_ENTRY(logmsg_s) sqe; 63 uint64_t __pad; 64 }; 62 65 int64_t when; 63 66 pid_t from_pid; … … 67 70 int err_num; 68 71 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 }; 73 88 size_t obj_sz; 74 89 char data[0];

