Page MenuHomeFreeBSD

D24996.diff
No OneTemporary

D24996.diff

Index: head/sys/compat/linuxkpi/common/include/linux/kernel.h
===================================================================
--- head/sys/compat/linuxkpi/common/include/linux/kernel.h
+++ head/sys/compat/linuxkpi/common/include/linux/kernel.h
@@ -374,6 +374,24 @@
}
static inline int
+kstrtou16(const char *cp, unsigned int base, u16 *res)
+{
+ char *end;
+ unsigned long temp;
+
+ *res = temp = strtoul(cp, &end, base);
+
+ /* skip newline character, if any */
+ if (*end == '\n')
+ end++;
+ if (*cp == 0 || *end != 0)
+ return (-EINVAL);
+ if (temp != (u16)temp)
+ return (-ERANGE);
+ return (0);
+}
+
+static inline int
kstrtou32(const char *cp, unsigned int base, u32 *res)
{
char *end;

File Metadata

Mime Type
text/plain
Expires
Sun, Feb 16, 10:02 AM (14 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16672361
Default Alt Text
D24996.diff (707 B)

Event Timeline