See the STRSTR function in the kernel code:
mode = STRSTR (Boot_command_line, "D:");
It should be a string handler, using the Man command to see the following explanation:
Synopsis #include <string.h> char *strstr (const char *haystack, const char *needle); #define _gnu_source #include <string.h> char *strcasestr (const char *haystack, const char *needle);D Escription the strstr () function finds the first occurrence of the substring needle in the string haystack. The terminating ' characters is not compared. The Strcasestr () function is like strstr (), but ignores the case of both arguments. Return VALUE These functions return a pointer to the beginning of the substring, or NULL if the substring are not Found.
Finds the first occurrence of the string needle in haystack, returns the seat pointer successfully, and finds no return null.
A simple example:
#include <string.h> #include <stdio.h>int main () { char *haystack = "Hello, this was Csdn blog, I am Here";
char *needle = "he"; char *temp; temp = strstr (haystack, needle); if (temp! = NULL) { printf ("%s\n", temp); } else { printf ("Can not find [%s] from [%s]\n", Needle, haystack); } return 0;}
$ gcc strstr.c-o strstr$./strstr
STRSTR features in the Linux kernel