Re: [PATCH 01/21] driver: Add device_detect_all() function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > >  
> > >  	if (option_all) {
> > > -		for_each_device(dev) {
> > > -			ret = device_detect(dev);
> > > -			if (ret && ret != -ENOSYS && option_error)
> > > -				return ret;
> > > -		}
> > > +		device_detect_all();
> > 
> > With this change there is no longer any checks
> > if device_detect() fails.
> > so the option "-e" is no longer useful in combination
> > with option "-a" (which uses the patched code).
> 
> Of course we could bail out of device_detect_all() when an error
> occurs, I'm not sure though how useful this is. I mean when your
> SATA drivers detect function returns an error because there is no
> drive connected, why would you want to bail out of the detection of
> other devices?
> 
> In an earlier version of this series I completely removed the -e
> option. Maybe that would be better?

My comment was solely on the inconsistency.
When I want to stop if an error occur I specify -e, otherwise
I expect it to run to the end.
So we should either respect -e always or drop it.
Waht is the best I do not know, but the current middel ground
where -e only have effect in some cases is confusing and should be avoided.

	Sam

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux