src_tests_libdlog_prio_filter_pos_CFLAGS = $(check_CFLAGS) -pthread
src_tests_libdlog_prio_filter_pos_LDFLAGS = $(AM_LDFLAGS) -lpthread -Wl,--wrap=log_config_read
-src_tests_log_file_SOURCES = src/tests/log_file.c src/shared/log_file.c src/shared/logcommon.c
+src_tests_log_file_SOURCES = src/tests/log_file.c src/shared/log_file.c
src_tests_log_file_CFLAGS = $(check_CFLAGS)
src_tests_log_file_LDFLAGS = $(AM_LDFLAGS) -Wl,--wrap=strdup,--wrap=free,--wrap=memcpy,--wrap=snprintf,--wrap=open,--wrap=open64,--wrap=fstat,--wrap=fstat64,--wrap=rename,--wrap=dlogutil_entry_get_timestamp,--wrap=log_print_log_line,--wrap=dlogutil_entry_get_tag,--wrap=isatty
if (!file->buffer.data)
return 0;
- /* This can cause the logs to linger in the buffer in case of an error (TODO?), but it's better than
- * data loss on partial write, and is not a real issue since everybody quits on write error. */
- int written = full_write(file->fd, file->buffer.data, file->buffer.position);
- if (written > 0)
- file->buffer.position = 0;
+ int written = write(file->fd, file->buffer.data, file->buffer.position);
+ if (write > 0)
+ file->buffer.position = 0; // TODO: data loss possibility here
return written;
}