evtest csv formatted output patch

Sam Sebastian sebastiansam55 at gmail.com
Wed Mar 3 17:03:28 UTC 2021


It's come up a few times that csv output would be much easier to handle
than extracting it out with regex or other methods.

I've not ever done C coding but the changes were pretty trivial. The gitlab
readme for the project said to submit patch files here so see attached.

A quick summary of the changes;
it adds a new flag `--csv` along with info about the flag in the `-h`
output.
When used evtest (assuming no errors) only outputs the csv header "time,
type, type_hr, code, code_hr, value" and the corresponding values for each.
type_hr and code_hr are the "Human Readable" versions of the event type and
event code.

I'm not entirely sure how much value this has outside of my personal uses
but I made the changes and found them useful so I'd figure I would submit
them to get feedback.

Thanks,
Sam Sebastian


More information about the Input-tools mailing list