fs/userfs: Fix return value from dup method. In order to return a pointer, the parameter must be a pointer to a pointer.

This commit is contained in:
Gregory Nutt
2017-11-06 07:14:24 -06:00
parent 7deb24484c
commit d5f8a49f18
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -86,7 +86,7 @@ struct userfs_state_s
struct socket psock; /* Client socket instance */ struct socket psock; /* Client socket instance */
struct sockaddr_in server; /* Server address */ struct sockaddr_in server; /* Server address */
sem_t exclsem; /* Exlusive access for request-response sequence */ sem_t exclsem; /* Exclusive access for request-response sequence */
/* I/O Buffer (actual size depends on USERFS_REQ_MAXSIZE and the configured /* I/O Buffer (actual size depends on USERFS_REQ_MAXSIZE and the configured
* mxwrite). * mxwrite).
+2 -2
View File
@@ -154,7 +154,7 @@ enum userfs_req_e
}; };
/* This enumeration provides the type of each response returned from the /* This enumeration provides the type of each response returned from the
* user file system to OS file system client to the . * user file system to OS file system client.
*/ */
enum userfs_resp_e enum userfs_resp_e
@@ -213,7 +213,7 @@ struct userfs_operations_s
int (*ioctl)(FAR void *volinfo, FAR void *openinfo, int cmd, int (*ioctl)(FAR void *volinfo, FAR void *openinfo, int cmd,
unsigned long arg); unsigned long arg);
int (*sync)(FAR void *volinfo, FAR void *openinfo); int (*sync)(FAR void *volinfo, FAR void *openinfo);
int (*dup)(FAR void *volinfo, FAR void *oldinfo, FAR void *newinfo); int (*dup)(FAR void *volinfo, FAR void *oldinfo, FAR void **newinfo);
int (*fstat)(FAR void *volinfo, FAR void *openinfo, int (*fstat)(FAR void *volinfo, FAR void *openinfo,
FAR struct stat *buf); FAR struct stat *buf);
int (*opendir)(FAR void *volinfo, FAR const char *relpath, int (*opendir)(FAR void *volinfo, FAR const char *relpath,