loader: Fix pnpload and add some usage

pnpload needs a busname and a compat data.
This commit is contained in:
Emmanuel Vadot 2021-11-14 15:22:14 +01:00
parent 544af629a4
commit d4874307fd

View File

@ -424,13 +424,15 @@ command_pnpload(int argc, char *argv[])
return(CMD_OK); return(CMD_OK);
} }
} }
argv += (optind - 1); argv += optind;
argc -= (optind - 1); argc -= optind;
if (argc != 2) if (argc != 2) {
command_errmsg = "Usage: pnpload <busname> compat=<compatdata>";
return (CMD_ERROR); return (CMD_ERROR);
}
module = mod_searchmodule_pnpinfo(argv[1], argv[2]); module = mod_searchmodule_pnpinfo(argv[0], argv[1]);
error = mod_load(module, NULL, 0, NULL); error = mod_load(module, NULL, 0, NULL);
if (error == EEXIST) { if (error == EEXIST) {