Rename dlogutil_entry_ts to dlogutil_entry_get_ts 91/222091/3 accepted/tizen/unified/20200114.130728 submit/tizen/20200113.072921
authorMateusz Majewski <m.majewski2@samsung.com>
Thu, 9 Jan 2020 11:49:31 +0000 (12:49 +0100)
committerMichal Bloch <m.bloch@partner.samsung.com>
Fri, 10 Jan 2020 14:18:32 +0000 (14:18 +0000)
This is to fit Tizen's guidelines better.

Change-Id: I3ec3548bd61346b94c76fd07b522b1f0129a7992

Makefile.am
include/queued_entry_timestamp.h
src/shared/fd_info.c
src/shared/log_file.c
src/shared/logretrieve.c
src/shared/queued_entry_timestamp.c
src/shared/sort_vector.c
src/tests/fd_info.c
src/tests/log_file.c
src/tests/queued_entry.c

index c650426..3a0bd6d 100644 (file)
@@ -256,7 +256,7 @@ src_tests_sort_vector_LDFLAGS = $(AM_LDFLAGS) -Wl,--wrap=log_config_get_int,--wr
 
 src_tests_fd_info_SOURCES = src/tests/fd_info.c src/shared/fd_info.c
 src_tests_fd_info_CFLAGS = $(check_CFLAGS)
-src_tests_fd_info_LDFLAGS = $(AM_LDFLAGS) -Wl,--wrap=sort_vector_push,--wrap=malloc,--wrap=free,--wrap=close,--wrap=dlogutil_entry_ts,--wrap=log_should_print_line
+src_tests_fd_info_LDFLAGS = $(AM_LDFLAGS) -Wl,--wrap=sort_vector_push,--wrap=malloc,--wrap=free,--wrap=close,--wrap=dlogutil_entry_get_ts,--wrap=log_should_print_line
 
 src_tests_fdi_logger_SOURCES = src/tests/fdi_logger.c src/shared/fdi_logger.c src/shared/ptrs_list.c src/shared/logcommon.c
 src_tests_fdi_logger_CFLAGS = $(check_CFLAGS)
@@ -284,7 +284,7 @@ src_tests_libdlog_base_LDFLAGS = $(AM_LDFLAGS) -lpthread -Wl,--wrap=log_config_r
 
 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=fstat,--wrap=rename,--wrap=dlogutil_entry_ts,--wrap=log_print_log_line,--wrap=dlogutil_entry_get_tag,--wrap=isatty
+src_tests_log_file_LDFLAGS = $(AM_LDFLAGS) -Wl,--wrap=strdup,--wrap=free,--wrap=memcpy,--wrap=snprintf,--wrap=open,--wrap=fstat,--wrap=rename,--wrap=dlogutil_entry_get_ts,--wrap=log_print_log_line,--wrap=dlogutil_entry_get_tag,--wrap=isatty
 
 src_tests_queued_entry_SOURCES = src/tests/queued_entry.c src/shared/queued_entry.c src/shared/queued_entry_timestamp.c src/shared/parsers.c src/shared/translate_syslog.c src/shared/logconfig.c src/shared/logcommon.c
 src_tests_queued_entry_CFLAGS = $(check_CFLAGS)
index 7814a11..f2acb71 100644 (file)
@@ -27,7 +27,7 @@
 void add_recv_timestamp(dlogutil_entry_s *le);
 void copy_recv_timestamp(dlogutil_entry_s *le);
 bool log_entry_is_earlier(const dlogutil_sorting_order_e sort_by, const dlogutil_entry_s *lhs, const dlogutil_entry_s *rhs);
-struct timespec dlogutil_entry_ts(const dlogutil_entry_s *le, dlogutil_sorting_order_e stamp_type);
+struct timespec dlogutil_entry_get_ts(const dlogutil_entry_s *le, dlogutil_sorting_order_e stamp_type);
 clockid_t get_proper_clock(dlogutil_sorting_order_e sort_by);
 
 #endif /* _QUEUED_ENTRY_TIMESTAMP_H */
