+static int whitelist_search(struct sysfs_class_device *class_dev)
+{
+ char *sysblock = "/sys/block";
+ int i;
+
+ static char *list[] = {
+ "nb",
+ "ram",
+ "loop",
+ "fd",
+ "md",
+ "dos_cd",
+ "double",
+ "flash",
+ "msd",
+ "rflash",
+ "rom",
+ "rrom",
+ "sbpcd",
+ "pcd",
+ "pf",
+ "scd",
+ "ubd",
+ NULL,
+ };
+
+ if (strncmp(class_dev->path, sysblock, strlen(sysblock)))
+ return 0;
+
+ for (i=0; list[i] != NULL; i++)
+ if (!strncmp(class_dev->name, list[i], strlen(list[i])))
+ return 1;
+
+ return 0;
+}
+