Module: xenomai-3
Branch: stable-3.0.x
Commit: cb72996a06ae4f29e403e3397324069f1983145e
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=cb72996a06ae4f29e403e3397324069f1983145e

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Sun Nov  8 17:32:32 2015 +0100

cobalt/wrappers: move get_current_uid() to ancillaries.h

---

 include/cobalt/kernel/ancillaries.h                  |    5 ++++-
 kernel/cobalt/include/asm-generic/xenomai/wrappers.h |    9 +++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/cobalt/kernel/ancillaries.h 
b/include/cobalt/kernel/ancillaries.h
index f72e811..cde9856 100644
--- a/include/cobalt/kernel/ancillaries.h
+++ b/include/cobalt/kernel/ancillaries.h
@@ -21,6 +21,7 @@
 
 #include <linux/kernel.h>
 #include <linux/string.h>
+#include <linux/uidgid.h>
 #include <cobalt/uapi/kernel/limits.h>
 
 #define ksformat(__dst, __len, __fmt, __args...)                       \
@@ -61,5 +62,7 @@ void __knamecpy_requires_character_array_as_destination(void);
                __dst[sizeof(__dst) - 1] = '\0';                        \
                __dst;                                                  \
         })
-       
+
+#define get_current_uuid() from_kuid_munged(current_user_ns(), current_uid())
+
 #endif /* !_COBALT_KERNEL_ANCILLARIES_H */
diff --git a/kernel/cobalt/include/asm-generic/xenomai/wrappers.h 
b/kernel/cobalt/include/asm-generic/xenomai/wrappers.h
index 173315c..20e91e2 100644
--- a/kernel/cobalt/include/asm-generic/xenomai/wrappers.h
+++ b/kernel/cobalt/include/asm-generic/xenomai/wrappers.h
@@ -59,10 +59,9 @@
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0)
 #include <linux/pci.h>
 
-#define get_current_uuid() current_uid()
-
 #ifdef CONFIG_PCI
-#define pci_enable_msix_range XENO_BACKPORT(pci_enable_msix_range)
+#define pci_enable_msix_range \
+       XENO_BACKPORT(pci_enable_msix_range)
 #ifdef CONFIG_PCI_MSI
 int pci_enable_msix_range(struct pci_dev *dev,
                        struct msix_entry *entries,
@@ -74,9 +73,7 @@ static inline int pci_enable_msix_range(struct pci_dev *dev,
 { return -ENOSYS; }
 #endif /* not pci msi */
 #endif /* pci */
-#else /* >= 3.14 */
-#define get_current_uuid() from_kuid_munged(current_user_ns(), current_uid())
-#endif /* >= 3.14 */
+#endif /* < 3.14 */
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0)
 #include <linux/dma-mapping.h>


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://xenomai.org/mailman/listinfo/xenomai-git

Reply via email to