diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2014-11-29 00:05:10 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2014-11-29 00:05:10 -0500 |
commit | 75c8aca8a994f95a106ffde78c5645b946fb99a1 (patch) | |
tree | ae25cba2a722662b46c283f2f72c332ca6f020f2 | |
parent | 86869a2c6a7cdbde1f45ee3d6c7bf6dd120fb1cb (diff) |
common/inotify_helpers:inotify_print_event: output C-literal syntax
-rw-r--r-- | common/inotify_helpers.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/common/inotify_helpers.c b/common/inotify_helpers.c index 1b4b930..a875b8c 100644 --- a/common/inotify_helpers.c +++ b/common/inotify_helpers.c @@ -87,11 +87,11 @@ inotify_mask2str(uint32_t mask) { int inotify_print_event(struct inotify_event *event) { char *mask = inotify_mask2str(event->mask); - int ret = printf("wd:%d\n" - "\tmask:[%s]\n" - "\tcookie:%u\n" - "\tlen:%u\n" - "\tname:%s\n", + int ret = printf("{\t.wd=%d;\n" + "\t.mask=%s;\n" + "\t.cookie=%u;\n" + "\t.len=%u;\n" + "\t.name=\"%s\"; }\n", event->wd, mask, event->cookie, |