static int __init blacklist_setup (char *str) { CIO_MSG_EVENT(6, "Reading blacklist parameters\n"); if (blacklist_parse_parameters(str, add, 1)) return 0; return 1; }
/* * Function: blacklist_parse_proc_parameters * parse the stuff which is piped to /proc/cio_ignore */ static int blacklist_parse_proc_parameters(char *buf) { int rc; char *parm; parm = strsep(&buf, " "); if (strcmp("free", parm) == 0) rc = blacklist_parse_parameters(buf, free, 0); else if (strcmp("add", parm) == 0) rc = blacklist_parse_parameters(buf, add, 0); else return 1; css_schedule_reprobe(); return rc; }
/* * Function: blacklist_parse_proc_parameters * parse the stuff which is piped to /proc/cio_ignore */ static inline void blacklist_parse_proc_parameters (char *buf) { if (strncmp (buf, "free ", 5) == 0) { blacklist_parse_parameters (buf + 5, free); } else if (strncmp (buf, "add ", 4) == 0) { /* * We don't need to check for known devices since * css_probe_device will handle this correctly. */ blacklist_parse_parameters (buf + 4, add); } else { printk (KERN_WARNING "cio_ignore: Parse error; \n" KERN_WARNING "try using 'free all|<devno-range>," "<devno-range>,...'\n" KERN_WARNING "or 'add <devno-range>," "<devno-range>,...'\n"); return; } s390_redo_validation (); }