ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libeio/eio.c
(Generate patch)

Comparing libeio/eio.c (file contents):
Revision 1.50 by root, Thu Jan 7 17:18:08 2010 UTC vs.
Revision 1.51 by root, Thu Jan 7 18:08:21 2010 UTC

49#include <stdlib.h> 49#include <stdlib.h>
50#include <string.h> 50#include <string.h>
51#include <errno.h> 51#include <errno.h>
52#include <sys/types.h> 52#include <sys/types.h>
53#include <sys/stat.h> 53#include <sys/stat.h>
54#include <sys/statvfs.h>
54#include <limits.h> 55#include <limits.h>
55#include <fcntl.h> 56#include <fcntl.h>
56#include <assert.h> 57#include <assert.h>
57 58
58#ifndef EIO_FINISH 59#ifndef EIO_FINISH
1576 case EIO_LSTAT: ALLOC (sizeof (EIO_STRUCT_STAT)); 1577 case EIO_LSTAT: ALLOC (sizeof (EIO_STRUCT_STAT));
1577 req->result = lstat (req->ptr1, (EIO_STRUCT_STAT *)req->ptr2); break; 1578 req->result = lstat (req->ptr1, (EIO_STRUCT_STAT *)req->ptr2); break;
1578 case EIO_FSTAT: ALLOC (sizeof (EIO_STRUCT_STAT)); 1579 case EIO_FSTAT: ALLOC (sizeof (EIO_STRUCT_STAT));
1579 req->result = fstat (req->int1, (EIO_STRUCT_STAT *)req->ptr2); break; 1580 req->result = fstat (req->int1, (EIO_STRUCT_STAT *)req->ptr2); break;
1580 1581
1582 case EIO_STATVFS: ALLOC (sizeof (EIO_STRUCT_STATVFS));
1583 req->result = statvfs (req->ptr1, (EIO_STRUCT_STATVFS *)req->ptr2); break;
1584 case EIO_FSTATVFS: ALLOC (sizeof (EIO_STRUCT_STATVFS));
1585 req->result = fstatvfs (req->int1, (EIO_STRUCT_STATVFS *)req->ptr2); break;
1586
1581 case EIO_CHOWN: req->result = chown (req->ptr1, req->int2, req->int3); break; 1587 case EIO_CHOWN: req->result = chown (req->ptr1, req->int2, req->int3); break;
1582 case EIO_FCHOWN: req->result = fchown (req->int1, req->int2, req->int3); break; 1588 case EIO_FCHOWN: req->result = fchown (req->int1, req->int2, req->int3); break;
1583 case EIO_CHMOD: req->result = chmod (req->ptr1, (mode_t)req->int2); break; 1589 case EIO_CHMOD: req->result = chmod (req->ptr1, (mode_t)req->int2); break;
1584 case EIO_FCHMOD: req->result = fchmod (req->int1, (mode_t)req->int2); break; 1590 case EIO_FCHMOD: req->result = fchmod (req->int1, (mode_t)req->int2); break;
1585 case EIO_TRUNCATE: req->result = truncate (req->ptr1, req->offs); break; 1591 case EIO_TRUNCATE: req->result = truncate (req->ptr1, req->offs); break;
1732eio_req *eio_fstat (int fd, int pri, eio_cb cb, void *data) 1738eio_req *eio_fstat (int fd, int pri, eio_cb cb, void *data)
1733{ 1739{
1734 REQ (EIO_FSTAT); req->int1 = fd; SEND; 1740 REQ (EIO_FSTAT); req->int1 = fd; SEND;
1735} 1741}
1736 1742
1743eio_req *eio_fstatvfs (int fd, int pri, eio_cb cb, void *data)
1744{
1745 REQ (EIO_FSTATVFS); req->int1 = fd; SEND;
1746}
1747
1737eio_req *eio_futime (int fd, double atime, double mtime, int pri, eio_cb cb, void *data) 1748eio_req *eio_futime (int fd, double atime, double mtime, int pri, eio_cb cb, void *data)
1738{ 1749{
1739 REQ (EIO_FUTIME); req->int1 = fd; req->nv1 = atime; req->nv2 = mtime; SEND; 1750 REQ (EIO_FUTIME); req->int1 = fd; req->nv1 = atime; req->nv2 = mtime; SEND;
1740} 1751}
1741 1752
1811} 1822}
1812 1823
1813eio_req *eio_lstat (const char *path, int pri, eio_cb cb, void *data) 1824eio_req *eio_lstat (const char *path, int pri, eio_cb cb, void *data)
1814{ 1825{
1815 return eio__1path (EIO_LSTAT, path, pri, cb, data); 1826 return eio__1path (EIO_LSTAT, path, pri, cb, data);
1827}
1828
1829eio_req *eio_statvfs (const char *path, int pri, eio_cb cb, void *data)
1830{
1831 return eio__1path (EIO_STATVFS, path, pri, cb, data);
1816} 1832}
1817 1833
1818eio_req *eio_unlink (const char *path, int pri, eio_cb cb, void *data) 1834eio_req *eio_unlink (const char *path, int pri, eio_cb cb, void *data)
1819{ 1835{
1820 return eio__1path (EIO_UNLINK, path, pri, cb, data); 1836 return eio__1path (EIO_UNLINK, path, pri, cb, data);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines