Lines Matching defs:buf

415   uv_buf_t* buf;
425 buf = bufs + 0;
430 rc = pread(fd, buf->base + pos, buf->len - pos, off + result);
445 if (pos < buf->len)
449 buf += 1;
451 if (buf == end)
517 struct stat buf;
519 rc = fstat(req->file, &buf);
520 if (rc == 0 && S_ISDIR(buf.st_mode)) {
660 struct statvfs buf;
662 if (0 != statvfs(req->path, &buf))
664 struct statfs buf;
666 if (0 != statfs(req->path, &buf))
684 stat_fs->f_type = buf.f_type;
686 stat_fs->f_bsize = buf.f_bsize;
687 stat_fs->f_blocks = buf.f_blocks;
688 stat_fs->f_bfree = buf.f_bfree;
689 stat_fs->f_bavail = buf.f_bavail;
690 stat_fs->f_files = buf.f_files;
691 stat_fs->f_ffree = buf.f_ffree;
710 char* buf;
734 buf = uv__malloc(maxlen);
736 if (buf == NULL) {
742 len = os390_readlink(req->path, buf, maxlen);
744 len = readlink(req->path, buf, maxlen);
748 uv__free(buf);
754 buf = uv__reallocf(buf, len + 1);
756 if (buf == NULL)
760 buf[len] = '\0';
761 req->ptr = buf;
767 char* buf;
770 buf = realpath(req->path, NULL);
771 if (buf == NULL)
777 buf = uv__malloc(len + 1);
779 if (buf == NULL) {
784 if (realpath(req->path, buf) == NULL) {
785 uv__free(buf);
790 req->ptr = buf;
807 char buf[8192];
842 if (buflen > sizeof(buf))
843 buflen = sizeof(buf);
847 nread = pread(in_fd, buf, buflen, offset);
849 nread = read(in_fd, buf, buflen);
869 n = write(out_fd, buf + nwritten, nread - nwritten);
1160 struct utimbuf buf;
1161 buf.actime = req->atime;
1162 buf.modtime = req->mtime;
1163 return utime(req->path, &buf);
1514 uv_stat_t* buf) {
1562 buf->st_dev = makedev(statxbuf.stx_dev_major, statxbuf.stx_dev_minor);
1563 buf->st_mode = statxbuf.stx_mode;
1564 buf->st_nlink = statxbuf.stx_nlink;
1565 buf->st_uid = statxbuf.stx_uid;
1566 buf->st_gid = statxbuf.stx_gid;
1567 buf->st_rdev = makedev(statxbuf.stx_rdev_major, statxbuf.stx_rdev_minor);
1568 buf->st_ino = statxbuf.stx_ino;
1569 buf->st_size = statxbuf.stx_size;
1570 buf->st_blksize = statxbuf.stx_blksize;
1571 buf->st_blocks = statxbuf.stx_blocks;
1572 buf->st_atim.tv_sec = statxbuf.stx_atime.tv_sec;
1573 buf->st_atim.tv_nsec = statxbuf.stx_atime.tv_nsec;
1574 buf->st_mtim.tv_sec = statxbuf.stx_mtime.tv_sec;
1575 buf->st_mtim.tv_nsec = statxbuf.stx_mtime.tv_nsec;
1576 buf->st_ctim.tv_sec = statxbuf.stx_ctime.tv_sec;
1577 buf->st_ctim.tv_nsec = statxbuf.stx_ctime.tv_nsec;
1578 buf->st_birthtim.tv_sec = statxbuf.stx_btime.tv_sec;
1579 buf->st_birthtim.tv_nsec = statxbuf.stx_btime.tv_nsec;
1580 buf->st_flags = 0;
1581 buf->st_gen = 0;
1590 static int uv__fs_stat(const char *path, uv_stat_t *buf) {
1594 ret = uv__fs_statx(-1, path, /* is_fstat */ 0, /* is_lstat */ 0, buf);
1600 uv__to_stat(&pbuf, buf);
1606 static int uv__fs_lstat(const char *path, uv_stat_t *buf) {
1610 ret = uv__fs_statx(-1, path, /* is_fstat */ 0, /* is_lstat */ 1, buf);
1616 uv__to_stat(&pbuf, buf);
1622 static int uv__fs_fstat(int fd, uv_stat_t *buf) {
1626 ret = uv__fs_statx(fd, "", /* is_fstat */ 1, /* is_lstat */ 0, buf);
1632 uv__to_stat(&pbuf, buf);