- if (strcmp(subsystem, "block") == 0 ||
- strstr(path, "/block/") != NULL)
+ if (strcmp(subsystem, "block") == 0)
+ return 'b';
+
+ if (strcmp(subsystem, "net") == 0)
+ return 'n';
+
+ if (strncmp(path, BLOCK_PATH, strlen(BLOCK_PATH)) == 0 &&
+ strlen(path) > strlen(BLOCK_PATH))