user.h (976e3645923bdd2fe7893aae33fd7a21098bfb28) user.h (337015573718b161891a3473d25f59273f2e626b)
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
4 */
5
6#ifndef __USER_H__
7#define __USER_H__
8

--- 24 unchanged lines hidden (view full) ---

33#define UM_KERN_ERR KERN_ERR
34#define UM_KERN_WARNING KERN_WARNING
35#define UM_KERN_NOTICE KERN_NOTICE
36#define UM_KERN_INFO KERN_INFO
37#define UM_KERN_DEBUG KERN_DEBUG
38#define UM_KERN_CONT KERN_CONT
39
40#ifdef UML_CONFIG_PRINTK
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
4 */
5
6#ifndef __USER_H__
7#define __USER_H__
8

--- 24 unchanged lines hidden (view full) ---

33#define UM_KERN_ERR KERN_ERR
34#define UM_KERN_WARNING KERN_WARNING
35#define UM_KERN_NOTICE KERN_NOTICE
36#define UM_KERN_INFO KERN_INFO
37#define UM_KERN_DEBUG KERN_DEBUG
38#define UM_KERN_CONT KERN_CONT
39
40#ifdef UML_CONFIG_PRINTK
41extern int printk(const char *fmt, ...)
41#define printk(...) _printk(__VA_ARGS__)
42extern int _printk(const char *fmt, ...)
42 __attribute__ ((format (printf, 1, 2)));
43#else
44static inline int printk(const char *fmt, ...)
45{
46 return 0;
47}
48#endif
49
50extern int in_aton(char *str);
51extern size_t strlcpy(char *, const char *, size_t);
52extern size_t strlcat(char *, const char *, size_t);
53
54/* Copied from linux/compiler-gcc.h since we can't include it directly */
55#define barrier() __asm__ __volatile__("": : :"memory")
56
57#endif
43 __attribute__ ((format (printf, 1, 2)));
44#else
45static inline int printk(const char *fmt, ...)
46{
47 return 0;
48}
49#endif
50
51extern int in_aton(char *str);
52extern size_t strlcpy(char *, const char *, size_t);
53extern size_t strlcat(char *, const char *, size_t);
54
55/* Copied from linux/compiler-gcc.h since we can't include it directly */
56#define barrier() __asm__ __volatile__("": : :"memory")
57
58#endif