Changeset 481 for trunk/src/sh_inotify.c
- Timestamp:
- Jul 18, 2015, 5:06:52 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_inotify.c
r474 r481 135 135 int class; 136 136 int rdepth; 137 unsigned long check_ mask;137 unsigned long check_flags; 138 138 char * file; 139 139 } sh_watch; … … 236 236 int ifd = sh_inotify_getfd(); 237 237 238 len = sl_read_timeout_fd (ifd, buffer, count, timeout, S L_FALSE);238 len = sl_read_timeout_fd (ifd, buffer, count, timeout, S_FALSE); 239 239 240 240 return len; … … 364 364 365 365 char * sh_inotify_pop_dormant(sh_watches * watches, 366 int * class, unsigned long * check_ mask,366 int * class, unsigned long * check_flags, 367 367 int * type, int * rdepth) 368 368 { … … 384 384 *type = this->watch->type; 385 385 *rdepth = this->watch->rdepth; 386 *check_ mask = this->watch->check_mask;386 *check_flags = this->watch->check_flags; 387 387 popret = sh_util_strdup_track(this->watch->file, __FILE__, __LINE__); 388 388 … … 424 424 static zAVLKey sh_inotify_getkey(void const *item) 425 425 { 426 return (&(( sh_watch *)item)->watch);426 return (&((const sh_watch *)item)->watch); 427 427 } 428 428 … … 490 490 int sh_inotify_add_watch_later(const char * filename, sh_watches * watches, 491 491 int * errnum, 492 int class, unsigned long check_ mask, int type,492 int class, unsigned long check_flags, int type, 493 493 int rdepth) 494 494 { … … 500 500 item->type = (short) type; 501 501 item->rdepth = (short) rdepth; 502 item->check_ mask = check_mask;502 item->check_flags = check_flags; 503 503 504 504 sh_inotify_add_dormant(watches, item); … … 548 548 549 549 extern void sh_fInotify_report_add(char * path, 550 int class, unsigned long check_ mask);550 int class, unsigned long check_flags); 551 551 552 552 sh_dummy_litem = (void*) &litem; … … 575 575 SH_MUTEX_UNLOCK(mutex_watches); 576 576 577 sh_fInotify_report_add(litem->file, litem->class, litem->check_ mask);577 sh_fInotify_report_add(litem->file, litem->class, litem->check_flags); 578 578 579 579 litem = sh_inotify_list_del_cur(&listcursor, save); … … 592 592 */ 593 593 int sh_inotify_add_watch(char * filename, sh_watches * watches, int * errnum, 594 int class, unsigned long check_ mask, int type, int rdepth)594 int class, unsigned long check_flags, int type, int rdepth) 595 595 { 596 596 volatile int retval = 0; … … 637 637 item->type = type; 638 638 item->rdepth = rdepth; 639 item->check_ mask = check_mask;639 item->check_flags = check_flags; 640 640 641 641 if (NULL == watches->list_of_watches) … … 692 692 693 693 char * sh_inotify_search_item(sh_watches * watches, int watch, 694 int * class, unsigned long * check_ mask,694 int * class, unsigned long * check_flags, 695 695 int * type, int * rdepth) 696 696 { … … 709 709 { 710 710 *class = item->class; 711 *check_ mask = item->check_mask;711 *check_flags = item->check_flags; 712 712 *type = item->type; 713 713 *rdepth = item->rdepth; … … 882 882 883 883 int sh_inotify_add_watch(char * filename, sh_watches * watches, int * errnum, 884 int class, unsigned long check_ mask, int type, int rdepth)884 int class, unsigned long check_flags, int type, int rdepth) 885 885 { 886 886 (void) filename; 887 887 (void) watches; 888 888 (void) class; 889 (void) check_ mask;889 (void) check_flags; 890 890 (void) type; 891 891 (void) rdepth; … … 898 898 int sh_inotify_add_watch_later(const char * filename, sh_watches * watches, 899 899 int * errnum, 900 int class, unsigned long check_ mask, int type, int rdepth)900 int class, unsigned long check_flags, int type, int rdepth) 901 901 { 902 902 (void) filename; 903 903 (void) watches; 904 904 (void) class; 905 (void) check_ mask;905 (void) check_flags; 906 906 (void) type; 907 907 (void) rdepth; … … 927 927 int type; 928 928 int rdepth; 929 unsigned long check_ mask;929 unsigned long check_flags; 930 930 int nrun = 0; 931 931 … … 1022 1022 CuAssertIntEquals(tc, count, 5); 1023 1023 1024 p = sh_inotify_pop_dormant(&twatch, &class, &check_ mask, &type, &rdepth);1024 p = sh_inotify_pop_dormant(&twatch, &class, &check_flags, &type, &rdepth); 1025 1025 CuAssertStrEquals(tc, p, "a5"); 1026 1026 1027 p = sh_inotify_pop_dormant(&twatch, &class, &check_ mask, &type, &rdepth);1027 p = sh_inotify_pop_dormant(&twatch, &class, &check_flags, &type, &rdepth); 1028 1028 CuAssertStrEquals(tc, p, "a3"); 1029 1029 CuAssertIntEquals(tc, class, 3); 1030 1030 1031 p = sh_inotify_pop_dormant(&twatch, &class, &check_ mask, &type, &rdepth);1031 p = sh_inotify_pop_dormant(&twatch, &class, &check_flags, &type, &rdepth); 1032 1032 CuAssertTrue(tc, NULL == p); 1033 1033 CuAssertTrue(tc, NULL == twatch.dormant_watches);
Note:
See TracChangeset
for help on using the changeset viewer.