summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorŁukasz Stelmach <l.stelmach@samsung.com>2021-03-19 15:20:06 +0100
committerŁukasz Stelmach <l.stelmach@samsung.com>2021-04-19 09:59:27 +0200
commit52cc4529e8df8a8d10f5b0d447a14b12ed7e9207 (patch)
tree58e01946f21ce6a85e41daa01fc0e5316c2c24c4
parent3eb17f1de10a908a883378949159604add80e837 (diff)
downloadlinux-rpi3-52cc4529e8df8a8d10f5b0d447a14b12ed7e9207.tar.gz
linux-rpi3-52cc4529e8df8a8d10f5b0d447a14b12ed7e9207.tar.bz2
linux-rpi3-52cc4529e8df8a8d10f5b0d447a14b12ed7e9207.zip
logger: move logger.h to uapi
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>
-rw-r--r--drivers/staging/android/logger.c2
-rw-r--r--include/uapi/linux/logger.h (renamed from drivers/staging/android/logger.h)4
-rw-r--r--tools/testing/selftests/logger/logger.c5
3 files changed, 6 insertions, 5 deletions
diff --git a/drivers/staging/android/logger.c b/drivers/staging/android/logger.c
index 33477061d0c0..0d21142c0b7d 100644
--- a/drivers/staging/android/logger.c
+++ b/drivers/staging/android/logger.c
@@ -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'
diff --git a/drivers/staging/android/logger.h b/include/uapi/linux/logger.h
index b11e48ce9964..a02ac117eb6b 100644
--- a/drivers/staging/android/logger.h
+++ b/include/uapi/linux/logger.h
@@ -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];
};
diff --git a/tools/testing/selftests/logger/logger.c b/tools/testing/selftests/logger/logger.c
index 0446e796fa35..5f0bd3b6a66a 100644
--- a/tools/testing/selftests/logger/logger.c
+++ b/tools/testing/selftests/logger/logger.c
@@ -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>
@@ -12,10 +13,6 @@
#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)