ibm-s390-linux / s390-tools

Tools for use with the s390 Linux kernel and device drivers
MIT License
63 stars 60 forks source link

Allow --pairs for chzdev #48

Open xnox opened 5 years ago

xnox commented 5 years ago

I'm working on UI for operating and configuring z devices. I very like --pairs output generated by lszdev (as it is easy to consume automatically), but I cannot get the same output from chzdev.

E.g. it would be nice to have the "pairs" output for the following comamnds:

# module-level attributes (list)
./chzdev --list-attributes --type dasd-eckd
# device-level attributes (list)
./chzdev --list-attributes dasd-eckd
# module-level attribute help
./chzdev --help-attributes --type dasd-eckd
# device-level attributes help
./chzdev --help-attributes dasd-eckd

It's a really comprehensive amount of information, thus I wouldn't want to re-hardcode all of this output, but instead dynamically query it and display it.

Would you be open to patches that introduce --pairs output to all of the above? Or any other structured output? (e.g. json, yaml, etc)

oberpar commented 5 years ago

Sounds like a good idea! I'm open for patches that introduce this type of feature. Preferrably it should mirror what is implemented in lszdev (--pairs).