diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2014-08-27 16:26:52 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2014-08-27 16:26:52 -0400 |
commit | 6203e5b8fcac9d78ea54b7b3c53cb8d084e8a219 (patch) | |
tree | d8611d8e44267151c29ab8920702cc94e86063c5 /shmexport.c | |
parent | b53db1322c70f8b86dfe72e982d6097304a749ae (diff) | |
download | gpsd-6203e5b8fcac9d78ea54b7b3c53cb8d084e8a219.tar.gz |
Introduce struct errout_t to encapsulate error-reporting hooks.
A major step towards eliminating reverse linkage.
All regression tests pass.
Diffstat (limited to 'shmexport.c')
-rw-r--r-- | shmexport.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/shmexport.c b/shmexport.c index f8645941..4c6b7f96 100644 --- a/shmexport.c +++ b/shmexport.c @@ -37,7 +37,7 @@ bool shm_acquire(struct gps_context_t *context) shmid = shmget((key_t)GPSD_KEY, sizeof(struct gps_data_t), (int)(IPC_CREAT|0666)); if (shmid == -1) { - gpsd_report(context->debug, LOG_ERROR, + gpsd_report(context->errout.debug, LOG_ERROR, "shmget(%ld, %zd, 0666) failed: %s\n", (long int)GPSD_KEY, sizeof(struct gps_data_t), @@ -46,11 +46,11 @@ bool shm_acquire(struct gps_context_t *context) } context->shmexport = (char *)shmat(shmid, 0, 0); if ((int)(long)context->shmexport == -1) { - gpsd_report(context->debug, LOG_ERROR, "shmat failed: %s\n", strerror(errno)); + gpsd_report(context->errout.debug, LOG_ERROR, "shmat failed: %s\n", strerror(errno)); context->shmexport = NULL; return false; } - gpsd_report(context->debug, LOG_PROG, + gpsd_report(context->errout.debug, LOG_PROG, "shmat() succeeded, segment %d\n", shmid); return true; } |