X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/6d2010ae8f7a6078e10b361c6962983bab233e0f..3e170ce000f1506b7b5d2c5c7faec85ceabb573d:/bsd/sys/vnode_if.h diff --git a/bsd/sys/vnode_if.h b/bsd/sys/vnode_if.h index 33ae10047..f2a0be407 100644 --- a/bsd/sys/vnode_if.h +++ b/bsd/sys/vnode_if.h @@ -1,6 +1,6 @@ /* - * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2000-2014 Apple Computer, Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * @@ -100,7 +100,7 @@ extern struct vnodeop_desc vnop_compound_mkdir_desc; extern struct vnodeop_desc vnop_compound_rmdir_desc; #endif /* KERNEL_PRIVATE */ extern struct vnodeop_desc vnop_create_desc; -extern struct vnodeop_desc vnop_whiteout_desc; +extern struct vnodeop_desc vnop_whiteout_desc; // obsolete extern struct vnodeop_desc vnop_mknod_desc; extern struct vnodeop_desc vnop_open_desc; extern struct vnodeop_desc vnop_close_desc; @@ -124,6 +124,7 @@ extern struct vnodeop_desc vnop_rmdir_desc; extern struct vnodeop_desc vnop_symlink_desc; extern struct vnodeop_desc vnop_readdir_desc; extern struct vnodeop_desc vnop_readdirattr_desc; +extern struct vnodeop_desc vnop_getattrlistbulk_desc; extern struct vnodeop_desc vnop_readlink_desc; extern struct vnodeop_desc vnop_inactive_desc; extern struct vnodeop_desc vnop_reclaim_desc; @@ -214,7 +215,7 @@ struct vnop_whiteout_args { /*! @function VNOP_WHITEOUT - @abstract Call down to a filesystem to create a whiteout. + @abstract Obsolete - no longer supported. @discussion Whiteouts are used to support the union filesystem, whereby one filesystem is mounted "transparently" on top of another. A whiteout in the upper layer of a union mount is a "deletion" of a file in the lower layer; lookups will catch the whiteout and fail, setting ISWHITEOUT in the componentname structure, even if an underlying @@ -295,9 +296,6 @@ struct vnop_compound_open_args { void *a_reserved; }; -/* Control flags */ -#define VNOP_COMPOUND_OPEN_DO_CREATE 0x00000001 - /* Results */ #define COMPOUND_OPEN_STATUS_DID_CREATE 0x00000001 #endif /* KERNEL_PRIVATE */ @@ -955,6 +953,38 @@ struct vnop_readdirattr_args { extern errno_t VNOP_READDIRATTR(vnode_t, struct attrlist *, struct uio *, uint32_t, uint32_t, uint32_t *, int *, uint32_t *, vfs_context_t); #endif /* XNU_KERNEL_PRIVATE */ +struct vnop_getattrlistbulk_args { + struct vnodeop_desc *a_desc; + vnode_t a_vp; + struct attrlist *a_alist; + struct vnode_attr *a_vap; + struct uio *a_uio; + void *a_private; + uint64_t a_options; + int32_t *a_eofflag; + int32_t *a_actualcount; + vfs_context_t a_context; +}; + +/*! + @function VNOP_GETATTRLISTBULK + @abstract Call down to get file attributes for many files in a directory at once. + @discussion VNOP_GETATTRLISTBULK() packs a buffer with file attributes, as if the results of many "getattrlist" calls. + @param vp Directory in which to enumerate entries' attributes. + @param alist Which attributes are wanted for each directory entry. + @param uio Destination information for resulting attributes. + @param vap initialised vnode_attr structure pointer. This structure also has memory allocated (MAXPATHLEN bytes) and assigned to the va_name field for filesystems to use. + @param private reserved for future use. + @param options + @param eofflag Should be set to 1 if the end of the directory has been reached. + @param actualcount Should be set to number of files whose attributes were written into buffer. + @param ctx Context to authenticate for getattrlistbulk request. + @return 0 for success, else an error code. + */ +#ifdef XNU_KERNEL_PRIVATE +extern errno_t VNOP_GETATTRLISTBULK(vnode_t, struct attrlist *, struct vnode_attr *, uio_t, void *, uint64_t, int32_t *, int32_t *, vfs_context_t); +#endif /* XNU_KERNEL_PRIVATE */ + struct vnop_readlink_args { struct vnodeop_desc *a_desc; vnode_t a_vp; @@ -1051,6 +1081,7 @@ struct vnop_advlock_args { struct flock *a_fl; int a_flags; vfs_context_t a_context; + struct timespec *a_timeout; }; /*! @@ -1069,10 +1100,11 @@ struct vnop_advlock_args { @param flags F_FLOCK: use flock() semantics. F_POSIX: use POSIX semantics. F_WAIT: sleep if necessary. F_PROV: Non-coelesced provisional lock (unused in xnu). @param ctx Context to authenticate for advisory locking request. + @param timeout Timespec for timeout in case of F_SETLKWTIMEOUT. @return 0 for success, or an error code. */ #ifdef XNU_KERNEL_PRIVATE -extern errno_t VNOP_ADVLOCK(vnode_t, caddr_t, int, struct flock *, int, vfs_context_t); +extern errno_t VNOP_ADVLOCK(vnode_t, caddr_t, int, struct flock *, int, vfs_context_t, struct timespec *); #endif /* XNU_KERNEL_PRIVATE */ struct vnop_allocate_args {