Displaying 1 result from an estimated 1 matches for "device_checklist_add".
2010 Dec 05
1
[PATCH 4/5][REPOST][BTRFS-PROGS] Avoid to scan cdrom and floppy
...count = 0;
+/*
+ * Default device black list:
+ * If the line starts with a "!" the device has to be skipped
+ * otherwise the device is OK
+ */
+static char *default_checklist[] = {
+ "!/dev/fd*",
+ "!/dev/sr*",
+ 0
+};
+/* add an entry in the checklist */
+static int device_checklist_add(char *entry)
+{
+ char *cpy;
+ char **res;
+
+ device_checklist_count += 1;
+ res = realloc(device_checklist,
+ sizeof(char*)*device_checklist_count);
+ if( !res ){
+ free(device_checklist);
+ device_checklist_count = 0;
+ return -1;
+ }
+ device_checklist = res;
+
+ cpy = strdup(entry);
+ i...