logger: move logger.h to uapi 31/256831/3
authorŁukasz Stelmach <l.stelmach@samsung.com>
Fri, 19 Mar 2021 14:20:06 +0000 (15:20 +0100)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 16 Apr 2021 03:37:00 +0000 (03:37 +0000)
Move logger.h to uapi so it can be exported for userland
software to use.

Change-Id: I64dca69f3442edc246562485b0b29b43615ae881
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
drivers/staging/android/logger.c
include/uapi/linux/logger.h [moved from drivers/staging/android/logger.h with 98% similarity]
tools/testing/selftests/logger/logger.c

index 7983e57..d7707b6 100644 (file)
@@ -32,7 +32,7 @@
 #include <linux/fdtable.h>
 #include <linux/file.h>
 
-#include "logger.h"
+#include <uapi/linux/logger.h>
 
 /**
  * struct logger_log - represents a specific log, such as 'main' or 'radio'
similarity index 98%
rename from drivers/staging/android/logger.h
rename to include/uapi/linux/logger.h
index b11e48c..a02ac11 100644 (file)
@@ -66,7 +66,11 @@ struct logger_entry {
        __s32           tid;
        __s32           sec;
        __s32           nsec;
+#ifndef __KERNEL__
+       __s32           euid;
+#else
        kuid_t          euid;
+#endif
        char            msg[0];
 };
 
index 0446e79..5f0bd3b 100644 (file)
@@ -2,6 +2,7 @@
 #include <fcntl.h>
 #include <getopt.h>
 #include <linux/const.h>
+#include <linux/logger.h>
 #include <pthread.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/wait.h>
 #include <unistd.h>
 
-#define LOGGER_SET_VERSION 44550
-#define LOGGER_SET_TAG 44551
-#define LOGGER_SET_PRIO 44552
-
 #define handle_error_en(en, msg)                                       \
        do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)