0001
0002 #ifndef _BOOTCONFIG_LINUX_BOOTCONFIG_H
0003 #define _BOOTCONFIG_LINUX_BOOTCONFIG_H
0004
0005 #include <stdio.h>
0006 #include <stdlib.h>
0007 #include <stdint.h>
0008 #include <stdbool.h>
0009 #include <ctype.h>
0010 #include <errno.h>
0011 #include <string.h>
0012
0013
0014 #ifndef fallthrough
0015 # define fallthrough
0016 #endif
0017
0018 #define WARN_ON(cond) \
0019 ((cond) ? printf("Internal warning(%s:%d, %s): %s\n", \
0020 __FILE__, __LINE__, __func__, #cond) : 0)
0021
0022 #define unlikely(cond) (cond)
0023
0024
0025 static inline char *skip_spaces(const char *str)
0026 {
0027 while (isspace(*str))
0028 ++str;
0029 return (char *)str;
0030 }
0031
0032 static inline char *strim(char *s)
0033 {
0034 size_t size;
0035 char *end;
0036
0037 size = strlen(s);
0038 if (!size)
0039 return s;
0040
0041 end = s + size - 1;
0042 while (end >= s && isspace(*end))
0043 end--;
0044 *(end + 1) = '\0';
0045
0046 return skip_spaces(s);
0047 }
0048
0049 #define __init
0050 #define __initdata
0051
0052 #include "../../../../include/linux/bootconfig.h"
0053
0054 #endif