uevent cmd: allow filtering events

This commit is contained in:
Pierre-Hugues Husson 2020-10-25 21:10:01 +01:00
parent 1450230c31
commit 018f36087d
1 changed files with 5 additions and 0 deletions

View File

@ -44,6 +44,11 @@ int main(int argc, char **argv, char **envp) {
if (buflen<0) {
exit(1);
}
if(argc>=2) {
if(!strstr(buffer, argv[1])) continue;
}
printf("%s\n", buffer);
char *pos = buffer + strlen(buffer);
char *end = buffer + buflen;