For -U, that could work (was actually how we handled it in an earlier
version).  For -C, no.  Our goal is to avoid cgd trying to configure a
device, like those backed by USB drives, on boot when the backing
device isn't attached.  But perhaps rather than changing the semantics
of -C, we could add an alternate flag to provide this addition check?
Robert made some really good suggestions that I will incorporate and
provide an updated patch.  Thanks for the feedback!

Thanks and regards,
Jason

On Sun, Nov 10, 2019 at 12:32 AM Michael van Elst <mlel...@serpens.de> wrote:
>
> jh...@netbsd.org (Jason High) writes:
>
> >Hello NetBSD,
>
> >When using cgdconfig in do_all mode (-C|-U), it will attempt to 
> >configure/unconfigure all devices specified in cgd.conf regardless of 
> >whether the device is attached or not (our use case is USB drives).
>
> Wouldn't it be sufficient to just ignore ENXIO failures when trying
> to configure ?
>
> --
> --
>                                 Michael van Elst
> Internet: mlel...@serpens.de
>                                 "A potential Snark may lurk in every tree."

Reply via email to