Hi,

> -static void
> +int
>  nvme_probe_ns(struct nvme_ctrl *ctrl, u32 ns_idx, u8 mdts)

Why drop the static?

> -    /* Populate namespace IDs */
> +    /* Find first active namespace. */
>      int ns_idx;
> -    for (ns_idx = 0; ns_idx < ctrl->ns_count; ns_idx++) {
> -        nvme_probe_ns(ctrl, ns_idx, identify->mdts);
> +    rc = -1;
> +    for (ns_idx = 0; ns_idx < ctrl->ns_count && rc; ns_idx++) {
> +        rc = nvme_probe_ns(ctrl, ns_idx, identify->mdts);
> +    }

I think we should make this depend on skip_nonbootable,
i.e. have something along the lines of ...

   if (skip_nonbootable) {
      if (rc == 0) {
          break;
      }
   }

... inside the loop.  When we have bootorder support for
namespaces we can refine the logic inside the
"if (skip_nonbootable)" block.

take care,
  Gerd

_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-le...@seabios.org

Reply via email to