Empty controller-id list in the ioctl call for attach/detach of namespace results effectively in no operation, yet the nvme cli reports falsely success. The controller id list must be specified with at least 1 controller in the list.
__u16 ctrlist[2048];
const char *namespace_id = "namespace to attach";
- const char *cont = "optional comma-sep controller id list";
+ const char *cont = "comma-sep controller id list";
struct config {
char *cntlist;
}
num = argconfig_parse_comma_sep_array(cfg.cntlist, list, 2047);
- if (num == -1) {
+ if (num < 1) {
fprintf(stderr, "%s: controller id list is required\n",
cmd->name);
err = -EINVAL;