Skip to content

Commit

Permalink
reformat json printf
Browse files Browse the repository at this point in the history
  • Loading branch information
tenox7 committed Feb 9, 2021
1 parent 23c3feb commit 180c1dc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions usbmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,12 @@ void jsonstream(struct udev_device *dev) {
if(!port)
return;

printf("{ \"Port\": \"%s\", \"Serial\": \"%s\", \"Event\": \"%s\", \"Speed\": %.1f }, ",
printf("{ "\
"\"Port\": \"%s\", "\
"\"Serial\": \"%s\", "\
"\"Event\": \"%s\", "\
"\"Speed\": %.1f "\
"}, ",
port,
(serial) ? serial : "N/A",
(action) ? action : "enum",
Expand All @@ -152,7 +157,6 @@ void jsonstream(struct udev_device *dev) {
fflush(stdout);
}


void usbmon(int output) {
struct udev *udev;
struct udev_enumerate *enu;
Expand Down

0 comments on commit 180c1dc

Please sign in to comment.