Make event_buf global for inotify01 and inotify02 to prevent stack overflow
problem.
Please check the attachment.
Index: inotify01.c
===================================================================
--- inotify01.c (revision 127)
+++ inotify01.c (working copy)
@@ -73,6 +73,8 @@
int event_set[EVENT_MAX];
+char event_buf[EVENT_BUF_LEN];
+
static long myinotify_init()
{
return syscall(__NR_inotify_init);
@@ -180,7 +182,6 @@
/*
* get list on events
*/
- char event_buf[EVENT_BUF_LEN];
int len, i = 0, test_num = 0;
if ((len = read(fd_notify, event_buf, EVENT_BUF_LEN)) < 0) {
tst_brkm(TBROK, cleanup,
Index: inotify02.c
===================================================================
--- inotify02.c (revision 127)
+++ inotify02.c (working copy)
@@ -85,6 +85,8 @@
struct event_t event_set [EVENT_MAX];
+char event_buf[EVENT_BUF_LEN];
+
static long myinotify_init()
{
return syscall(__NR_inotify_init);
@@ -222,8 +224,6 @@
Tst_count = 0;
-
- char event_buf[EVENT_BUF_LEN];
int len, i = 0, test_num = 0;
if ((len = read(fd_notify, event_buf, EVENT_BUF_LEN)) < 0) {
tst_brkm(TBROK, cleanup,
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Register now and save $200. Hurry, offer ends at 11:59 p.m.,
Monday, April 7! Use priority code J8TLD2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list