Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
uv: upgrade to c468e2a
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Nov 5, 2011
1 parent 7335a42 commit 10edbbb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
18 changes: 9 additions & 9 deletions deps/uv/src/unix/linux.c
Expand Up @@ -158,7 +158,7 @@ int uv_fs_event_init(uv_loop_t* loop,
const char* filename,
uv_fs_event_cb cb,
int flags) {
int flags;
int events;
int fd;

/* We don't support any flags yet. */
Expand All @@ -174,15 +174,15 @@ int uv_fs_event_init(uv_loop_t* loop,
return -1;
}

flags = IN_ATTRIB
| IN_CREATE
| IN_MODIFY
| IN_DELETE
| IN_DELETE_SELF
| IN_MOVED_FROM
| IN_MOVED_TO;
events = IN_ATTRIB
| IN_CREATE
| IN_MODIFY
| IN_DELETE
| IN_DELETE_SELF
| IN_MOVED_FROM
| IN_MOVED_TO;

if (inotify_add_watch(fd, filename, flags) == -1) {
if (inotify_add_watch(fd, filename, events) == -1) {
uv__set_sys_error(loop, errno);
uv__close(fd);
return -1;
Expand Down
8 changes: 5 additions & 3 deletions deps/uv/test/test-fs.c
Expand Up @@ -1435,7 +1435,7 @@ TEST_IMPL(fs_file_open_append) {
ASSERT(close_req.result != -1);
uv_fs_req_cleanup(&close_req);

r = uv_fs_open(loop, &open_req1, "test_file", _O_RDWR | O_APPEND, 0, NULL);
r = uv_fs_open(loop, &open_req1, "test_file", O_RDWR | O_APPEND, 0, NULL);
ASSERT(r != -1);
ASSERT(open_req1.result != -1);
uv_fs_req_cleanup(&open_req1);
Expand All @@ -1461,7 +1461,9 @@ TEST_IMPL(fs_file_open_append) {
printf("read = %d\n", r);
ASSERT(r == 26);
ASSERT(read_req.result == 26);
ASSERT(memcmp(buf, "test-buffer\n\0test-buffer\n\0", sizeof(buf)) == 0);
ASSERT(memcmp(buf,
"test-buffer\n\0test-buffer\n\0",
sizeof("test-buffer\n\0test-buffer\n\0") - 1) == 0);
uv_fs_req_cleanup(&read_req);

r = uv_fs_close(loop, &close_req, open_req1.result, NULL);
Expand All @@ -1473,4 +1475,4 @@ TEST_IMPL(fs_file_open_append) {
unlink("test_file");

return 0;
}
}

0 comments on commit 10edbbb

Please sign in to comment.