Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115913177
D32597.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
590 B
Referenced Files
None
Subscribers
None
D32597.diff
View Options
diff --git a/sys/compat/linuxkpi/common/include/linux/string.h b/sys/compat/linuxkpi/common/include/linux/string.h
--- a/sys/compat/linuxkpi/common/include/linux/string.h
+++ b/sys/compat/linuxkpi/common/include/linux/string.h
@@ -167,6 +167,19 @@
return (strncmp(str, prefix, len) == 0 ? len : 0);
}
+static inline char *
+strreplace(char *str, char old, char new)
+{
+ char *p;
+
+ p = strchrnul(str, old);
+ while (p != NULL && *p != '\0') {
+ *p = new;
+ p = strchrnul(str, old);
+ }
+ return (p);
+}
+
static inline ssize_t
strscpy(char* dst, const char* src, size_t len)
{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, May 1, 8:18 AM (13 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17877485
Default Alt Text
D32597.diff (590 B)
Attached To
Mode
D32597: LinuxKPI: add strreplace() to string.h
Attached
Detach File
Event Timeline
Log In to Comment