From: Garrett C. <yan...@gm...> - 2012-04-05 00:46:24
|
Replace struct event_t with struct inotify_event Also do some minor whitespace cleanup while I'm in the neighborhood. Signed-off-by: Garrett Cooper <yan...@gm...> --- testcases/kernel/syscalls/inotify/inotify02.c | 13 ++++--------- 1 files changed, 4 insertions(+), 9 deletions(-) --------------1.7.2.5 Content-Type: text/x-patch; name="0002-Replace-struct-event_t-with-struct-inotify_event.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0002-Replace-struct-event_t-with-struct-inotify_event.patch" diff --git a/testcases/kernel/syscalls/inotify/inotify02.c b/testcases/kernel/syscalls/inotify/inotify02.c index 59f83ba..c87797f 100644 --- a/testcases/kernel/syscalls/inotify/inotify02.c +++ b/testcases/kernel/syscalls/inotify/inotify02.c @@ -81,15 +81,10 @@ char buf[BUF_SIZE]; int fd, fd_notify; int wd; -struct event_t { - char name[BUF_SIZE]; - int mask; - int len; -}; #define FILE_NAME1 "test_file1" #define FILE_NAME2 "test_file2" -struct event_t event_set[EVENT_MAX]; +struct inotify_event event_set[EVENT_MAX]; char event_buf[EVENT_BUF_LEN]; @@ -239,7 +234,7 @@ int main(int ac, char **av) "1c17d18e3775485bf1e0ce79575eb637a94494a2."); tst_resm(TFAIL, "get unnecessary event: " - "wd=%d mask=%x cookie=%u len=%u" + "wd=%d mask=%x cookie=%u len=%u " "name=\"%s\"", event->wd, event->mask, event->cookie, event->len, event->name); @@ -250,8 +245,8 @@ int main(int ac, char **av) (event_set[test_num].name, event->name, event->len))) { tst_resm(TPASS, - "get event: wd=%d mask=%x" - " cookie=%u len=%u name=\"%s\"", + "get event: wd=%d mask=%x " + "cookie=%u len=%u name=\"%s\"", event->wd, event->mask, event->cookie, event->len, event->name); |