Re: Return data from modules

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

 



On Sat, 23 Aug 2008 11:02:55 +0200
Luca Lesinigo <luca@xxxxxxxxxxxxx> wrote:

> How do you see a "global" switch to choose between human- and  
> machine- readable outputs? The commandline interface could default
> to human and the API to machine. Something like:
> > func -m $host call $mymodules blah    ---> machine-readable output
> > func -h $host call...			---> human-readable
> > output func $host call....				--->
> > human-readable output
I like the general idea but it is not going to work the way you
proposed. First of all, you are giving "-h" or "-m" argument to func
command line utility while it would be much easier to just implement
this in "call" cmd_module. The actual data is returned by the module so
you have to tell the module in which way it should be returned. This
can be done in various ways but it's important to think about good one
and use it in all modules. Patches are welcome.

_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list

[Index of Archives]     [Fedora Users]     [Linux Networking]     [Fedora Legacy List]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux