view release on metacpan or search on metacpan
libuv-1.49.2/ChangeLog view on Meta::CPAN
* zos: use correct pointer type in strnlen (jBarz)
* unix,win: merge handle flags (Ben Noordhuis)
* doc: update Imran Iqbal's GitHub handle (cjihrig)
* src: add new error apis to prevent memory leaks (Shelley Vohr)
* test: make test-condvar call uv_cond_wait (Jamie Davis)
* fs: change position of uv_fs_lchown (Ujjwal Sharma)
2018.06.23, Version 1.21.0 (Stable), e4983a9b0c152932f7553ff4a9ff189d2314cdcb
Changes since version 1.20.3:
* unix,windows: map EFTYPE errno (cjihrig)
* win: perform case insensitive PATH= comparison (cjihrig)
libuv-1.49.2/ChangeLog view on Meta::CPAN
* unix: set errno in uv_fs_copyfile() (cjihrig)
* samples: fix inconsistency in parse_opts vs usage (zyxwvu Shi)
* linux: handle exclusive POLLHUP with UV_DISCONNECT (Brad King)
* include: declare uv_cpu_times_s in higher scope (Peter Johnson)
* doc: add uv_fs_fsync() AIX limitations (jBarz)
* unix,win: add uv_fs_lchown() (Paolo Greppi)
* unix: disable clang variable length array warning (Peter Johnson)
* doc: document uv_pipe_t::ipc (Ed Schouten)
* doc: undocument uv_req_type's UV_REQ_TYPE_PRIVATE (Ed Schouten)
* doc: document UV_*_MAP() macros (Ed Schouten)
* win: remove use of min() macro in pipe.c (Peter Johnson)
libuv-1.49.2/ChangeLog view on Meta::CPAN
* doc: document uv_async_(init|send) return values (Ben Noordhuis)
* doc: add Android as a tier 3 supported platform (Saúl Ibarra Corretgé)
* unix: add missing semicolon (jBarz)
* win, test: fix double close in test runner (Bartosz Sosnowski)
* doc: update supported windows version baseline (Ben Noordhuis)
* test,zos: skip chown root test (jBarz)
* test,zos: use gid=-1 to test spawn_setgid_fails (jBarz)
* zos: fix hr timer resolution (jBarz)
* android: fix blocking recvmsg due to netlink bug (Jacob Segal)
* zos: read more accurate rss info from RSM (jBarz)
* win: allow bound/connected socket in uv_tcp_open() (Maciej Szeptuch
libuv-1.49.2/ChangeLog view on Meta::CPAN
Changes since version 0.10.13:
* unix: retry waitpid() on EINTR (Ben Noordhuis)
2013.08.07, Version 0.11.7 (Unstable), 3cad361f8776f70941b39d65bd9426bcb1aa817b
Changes since version 0.11.6:
* unix, windows: fix uv_fs_chown() function prototype (Ben Noordhuis)
* unix, windows: remove unused variables (Brian White)
* test: fix signed/unsigned comparison warnings (Ben Noordhuis)
* build: dtrace shouldn't break out of tree builds (Timothy J. Fontaine)
* unix, windows: don't read/recv if buf.len==0 (Ben Noordhuis)
* build: add mingw makefile (Ben Noordhuis)
libuv-1.49.2/ChangeLog view on Meta::CPAN
* test: add windows-only snprintf() function (Ben Noordhuis)
* build: add automake serial-tests version check (Ben Noordhuis)
2013.07.26, Version 0.10.13 (Stable), 381312e1fe6fecbabc943ccd56f0e7d114b3d064
Changes since version 0.10.12:
* unix, windows: fix uv_fs_chown() function prototype (Ben Noordhuis)
2013.07.21, Version 0.11.6 (Unstable), 6645b93273e0553d23823c576573b82b129bf28c
Changes since version 0.11.5:
* test: open stdout fd in write-only mode (Ben Noordhuis)
* windows: uv_spawn shouldn't reject reparse points (Bert Belder)
libuv-1.49.2/ChangeLog view on Meta::CPAN
* unix, windows: add extra fields to uv_stat_t (Saúl Ibarra Corretgé)
* build: add install target to the makefile (Navaneeth Kedaram Nambiathan)
* build: switch to autotools (Ben Noordhuis)
* build: use AM_PROG_AR conditionally (Ben Noordhuis)
* test: fix fs_fstat test on sunos (Ben Noordhuis)
* test: fix fs_chown when running as root (Ben Noordhuis)
* test: fix spawn_setgid_fails and spawn_setuid_fails (Ben Noordhuis)
* build: use AM_SILENT_RULES conditionally (Ben Noordhuis)
* build: add DTrace detection for autotools (Timothy J. Fontaine)
* linux,darwin,win: link-local IPv6 addresses (Miroslav Bajtoš)
* unix: fix build when !defined(PTHREAD_MUTEX_ERRORCHECK) (Ben Noordhuis)
libuv-1.49.2/docs/src/fs.rst view on Meta::CPAN
- Resolved path bypasses subst'd drives.
While this function can still be used, it's not recommended if scenarios such as the
above need to be supported.
The background story and some more details on these issues can be checked
`here <https://github.com/nodejs/node/issues/7726>`_.
.. versionadded:: 1.8.0
.. c:function:: int uv_fs_chown(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_uid_t uid, uv_gid_t gid, uv_fs_cb cb)
.. c:function:: int uv_fs_fchown(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_uid_t uid, uv_gid_t gid, uv_fs_cb cb)
.. c:function:: int uv_fs_lchown(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_uid_t uid, uv_gid_t gid, uv_fs_cb cb)
Equivalent to :man:`chown(2)`, :man:`fchown(2)` and :man:`lchown(2)` respectively.
.. note::
These functions are not implemented on Windows.
.. versionchanged:: 1.21.0 implemented uv_fs_lchown
.. c:function:: uv_fs_type uv_fs_get_type(const uv_fs_t* req)
Returns `req->fs_type`.
.. versionadded:: 1.19.0
.. c:function:: ssize_t uv_fs_get_result(const uv_fs_t* req)
Returns `req->result`.
libuv-1.49.2/docs/src/guide/filesystem.rst view on Meta::CPAN
int uv_fs_chmod(uv_loop_t* loop, uv_fs_t* req, const char* path, int mode, uv_fs_cb cb);
int uv_fs_utime(uv_loop_t* loop, uv_fs_t* req, const char* path, double atime, double mtime, uv_fs_cb cb);
int uv_fs_futime(uv_loop_t* loop, uv_fs_t* req, uv_file file, double atime, double mtime, uv_fs_cb cb);
int uv_fs_lutime(uv_loop_t* loop, uv_fs_t* req, const char* path, double atime, double mtime, uv_fs_cb cb);
int uv_fs_lstat(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb);
int uv_fs_link(uv_loop_t* loop, uv_fs_t* req, const char* path, const char* new_path, uv_fs_cb cb);
int uv_fs_symlink(uv_loop_t* loop, uv_fs_t* req, const char* path, const char* new_path, int flags, uv_fs_cb cb);
int uv_fs_readlink(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb);
int uv_fs_realpath(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb);
int uv_fs_fchmod(uv_loop_t* loop, uv_fs_t* req, uv_file file, int mode, uv_fs_cb cb);
int uv_fs_chown(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_uid_t uid, uv_gid_t gid, uv_fs_cb cb);
int uv_fs_fchown(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_uid_t uid, uv_gid_t gid, uv_fs_cb cb);
int uv_fs_lchown(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_uid_t uid, uv_gid_t gid, uv_fs_cb cb);
int uv_fs_statfs(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_fs_cb cb);
.. _buffers-and-streams:
Buffers and Streams
-------------------
The basic I/O handle in libuv is the stream (``uv_stream_t``). TCP sockets, UDP
sockets, and pipes for file I/O and IPC are all treated as stream subclasses.
libuv-1.49.2/include/uv.h view on Meta::CPAN
uv_fs_cb cb);
UV_EXTERN int uv_fs_realpath(uv_loop_t* loop,
uv_fs_t* req,
const char* path,
uv_fs_cb cb);
UV_EXTERN int uv_fs_fchmod(uv_loop_t* loop,
uv_fs_t* req,
uv_file file,
int mode,
uv_fs_cb cb);
UV_EXTERN int uv_fs_chown(uv_loop_t* loop,
uv_fs_t* req,
const char* path,
uv_uid_t uid,
uv_gid_t gid,
uv_fs_cb cb);
UV_EXTERN int uv_fs_fchown(uv_loop_t* loop,
uv_fs_t* req,
uv_file file,
uv_uid_t uid,
uv_gid_t gid,
uv_fs_cb cb);
UV_EXTERN int uv_fs_lchown(uv_loop_t* loop,
uv_fs_t* req,
const char* path,
uv_uid_t uid,
uv_gid_t gid,
uv_fs_cb cb);
UV_EXTERN int uv_fs_statfs(uv_loop_t* loop,
uv_fs_t* req,
const char* path,
uv_fs_cb cb);
libuv-1.49.2/src/unix/fs.c view on Meta::CPAN
err = UV__ERR(errno);
goto out;
}
/*
* Change the ownership and permissions of the destination file to match the
* source file.
* `cp -p` does not care about errors here, so we don't either. Reuse the
* `result` variable to silence a -Wunused-result warning.
*/
result = fchown(dstfd, src_statsbuf.st_uid, src_statsbuf.st_gid);
if (fchmod(dstfd, src_statsbuf.st_mode) == -1) {
err = UV__ERR(errno);
#ifdef __linux__
/* fchmod() on CIFS shares always fails with EPERM unless the share is
* mounted with "noperm". As fchmod() is a meaningless operation on such
* shares anyway, detect that condition and squelch the error.
*/
if (err != UV_EPERM)
goto out;
libuv-1.49.2/src/unix/fs.c view on Meta::CPAN
errno = 0;
#define X(type, action) \
case UV_FS_ ## type: \
r = action; \
break;
switch (req->fs_type) {
X(ACCESS, access(req->path, req->flags));
X(CHMOD, chmod(req->path, req->mode));
X(CHOWN, chown(req->path, req->uid, req->gid));
X(CLOSE, uv__fs_close(req->file));
X(COPYFILE, uv__fs_copyfile(req));
X(FCHMOD, fchmod(req->file, req->mode));
X(FCHOWN, fchown(req->file, req->uid, req->gid));
X(LCHOWN, lchown(req->path, req->uid, req->gid));
X(FDATASYNC, uv__fs_fdatasync(req));
X(FSTAT, uv__fs_fstat(req->file, &req->statbuf));
X(FSYNC, uv__fs_fsync(req));
X(FTRUNCATE, ftruncate(req->file, req->off));
X(FUTIME, uv__fs_futime(req));
X(LUTIME, uv__fs_lutime(req));
X(LSTAT, uv__fs_lstat(req->path, &req->statbuf));
X(LINK, link(req->path, req->new_path));
X(MKDIR, mkdir(req->path, req->mode));
X(MKDTEMP, uv__fs_mkdtemp(req));
libuv-1.49.2/src/unix/fs.c view on Meta::CPAN
const char* path,
int mode,
uv_fs_cb cb) {
INIT(CHMOD);
PATH;
req->mode = mode;
POST;
}
int uv_fs_chown(uv_loop_t* loop,
uv_fs_t* req,
const char* path,
uv_uid_t uid,
uv_gid_t gid,
uv_fs_cb cb) {
INIT(CHOWN);
PATH;
req->uid = uid;
req->gid = gid;
POST;
libuv-1.49.2/src/unix/fs.c view on Meta::CPAN
uv_file file,
int mode,
uv_fs_cb cb) {
INIT(FCHMOD);
req->file = file;
req->mode = mode;
POST;
}
int uv_fs_fchown(uv_loop_t* loop,
uv_fs_t* req,
uv_file file,
uv_uid_t uid,
uv_gid_t gid,
uv_fs_cb cb) {
INIT(FCHOWN);
req->file = file;
req->uid = uid;
req->gid = gid;
POST;
}
int uv_fs_lchown(uv_loop_t* loop,
uv_fs_t* req,
const char* path,
uv_uid_t uid,
uv_gid_t gid,
uv_fs_cb cb) {
INIT(LCHOWN);
PATH;
req->uid = uid;
req->gid = gid;
POST;
libuv-1.49.2/src/win/fs.c view on Meta::CPAN
SET_REQ_WIN32_ERROR(req, GetLastError());
return;
}
CloseHandle(handle);
req->flags |= UV_FS_FREE_PTR;
SET_REQ_RESULT(req, 0);
}
static void fs__chown(uv_fs_t* req) {
SET_REQ_RESULT(req, 0);
}
static void fs__fchown(uv_fs_t* req) {
SET_REQ_RESULT(req, 0);
}
static void fs__lchown(uv_fs_t* req) {
SET_REQ_RESULT(req, 0);
}
static void fs__statfs(uv_fs_t* req) {
uv_statfs_t* stat_fs;
DWORD sectors_per_cluster;
DWORD bytes_per_sector;
DWORD free_clusters;
DWORD total_clusters;
libuv-1.49.2/src/win/fs.c view on Meta::CPAN
XX(MKSTEMP, mkstemp)
XX(RENAME, rename)
XX(SCANDIR, scandir)
XX(READDIR, readdir)
XX(OPENDIR, opendir)
XX(CLOSEDIR, closedir)
XX(LINK, link)
XX(SYMLINK, symlink)
XX(READLINK, readlink)
XX(REALPATH, realpath)
XX(CHOWN, chown)
XX(FCHOWN, fchown)
XX(LCHOWN, lchown)
XX(STATFS, statfs)
default:
assert(!"bad uv_fs_type");
}
}
static void uv__fs_done(struct uv__work* w, int status) {
uv_fs_t* req;
libuv-1.49.2/src/win/fs.c view on Meta::CPAN
err = fs__capture_path(req, path, NULL, cb != NULL);
if (err) {
SET_REQ_WIN32_ERROR(req, err);
return req->result;
}
POST;
}
int uv_fs_chown(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_uid_t uid,
uv_gid_t gid, uv_fs_cb cb) {
int err;
INIT(UV_FS_CHOWN);
err = fs__capture_path(req, path, NULL, cb != NULL);
if (err) {
SET_REQ_WIN32_ERROR(req, err);
return req->result;
}
POST;
}
int uv_fs_fchown(uv_loop_t* loop, uv_fs_t* req, uv_file fd, uv_uid_t uid,
uv_gid_t gid, uv_fs_cb cb) {
INIT(UV_FS_FCHOWN);
POST;
}
int uv_fs_lchown(uv_loop_t* loop, uv_fs_t* req, const char* path, uv_uid_t uid,
uv_gid_t gid, uv_fs_cb cb) {
int err;
INIT(UV_FS_LCHOWN);
err = fs__capture_path(req, path, NULL, cb != NULL);
if (err) {
SET_REQ_WIN32_ERROR(req, err);
return req->result;
}
libuv-1.49.2/test/test-fs.c view on Meta::CPAN
static int stat_cb_count;
static int rename_cb_count;
static int fsync_cb_count;
static int fdatasync_cb_count;
static int ftruncate_cb_count;
static int sendfile_cb_count;
static int fstat_cb_count;
static int access_cb_count;
static int chmod_cb_count;
static int fchmod_cb_count;
static int chown_cb_count;
static int fchown_cb_count;
static int lchown_cb_count;
static int link_cb_count;
static int symlink_cb_count;
static int readlink_cb_count;
static int realpath_cb_count;
static int utime_cb_count;
static int futime_cb_count;
static int lutime_cb_count;
static int statfs_cb_count;
static uv_loop_t* loop;
libuv-1.49.2/test/test-fs.c view on Meta::CPAN
static void chmod_cb(uv_fs_t* req) {
ASSERT_EQ(req->fs_type, UV_FS_CHMOD);
ASSERT_OK(req->result);
chmod_cb_count++;
uv_fs_req_cleanup(req);
check_permission("test_file", *(int*)req->data);
}
static void fchown_cb(uv_fs_t* req) {
ASSERT_EQ(req->fs_type, UV_FS_FCHOWN);
ASSERT_OK(req->result);
fchown_cb_count++;
uv_fs_req_cleanup(req);
}
static void chown_cb(uv_fs_t* req) {
ASSERT_EQ(req->fs_type, UV_FS_CHOWN);
ASSERT_OK(req->result);
chown_cb_count++;
uv_fs_req_cleanup(req);
}
static void lchown_cb(uv_fs_t* req) {
ASSERT_EQ(req->fs_type, UV_FS_LCHOWN);
ASSERT_OK(req->result);
lchown_cb_count++;
uv_fs_req_cleanup(req);
}
static void chown_root_cb(uv_fs_t* req) {
ASSERT_EQ(req->fs_type, UV_FS_CHOWN);
#if defined(_WIN32) || defined(__MSYS__)
/* On windows, chown is a no-op and always succeeds. */
ASSERT_OK(req->result);
#else
/* On unix, chown'ing the root directory is not allowed -
* unless you're root, of course.
*/
if (geteuid() == 0)
ASSERT_OK(req->result);
else
# if defined(__CYGWIN__)
/* On Cygwin, uid 0 is invalid (no root). */
ASSERT_EQ(req->result, UV_EINVAL);
# elif defined(__PASE__)
/* On IBMi PASE, there is no root user. uid 0 is user qsecofr.
* User may grant qsecofr's privileges, including changing
* the file's ownership to uid 0.
*/
ASSERT(req->result == 0 || req->result == UV_EPERM);
# else
ASSERT_EQ(req->result, UV_EPERM);
# endif
#endif
chown_cb_count++;
uv_fs_req_cleanup(req);
}
static void unlink_cb(uv_fs_t* req) {
ASSERT_PTR_EQ(req, &unlink_req);
ASSERT_EQ(req->fs_type, UV_FS_UNLINK);
ASSERT_OK(req->result);
unlink_cb_count++;
uv_fs_req_cleanup(req);
}
libuv-1.49.2/test/test-fs.c view on Meta::CPAN
/* Cleanup. */
uv_fs_chmod(NULL, &req, "test_file", 0600, NULL);
uv_fs_req_cleanup(&req);
unlink("test_file");
MAKE_VALGRIND_HAPPY(loop);
return 0;
}
#endif
TEST_IMPL(fs_chown) {
int r;
uv_fs_t req;
uv_file file;
/* Setup. */
unlink("test_file");
unlink("test_file_link");
loop = uv_default_loop();
r = uv_fs_open(NULL, &req, "test_file", UV_FS_O_RDWR | UV_FS_O_CREAT,
S_IWUSR | S_IRUSR, NULL);
ASSERT_GE(r, 0);
ASSERT_GE(req.result, 0);
file = req.result;
uv_fs_req_cleanup(&req);
/* sync chown */
r = uv_fs_chown(NULL, &req, "test_file", -1, -1, NULL);
ASSERT_OK(r);
ASSERT_OK(req.result);
uv_fs_req_cleanup(&req);
/* sync fchown */
r = uv_fs_fchown(NULL, &req, file, -1, -1, NULL);
ASSERT_OK(r);
ASSERT_OK(req.result);
uv_fs_req_cleanup(&req);
/* async chown */
r = uv_fs_chown(loop, &req, "test_file", -1, -1, chown_cb);
ASSERT_OK(r);
uv_run(loop, UV_RUN_DEFAULT);
ASSERT_EQ(1, chown_cb_count);
#ifndef __MVS__
/* chown to root (fail) */
chown_cb_count = 0;
r = uv_fs_chown(loop, &req, "test_file", 0, 0, chown_root_cb);
ASSERT_OK(r);
uv_run(loop, UV_RUN_DEFAULT);
ASSERT_EQ(1, chown_cb_count);
#endif
/* async fchown */
r = uv_fs_fchown(loop, &req, file, -1, -1, fchown_cb);
ASSERT_OK(r);
uv_run(loop, UV_RUN_DEFAULT);
ASSERT_EQ(1, fchown_cb_count);
#ifndef __HAIKU__
/* Haiku doesn't support hardlink */
/* sync link */
r = uv_fs_link(NULL, &req, "test_file", "test_file_link", NULL);
ASSERT_OK(r);
ASSERT_OK(req.result);
uv_fs_req_cleanup(&req);
/* sync lchown */
r = uv_fs_lchown(NULL, &req, "test_file_link", -1, -1, NULL);
ASSERT_OK(r);
ASSERT_OK(req.result);
uv_fs_req_cleanup(&req);
/* async lchown */
r = uv_fs_lchown(loop, &req, "test_file_link", -1, -1, lchown_cb);
ASSERT_OK(r);
uv_run(loop, UV_RUN_DEFAULT);
ASSERT_EQ(1, lchown_cb_count);
#endif
/* Close file */
r = uv_fs_close(NULL, &req, file, NULL);
ASSERT_OK(r);
ASSERT_OK(req.result);
uv_fs_req_cleanup(&req);
/*
* Run the loop just to check we don't have make any extraneous uv_ref()
libuv-1.49.2/test/test-fs.c view on Meta::CPAN
r = uv_fs_symlink(NULL, NULL, NULL, NULL, 0, NULL);
ASSERT_EQ(r, UV_EINVAL);
r = uv_fs_readlink(NULL, NULL, NULL, NULL);
ASSERT_EQ(r, UV_EINVAL);
r = uv_fs_realpath(NULL, NULL, NULL, NULL);
ASSERT_EQ(r, UV_EINVAL);
r = uv_fs_chown(NULL, NULL, NULL, 0, 0, NULL);
ASSERT_EQ(r, UV_EINVAL);
r = uv_fs_fchown(NULL, NULL, 0, 0, 0, NULL);
ASSERT_EQ(r, UV_EINVAL);
r = uv_fs_stat(NULL, NULL, NULL, NULL);
ASSERT_EQ(r, UV_EINVAL);
r = uv_fs_lstat(NULL, NULL, NULL, NULL);
ASSERT_EQ(r, UV_EINVAL);
r = uv_fs_fstat(NULL, NULL, 0, NULL);
ASSERT_EQ(r, UV_EINVAL);
libuv-1.49.2/test/test-list.h view on Meta::CPAN
TEST_DECLARE (fs_mkstemp)
TEST_DECLARE (fs_fstat)
TEST_DECLARE (fs_fstat_stdio)
TEST_DECLARE (fs_access)
TEST_DECLARE (fs_chmod)
TEST_DECLARE (fs_copyfile)
TEST_DECLARE (fs_unlink_readonly)
#ifdef _WIN32
TEST_DECLARE (fs_unlink_archive_readonly)
#endif
TEST_DECLARE (fs_chown)
TEST_DECLARE (fs_link)
TEST_DECLARE (fs_readlink)
TEST_DECLARE (fs_realpath)
TEST_DECLARE (fs_symlink)
TEST_DECLARE (fs_symlink_dir)
#ifdef _WIN32
TEST_DECLARE (fs_symlink_junction)
TEST_DECLARE (fs_non_symlink_reparse_point)
TEST_DECLARE (fs_lstat_windows_store_apps)
TEST_DECLARE (fs_open_flags)
libuv-1.49.2/test/test-list.h view on Meta::CPAN
TEST_ENTRY (fs_mkstemp)
TEST_ENTRY (fs_fstat)
TEST_ENTRY (fs_fstat_stdio)
TEST_ENTRY (fs_access)
TEST_ENTRY (fs_chmod)
TEST_ENTRY (fs_copyfile)
TEST_ENTRY (fs_unlink_readonly)
#ifdef _WIN32
TEST_ENTRY (fs_unlink_archive_readonly)
#endif
TEST_ENTRY (fs_chown)
TEST_ENTRY (fs_link)
TEST_ENTRY (fs_utime)
TEST_ENTRY (fs_utime_round)
TEST_ENTRY (fs_futime)
TEST_ENTRY (fs_lutime)
TEST_ENTRY (fs_readlink)
TEST_ENTRY (fs_realpath)
TEST_ENTRY (fs_symlink)
TEST_ENTRY (fs_symlink_dir)
#ifdef _WIN32
libuv-1.49.2/test/test-threadpool-cancel.c view on Meta::CPAN
uv_buf_t iov;
INIT_CANCEL_INFO(&ci, reqs);
loop = uv_default_loop();
saturate_threadpool();
iov = uv_buf_init(NULL, 0);
/* Needs to match ARRAY_SIZE(fs_reqs). */
n = 0;
ASSERT_OK(uv_fs_chmod(loop, reqs + n++, "/", 0, fs_cb));
ASSERT_OK(uv_fs_chown(loop, reqs + n++, "/", 0, 0, fs_cb));
ASSERT_OK(uv_fs_close(loop, reqs + n++, 0, fs_cb));
ASSERT_OK(uv_fs_fchmod(loop, reqs + n++, 0, 0, fs_cb));
ASSERT_OK(uv_fs_fchown(loop, reqs + n++, 0, 0, 0, fs_cb));
ASSERT_OK(uv_fs_fdatasync(loop, reqs + n++, 0, fs_cb));
ASSERT_OK(uv_fs_fstat(loop, reqs + n++, 0, fs_cb));
ASSERT_OK(uv_fs_fsync(loop, reqs + n++, 0, fs_cb));
ASSERT_OK(uv_fs_ftruncate(loop, reqs + n++, 0, 0, fs_cb));
ASSERT_OK(uv_fs_futime(loop, reqs + n++, 0, 0, 0, fs_cb));
ASSERT_OK(uv_fs_link(loop, reqs + n++, "/", "/", fs_cb));
ASSERT_OK(uv_fs_lstat(loop, reqs + n++, "/", fs_cb));
ASSERT_OK(uv_fs_mkdir(loop, reqs + n++, "/", 0, fs_cb));
ASSERT_OK(uv_fs_open(loop, reqs + n++, "/", 0, 0, fs_cb));
ASSERT_OK(uv_fs_read(loop, reqs + n++, -1, &iov, 1, 0, fs_cb));