Changeset 3621 in MondoRescue for branches/3.3/mindi-busybox/miscutils/inotifyd.c
- Timestamp:
- Dec 20, 2016, 4:07:32 PM (7 years ago)
- Location:
- branches/3.3
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/mindi-busybox/miscutils/inotifyd.c
r3232 r3621 48 48 //usage: "\n x File can't be watched anymore" 49 49 //usage: "\nIf watching a directory:" 50 //usage: "\n mSubfile is moved into dir"51 //usage: "\n ySubfile is moved out of dir"50 //usage: "\n y Subfile is moved into dir" 51 //usage: "\n m Subfile is moved out of dir" 52 52 //usage: "\n n Subfile is created" 53 53 //usage: "\n d Subfile is deleted" … … 57 57 58 58 #include "libbb.h" 59 #include "common_bufsiz.h" 59 60 #include <sys/inotify.h> 60 61 … … 162 163 // read out all pending events 163 164 // (NB: len must be int, not ssize_t or long!) 165 #define eventbuf bb_common_bufsiz1 166 setup_common_bufsiz(); 164 167 xioctl(pfd.fd, FIONREAD, &len); 165 #define eventbuf bb_common_bufsiz1 166 ie = buf = (len <= sizeof(eventbuf)) ? eventbuf : xmalloc(len); 168 ie = buf = (len <= COMMON_BUFSIZE) ? eventbuf : xmalloc(len); 167 169 len = full_read(pfd.fd, buf, len); 168 170 // process events. N.B. events may vary in length
Note:
See TracChangeset
for help on using the changeset viewer.