--- cvsroot/libeio/eio.h 2009/06/12 00:43:16 1.22 +++ cvsroot/libeio/eio.h 2010/01/02 14:11:32 1.25 @@ -1,7 +1,7 @@ /* * libeio API header * - * Copyright (c) 2007,2008,2009 Marc Alexander Lehmann + * Copyright (c) 2007,2008,2009,2010 Marc Alexander Lehmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- @@ -95,12 +95,24 @@ }; struct eio_dirent { - char *name; - ino_t inode; - unsigned short namelen; - unsigned char type; - unsigned char score; /* internal use */ - /* 0-4 bytes padding */ + int nameofs; /* offset of null-terminated name string in (char *)req->ptr2 */ + unsigned short namelen; /* size of filename without trailing 0 */ + unsigned char type; /* one of EIO_DT_* */ + signed char score; /* internal use */ + ino_t inode; /* the inode number, if available, otherwise unspecified */ +}; + +/* eio_msync flags */ +enum { + EIO_MS_ASYNC = 1, + EIO_MS_INVALIDATE = 2, + EIO_MS_SYNC = 4 +}; + +/* eio_mtouch flags */ + +enum { + EIO_MT_MODIFY = 1 }; /* eio_sync_file_range flags */ @@ -144,8 +156,8 @@ ssize_t result; /* result of syscall, e.g. result = read (... */ off_t offs; /* read, write, truncate, readahead, sync_file_range: file offset */ size_t size; /* read, write, readahead, sendfile, msync, sync_file_range: length */ - void *ptr1; /* all applicable requests: pathname, old name; readdir: possible output memory buffer */ - void *ptr2; /* all applicable requests: new name or memory buffer */ + void *ptr1; /* all applicable requests: pathname, old name; readdir: optional eio_dirents */ + void *ptr2; /* all applicable requests: new name or memory buffer; readdir: name strings */ eio_tstamp nv1; /* utime, futime: atime; busy: sleep time */ eio_tstamp nv2; /* utime, futime: mtime */