i2c/isa command line tools

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

 



> > I was thinking, instead, about an option we could add to all the
> > tools(say -y for "yes") that would skip the warning and the delay.
> > This would make the tools better for use in scripts.
> 
> I thought of that at first too, but it isn't trivial. Command line
> parsing in these tools is tricky and adding such a flag will make
> things even more complex. This may be worth the pain if someone really
> enjoys the "interactive" mode, but if not, I guess we don't want to
> keep it.
> 
> So what I propose is to surround the "interactive" code in i2cset and
> isaset with #ifdef INTERACTIVE/#endif instead of really deleting it.
> This allows people who want it to enable that "feature". In case we
> later switch to a more advanced command line parsing, we'll propose a
> switch instead.
> 
> I would also suggest not to print anything on success in
> non-interactive mode. Seems that it is a common unix practice to keep
> quiet when everything's fine.

I gave it a try. Only isaset and isadump were changed so far.
1* Wait for user confirmation instead of the arbitrary 5 sec delay.
2* Can be skipped with -y.

Please test and comment. If it's OK I'll continue with the 3 remaining
tools.

Thanks.

-- 
Jean "Khali" Delvare
http://khali.linux-fr.org/



[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux