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

Comparing libeio/eio.c (file contents):
Revision 1.60 by root, Fri Jan 7 21:45:42 2011 UTC vs.
Revision 1.61 by root, Fri Feb 11 00:53:24 2011 UTC

1/* 1/*
2 * libeio implementation 2 * libeio implementation
3 * 3 *
4 * Copyright (c) 2007,2008,2009,2010 Marc Alexander Lehmann <libeio@schmorp.de> 4 * Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann <libeio@schmorp.de>
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without modifica- 7 * Redistribution and use in source and binary forms, with or without modifica-
8 * tion, are permitted provided that the following conditions are met: 8 * tion, are permitted provided that the following conditions are met:
9 * 9 *
1681 case EIO_RMDIR: req->result = rmdir (req->ptr1); break; 1681 case EIO_RMDIR: req->result = rmdir (req->ptr1); break;
1682 case EIO_MKDIR: req->result = mkdir (req->ptr1, (mode_t)req->int2); break; 1682 case EIO_MKDIR: req->result = mkdir (req->ptr1, (mode_t)req->int2); break;
1683 case EIO_RENAME: req->result = rename (req->ptr1, req->ptr2); break; 1683 case EIO_RENAME: req->result = rename (req->ptr1, req->ptr2); break;
1684 case EIO_LINK: req->result = link (req->ptr1, req->ptr2); break; 1684 case EIO_LINK: req->result = link (req->ptr1, req->ptr2); break;
1685 case EIO_SYMLINK: req->result = symlink (req->ptr1, req->ptr2); break; 1685 case EIO_SYMLINK: req->result = symlink (req->ptr1, req->ptr2); break;
1686 case EIO_MKNOD: req->result = mknod (req->ptr1, (mode_t)req->int2, (dev_t)req->int3); break; 1686 case EIO_MKNOD: req->result = mknod (req->ptr1, (mode_t)req->int2, (dev_t)req->offs); break;
1687 1687
1688 case EIO_READLINK: ALLOC (PATH_MAX); 1688 case EIO_READLINK: ALLOC (PATH_MAX);
1689 req->result = readlink (req->ptr1, req->ptr2, PATH_MAX); break; 1689 req->result = readlink (req->ptr1, req->ptr2, PATH_MAX); break;
1690 1690
1691 case EIO_SYNC: req->result = 0; sync (); break; 1691 case EIO_SYNC: req->result = 0; sync (); break;
1941 REQ (EIO_READDIR); PATH; req->int1 = flags; SEND; 1941 REQ (EIO_READDIR); PATH; req->int1 = flags; SEND;
1942} 1942}
1943 1943
1944eio_req *eio_mknod (const char *path, mode_t mode, dev_t dev, int pri, eio_cb cb, void *data) 1944eio_req *eio_mknod (const char *path, mode_t mode, dev_t dev, int pri, eio_cb cb, void *data)
1945{ 1945{
1946 REQ (EIO_MKNOD); PATH; req->int2 = (long)mode; req->int3 = (long)dev; SEND; 1946 REQ (EIO_MKNOD); PATH; req->int2 = (long)mode; req->offs = (off_t)dev; SEND;
1947} 1947}
1948 1948
1949static eio_req * 1949static eio_req *
1950eio__2path (int type, const char *path, const char *new_path, int pri, eio_cb cb, void *data) 1950eio__2path (int type, const char *path, const char *new_path, int pri, eio_cb cb, void *data)
1951{ 1951{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines