Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F110175928
D24996.id72221.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
688 B
Referenced Files
None
Subscribers
None
D24996.id72221.diff
View Options
Index: sys/compat/linuxkpi/common/include/linux/kernel.h
===================================================================
--- sys/compat/linuxkpi/common/include/linux/kernel.h
+++ sys/compat/linuxkpi/common/include/linux/kernel.h
@@ -373,6 +373,24 @@
return (0);
}
+static inline int
+kstrtou16(const char *cp, unsigned int base, u16 *res)
+{
+ char *end;
+ u16 temp;
+
+ *res = temp = (u16)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)
{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Feb 15, 4:09 PM (6 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16661326
Default Alt Text
D24996.id72221.diff (688 B)
Attached To
Mode
D24996: linuxkpi: Add kstrtou16
Attached
Detach File
Event Timeline
Log In to Comment