index d4accad..5feb4e1 100644 (file)
@@ -94,7 +94,7 @@ int fdi_push_log(struct fd_info *fdi, struct sort_vector *logs, dlogutil_entry_c
        int r;
 
        if (IS_VECTOR_SIZE_SORTABLE(logs->size)) {
-               struct timespec ts = dlogutil_entry_ts(temp, logs->sort_by);
+               struct timespec ts = dlogutil_entry_get_ts(temp, logs->sort_by);
 
                /* check if new entry is newer than util's start moment */
                if (ts.tv_sec > logs->start.tv_sec || (ts.tv_sec == logs->start.tv_sec && ts.tv_nsec > logs->start.tv_nsec))
index 80c17b7..572b956 100644 (file)
@@ -223,7 +223,7 @@ int logfile_write_with_rotation(const dlogutil_entry_s *e, struct log_file *file
 
        int written_bytes = 0;
 
-       struct timespec ts = dlogutil_entry_ts(e, sort_by);
+       struct timespec ts = dlogutil_entry_get_ts(e, sort_by);
 
        if (ts.tv_sec < file->prev_sec || (ts.tv_sec == file->prev_sec && ts.tv_nsec < file->prev_nsec)) {
                struct dlogutil_entry_with_msg msg;
index bc821a2..dc98140 100644 (file)
@@ -113,7 +113,7 @@ struct fd_info *find_earliest_log(struct fd_info **data_fds, int fd_count, dlogu
                        continue;
 
                const dlogutil_entry_s *const le = fdi->ops->peek_entry(fdi);
-               struct timespec current_ts = dlogutil_entry_ts(le, sort_by);
+               struct timespec current_ts = dlogutil_entry_get_ts(le, sort_by);
 
                if (best_fdi && ((current_ts.tv_sec > best_ts.tv_sec) || (current_ts.tv_sec == best_ts.tv_sec && current_ts.tv_nsec > best_ts.tv_nsec)))
                        continue;
index a1184cf..4b884bb 100644 (file)
@@ -95,7 +95,7 @@ bool log_entry_is_earlier(const dlogutil_sorting_order_e sort_by, const dlogutil
        return l_sec < r_sec || (l_sec == r_sec && l_nsec < r_nsec);
 }
 
-struct timespec dlogutil_entry_ts(const dlogutil_entry_s *le, dlogutil_sorting_order_e stamp_type)
+struct timespec dlogutil_entry_get_ts(const dlogutil_entry_s *le, dlogutil_sorting_order_e stamp_type)
 {
        assert(le);
 
index 2beda89..3165f1f 100644 (file)
@@ -198,7 +198,7 @@ long sort_vector_time_span(struct sort_vector *logs)
        if (sort_vector_empty(logs))
                return 0;
 
-       struct timespec now, oldest = dlogutil_entry_ts(sort_vector_back(logs), logs->sort_by);
+       struct timespec now, oldest = dlogutil_entry_get_ts(sort_vector_back(logs), logs->sort_by);
        clock_gettime(get_proper_clock(logs->sort_by), &now);
 
        diff_s = now.tv_sec - oldest.tv_sec;
@@ -230,7 +230,7 @@ bool process_log(const dlogutil_entry_s *e, struct timespec reference_ts, dlogut
 
        if (timeout != -1) {
 
-               struct timespec log_ts = dlogutil_entry_ts(e, stamp_type);
+               struct timespec log_ts = dlogutil_entry_get_ts(e, stamp_type);
 
                long  s = reference_ts.tv_sec  - log_ts.tv_sec;
                long ns = reference_ts.tv_nsec - log_ts.tv_nsec;
index c6f56b0..23a1788 100644 (file)
@@ -65,7 +65,7 @@ dlogutil_entry_s *test_extract(struct fd_info *fdi)
        return fail_extract ? NULL : (dlogutil_entry_s *) 0xBADFEEL;
 }
 
-struct timespec __wrap_dlogutil_entry_ts(const dlogutil_entry_s *le, dlogutil_sorting_order_e stamp_type)
+struct timespec __wrap_dlogutil_entry_get_ts(const dlogutil_entry_s *le, dlogutil_sorting_order_e stamp_type)
 {
        assert(le == (dlogutil_entry_s *)0xBADFEEL);
        return (struct timespec) {
index 7a76a5f..d6207ab 100644 (file)
@@ -34,7 +34,7 @@ int __wrap_rename(const char *oldpath, const char *newpath)
        return -1;
 }
 
-struct timespec __wrap_dlogutil_entry_ts(const dlogutil_entry_s *le, dlogutil_sorting_order_e stamp_type)
+struct timespec __wrap_dlogutil_entry_get_ts(const dlogutil_entry_s *le, dlogutil_sorting_order_e stamp_type)
 {
        assert(stamp_type == DLOGUTIL_SORT_SENT_MONO);
        assert(le == (dlogutil_entry_s *) 0xBA5EBALL);
index 852ba23..1abe39b 100644 (file)
@@ -58,16 +58,16 @@ int main()
                 .sec_recv_real = 7,
                .nsec_recv_real = 8,
        };
-       ts = dlogutil_entry_ts(&le, DLOGUTIL_SORT_SENT_MONO);
+       ts = dlogutil_entry_get_ts(&le, DLOGUTIL_SORT_SENT_MONO);
        assert(ts.tv_sec  == le. sec_sent_mono);
        assert(ts.tv_nsec == le.nsec_sent_mono);
-       ts = dlogutil_entry_ts(&le, DLOGUTIL_SORT_RECV_REAL);
+       ts = dlogutil_entry_get_ts(&le, DLOGUTIL_SORT_RECV_REAL);
        assert(ts.tv_sec  == le. sec_recv_real);
        assert(ts.tv_nsec == le.nsec_recv_real);
-       ts = dlogutil_entry_ts(&le, DLOGUTIL_SORT_SENT_REAL);
+       ts = dlogutil_entry_get_ts(&le, DLOGUTIL_SORT_SENT_REAL);
        assert(ts.tv_sec  == le. sec_sent_real);
        assert(ts.tv_nsec == le.nsec_sent_real);
-       ts = dlogutil_entry_ts(&le, DLOGUTIL_SORT_RECV_MONO);
+       ts = dlogutil_entry_get_ts(&le, DLOGUTIL_SORT_RECV_MONO);
        assert(ts.tv_sec  == le. sec_recv_mono);
        assert(ts.tv_nsec == le.nsec_recv_mono);