Searched refs:dirfd (Results 1 - 25 of 33) sorted by relevance

12

/fuchsia/zircon/system/ulib/fdio/include/lib/fdio/
H A Dwatcher.h12 typedef zx_status_t (*watchdir_func_t)(int dirfd, int event, const char* fn, void* cookie);
40 zx_status_t fdio_watch_directory(int dirfd, watchdir_func_t cb, zx_time_t deadline, void* cookie);
/fuchsia/zircon/third_party/ulib/musl/src/stat/
H A Dfutimesat.c7 int __futimesat(int dirfd, const char* pathname, const struct timeval times[2]) { argument
20 return utimensat(dirfd, pathname, times ? ts : 0, 0);
/fuchsia/zircon/system/ulib/fdio/
H A Dwatcher.c25 static zx_status_t fdio_watcher_create(int dirfd, fdio_watcher_t** out) { argument
37 fdio_t* io = __fdio_fd_to_io(dirfd);
140 zx_status_t fdio_watch_directory(int dirfd, watchdir_func_t cb, zx_time_t deadline, void *cookie) { argument
144 if ((status = fdio_watcher_create(dirfd, &watcher)) < 0) {
150 watcher->fd = dirfd;
H A Dunistd.h20 zx_status_t __fdio_open_at(fdio_t** io, int dirfd, const char* path, int flags, uint32_t mode);
H A Dunistd.c238 // the cwd, or, for the ...at variants, dirfd. In the absolute path
240 static fdio_t* fdio_iodir(const char** path, int dirfd) { argument
254 } else if (dirfd == AT_FDCWD) {
256 } else if ((dirfd >= 0) && (dirfd < FDIO_MAX_FD)) {
257 iodir = fdio_fdtab[dirfd];
364 zx_status_t __fdio_open_at(fdio_t** io, int dirfd, const char* path, int flags, uint32_t mode) { argument
371 fdio_t* iodir = fdio_iodir(&path, dirfd);
462 static zx_status_t __fdio_opendir_containing_at(fdio_t** io, int dirfd, const char* path, argument
468 fdio_t* iodir = fdio_iodir(&path, dirfd);
961 unlinkat(int dirfd, const char* path, int flags) argument
1322 truncateat(int dirfd, const char* path, off_t len) argument
1429 vopenat(int dirfd, const char* path, int flags, va_list args) argument
1468 openat(int dirfd, const char* path, int flags, ...) argument
1482 mkdirat(int dirfd, const char* path, mode_t mode) argument
1535 fstatat(int dirfd, const char* fn, struct stat* s, int flags) argument
1629 utimensat(int dirfd, const char *fn, const struct timespec times[2], int flags) argument
1714 faccessat(int dirfd, const char* filename, int amode, int flag) argument
1916 int dirfd(DIR* dir) { function
[all...]
/fuchsia/zircon/system/utest/memfs/
H A Dmemfs-tests.cpp62 fd = openat(dirfd(d), filename, O_CREAT | O_RDWR);
113 fbl::unique_fd fd = fbl::unique_fd(openat(dirfd(d), filename, O_CREAT | O_RDWR));
132 int fd_another = openat(dirfd(d), filename_another, O_CREAT | O_RDWR);
136 ASSERT_EQ(unlinkat(dirfd(d), filename_another, 0), 0);
156 ASSERT_EQ(unlinkat(dirfd(d), "file-a", 0), 0);
157 fd = fbl::unique_fd(openat(dirfd(d), filename, O_CREAT | O_RDWR));
186 fd = openat(dirfd(d), filename, O_CREAT | O_RDWR);
244 int fd = openat(dirfd(d), "foo", O_CREAT | O_RDWR);
250 if ((fd = openat(dirfd(d), "foo", O_RDWR)) < 0) {
269 ASSERT_LT(openat(dirfd(
[all...]
H A Dfidl-tests.cpp42 fd.reset(openat(dirfd(d), filename, O_CREAT | O_RDWR));
133 fd.reset(openat(dirfd(d), filename, O_CREAT | O_RDWR));
144 ASSERT_EQ(unlinkat(dirfd(d), filename, 0), 0);
/fuchsia/zircon/system/utest/fs/
H A Dtest-directory.cpp178 int dirfd = open("::coalesce_lr", O_RDONLY | O_DIRECTORY); local
179 ASSERT_GT(dirfd, 0);
187 ASSERT_EQ(mkdirat(dirfd, buf, 0666), 0);
194 ASSERT_EQ(unlinkat(dirfd, buf, AT_REMOVEDIR), 0);
201 ASSERT_EQ(close(dirfd), 0);
203 dirfd = open("::coalesce_lr", O_RDONLY | O_DIRECTORY);
204 ASSERT_GT(dirfd, 0);
210 ASSERT_EQ(unlinkat(dirfd, buf, AT_REMOVEDIR), 0);
212 ASSERT_EQ(close(dirfd), 0);
368 ASSERT_EQ(unlinkat(dirfd(di
[all...]
H A Dtest-threading.cpp33 ASSERT_EQ(mkdirat(dirfd(d), "foo", 0666), 0);
35 ASSERT_EQ(mkdirat(dirfd(d), "foo/bar", 0666), 0);
36 ASSERT_EQ(unlinkat(dirfd(d), "foo/bar", 0), 0);
38 ASSERT_EQ(unlinkat(dirfd(d), "foo", 0), 0);
187 unlinkat(dirfd(dir), de->d_name, AT_REMOVEDIR);
H A Dtest-watcher.cpp92 fzl::FdioCaller caller(fbl::unique_fd(dirfd(dir)));
156 fzl::FdioCaller caller(fbl::unique_fd(dirfd(dir)));
229 fzl::FdioCaller caller(fbl::unique_fd(dirfd(dir)));
239 int fd = openat(dirfd(dir), "foo", O_CREAT | O_RDWR | O_EXCL);
/fuchsia/zircon/system/uapp/watch/
H A Dwatch.c11 zx_status_t callback(int dirfd, int event, const char* fn, void* cookie) { argument
/fuchsia/zircon/system/uapp/xdc-test/
H A Dxdc-device.cpp23 int fd = openat(dirfd(d), de->d_name, O_RDWR);
/fuchsia/zircon/third_party/ulib/musl/include/
H A Ddirent.h37 int dirfd(DIR*);
/fuchsia/zircon/system/core/pwrbtn-monitor/
H A Dpwrbtn-monitor.cpp121 static zx_status_t InputDeviceAdded(int dirfd, int event, const char* name, void* cookie) { argument
129 if ((raw_fd = openat(dirfd, name, O_RDWR)) < 0) {
177 fbl::unique_fd dirfd; local
184 dirfd.reset(fd);
188 zx_status_t status = fdio_watch_directory(dirfd.get(), InputDeviceAdded, ZX_TIME_INFINITE, &info);
193 dirfd.reset();
/fuchsia/zircon/system/uapp/waitfor/
H A Dwaitfor.c58 zx_status_t watchcb(int dirfd, int event, const char* fn, void* cookie) { argument
66 if ((fd = openat(dirfd, fn, O_RDONLY)) < 0) {
194 int dirfd = -1; local
246 if ((dirfd = open(path, O_DIRECTORY | O_RDONLY)) < 0) {
257 zx_status_t status = fdio_watch_directory(dirfd, watchcb, deadline, NULL);
258 close(dirfd);
/fuchsia/zircon/system/uapp/usb-test-fwloader/
H A Dusb-test-fwloader.cpp33 zx_status_t watch_dir_cb(int dirfd, int event, const char* filename, void* cookie) { argument
37 int fd = openat(dirfd, filename, O_RDWR);
55 zx_status_t status = fdio_watch_directory(dirfd(d), watch_dir_cb,
75 int fd = openat(dirfd(d), de->d_name, O_RDWR);
/fuchsia/zircon/system/core/devmgr/
H A Dblock-watcher.cpp384 static zx_status_t block_device_added(int dirfd, int event, const char* name, void* cookie) { argument
393 if ((fd = openat(dirfd, name, O_RDWR)) < 0) {
519 int dirfd; local
520 if ((dirfd = open("/dev/class/block", O_DIRECTORY | O_RDONLY)) >= 0) {
521 fdio_watch_directory(dirfd, block_device_added, ZX_TIME_INFINITE, &job);
523 close(dirfd);
H A Dfshost.cpp126 static zx_status_t misc_device_added(int dirfd, int event, const char* fn, argument
153 int dirfd = open("/dev/misc", O_DIRECTORY | O_RDONLY); local
154 if (dirfd < 0) {
158 fdio_watch_directory(dirfd, &misc_device_added, ZX_TIME_INFINITE, nullptr);
159 close(dirfd);
H A Ddevmgr-drivers.cpp115 if ((fd = openat(dirfd(dir), de->d_name, O_RDONLY)) < 0) {
/fuchsia/zircon/system/ulib/inet6/
H A Dnetifc.c252 static zx_status_t netifc_open_cb(int dirfd, int event, const char* fn, void* cookie) { argument
260 if ((netfd = openat(dirfd, fn, O_RDWR)) < 0) {
373 int dirfd; local
374 if ((dirfd = open("/dev/class/ethernet", O_DIRECTORY|O_RDONLY)) < 0) {
379 fdio_watch_directory(dirfd, netifc_open_cb, ZX_TIME_INFINITE, (void*)interface);
380 close(dirfd);
/fuchsia/zircon/third_party/ulib/musl/src/misc/
H A Dnftw.c17 #undef dirfd macro
18 #define dirfd(d) (*(int*)d) macro
/fuchsia/zircon/system/utest/usb/
H A Dusb-test.c24 int fd = openat(dirfd(d), de->d_name, O_RDWR);
/fuchsia/zircon/system/uapp/hid/
H A Dmain.cpp300 static zx_status_t hid_input_device_added(int dirfd, int event, const char* fn, void* cookie) { argument
305 int fd = openat(dirfd, fn, O_RDONLY);
328 int dirfd = open(DEV_INPUT, O_DIRECTORY|O_RDONLY); local
329 if (dirfd < 0) {
333 fdio_watch_directory(dirfd, hid_input_device_added, ZX_TIME_INFINITE, NULL);
334 close(dirfd);
/fuchsia/zircon/system/ulib/fs-management/
H A Dfvm.cpp243 auto cb = [](int dirfd, int event, const char* fn, void* cookie) {
250 fbl::unique_fd devfd(openat(dirfd, fn, O_RDWR));
271 if (fdio_watch_directory(dirfd(dir), cb, deadline, &info) != ZX_ERR_STOP) {
H A Dramdisk.cpp34 static zx_status_t driver_watcher_cb(int dirfd, int event, const char* fn, void* cookie) { argument
77 rc = fdio_watch_directory(dirfd(dir), driver_watcher_cb, deadline.get(), last);

Completed in 149 milliseconds

12