| 
									
										
										
										
											2010-10-18 15:28:16 +05:30
										 |  |  | /*
 | 
					
						
							| 
									
										
										
										
											2015-11-18 18:31:52 +00:00
										 |  |  |  * 9p | 
					
						
							| 
									
										
										
										
											2010-10-18 15:28:16 +05:30
										 |  |  |  * | 
					
						
							|  |  |  |  * Copyright IBM, Corp. 2010 | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Authors: | 
					
						
							|  |  |  |  *  Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This work is licensed under the terms of the GNU GPL, version 2.  See | 
					
						
							|  |  |  |  * the COPYING file in the top-level directory. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2016-06-29 13:47:03 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | #ifndef QEMU_9P_XATTR_H
 | 
					
						
							|  |  |  | #define QEMU_9P_XATTR_H
 | 
					
						
							| 
									
										
										
										
											2010-10-18 15:28:16 +05:30
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-12-17 18:20:00 +01:00
										 |  |  | #include "qemu/xattr.h"
 | 
					
						
							| 
									
										
										
										
											2010-10-18 15:28:16 +05:30
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-08 11:18:22 +01:00
										 |  |  | struct XattrOperations { | 
					
						
							| 
									
										
										
										
											2010-10-18 15:28:16 +05:30
										 |  |  |     const char *name; | 
					
						
							|  |  |  |     ssize_t (*getxattr)(FsContext *ctx, const char *path, | 
					
						
							|  |  |  |                         const char *name, void *value, size_t size); | 
					
						
							|  |  |  |     ssize_t (*listxattr)(FsContext *ctx, const char *path, | 
					
						
							|  |  |  |                          char *name, void *value, size_t size); | 
					
						
							|  |  |  |     int (*setxattr)(FsContext *ctx, const char *path, const char *name, | 
					
						
							|  |  |  |                     void *value, size_t size, int flags); | 
					
						
							|  |  |  |     int (*removexattr)(FsContext *ctx, | 
					
						
							|  |  |  |                        const char *path, const char *name); | 
					
						
							| 
									
										
										
										
											2018-01-08 11:18:22 +01:00
										 |  |  | }; | 
					
						
							| 
									
										
										
										
											2010-10-18 15:28:16 +05:30
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-26 23:42:26 +01:00
										 |  |  | ssize_t local_getxattr_nofollow(FsContext *ctx, const char *path, | 
					
						
							|  |  |  |                                 const char *name, void *value, size_t size); | 
					
						
							| 
									
										
										
										
											2017-02-26 23:42:43 +01:00
										 |  |  | ssize_t local_setxattr_nofollow(FsContext *ctx, const char *path, | 
					
						
							|  |  |  |                                 const char *name, void *value, size_t size, | 
					
						
							|  |  |  |                                 int flags); | 
					
						
							| 
									
										
										
										
											2017-02-26 23:42:51 +01:00
										 |  |  | ssize_t local_removexattr_nofollow(FsContext *ctx, const char *path, | 
					
						
							|  |  |  |                                    const char *name); | 
					
						
							| 
									
										
										
										
											2010-10-18 15:28:16 +05:30
										 |  |  | 
 | 
					
						
							|  |  |  | extern XattrOperations mapped_user_xattr; | 
					
						
							|  |  |  | extern XattrOperations passthrough_user_xattr; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-10-18 15:28:16 +05:30
										 |  |  | extern XattrOperations mapped_pacl_xattr; | 
					
						
							|  |  |  | extern XattrOperations mapped_dacl_xattr; | 
					
						
							|  |  |  | extern XattrOperations passthrough_acl_xattr; | 
					
						
							|  |  |  | extern XattrOperations none_acl_xattr; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-10-18 15:28:16 +05:30
										 |  |  | extern XattrOperations *mapped_xattr_ops[]; | 
					
						
							|  |  |  | extern XattrOperations *passthrough_xattr_ops[]; | 
					
						
							|  |  |  | extern XattrOperations *none_xattr_ops[]; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-01-23 16:21:20 +00:00
										 |  |  | ssize_t v9fs_get_xattr(FsContext *ctx, const char *path, const char *name, | 
					
						
							|  |  |  |                        void *value, size_t size); | 
					
						
							|  |  |  | ssize_t v9fs_list_xattr(FsContext *ctx, const char *path, void *value, | 
					
						
							|  |  |  |                         size_t vsize); | 
					
						
							|  |  |  | int v9fs_set_xattr(FsContext *ctx, const char *path, const char *name, | 
					
						
							| 
									
										
										
										
											2010-10-18 15:28:16 +05:30
										 |  |  |                           void *value, size_t size, int flags); | 
					
						
							| 
									
										
										
										
											2011-01-23 16:21:20 +00:00
										 |  |  | int v9fs_remove_xattr(FsContext *ctx, const char *path, const char *name); | 
					
						
							| 
									
										
										
										
											2017-02-26 23:41:40 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-01-23 16:21:20 +00:00
										 |  |  | ssize_t pt_listxattr(FsContext *ctx, const char *path, char *name, void *value, | 
					
						
							|  |  |  |                      size_t size); | 
					
						
							| 
									
										
										
										
											2017-02-26 23:41:40 +01:00
										 |  |  | ssize_t pt_getxattr(FsContext *ctx, const char *path, const char *name, | 
					
						
							|  |  |  |                     void *value, size_t size); | 
					
						
							|  |  |  | int pt_setxattr(FsContext *ctx, const char *path, const char *name, void *value, | 
					
						
							|  |  |  |                 size_t size, int flags); | 
					
						
							|  |  |  | int pt_removexattr(FsContext *ctx, const char *path, const char *name); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ssize_t notsup_getxattr(FsContext *ctx, const char *path, const char *name, | 
					
						
							|  |  |  |                         void *value, size_t size); | 
					
						
							|  |  |  | int notsup_setxattr(FsContext *ctx, const char *path, const char *name, | 
					
						
							|  |  |  |                     void *value, size_t size, int flags); | 
					
						
							|  |  |  | ssize_t notsup_listxattr(FsContext *ctx, const char *path, char *name, | 
					
						
							|  |  |  |                          void *value, size_t size); | 
					
						
							|  |  |  | int notsup_removexattr(FsContext *ctx, const char *path, const char *name); | 
					
						
							| 
									
										
										
										
											2010-10-18 15:28:16 +05:30
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-10-18 15:28:16 +05:30
										 |  |  | #endif
 |