From d5f8a49f18b5bc063db85f933903013375e2ead7 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 6 Nov 2017 07:14:24 -0600 Subject: [PATCH] fs/userfs: Fix return value from dup method. In order to return a pointer, the parameter must be a pointer to a pointer. --- fs/userfs/fs_userfs.c | 2 +- include/nuttx/fs/userfs.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/userfs/fs_userfs.c b/fs/userfs/fs_userfs.c index 4514ce326e..9741e5740e 100644 --- a/fs/userfs/fs_userfs.c +++ b/fs/userfs/fs_userfs.c @@ -86,7 +86,7 @@ struct userfs_state_s struct socket psock; /* Client socket instance */ 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 * mxwrite). diff --git a/include/nuttx/fs/userfs.h b/include/nuttx/fs/userfs.h index 413fe31bdd..8eee64efc6 100644 --- a/include/nuttx/fs/userfs.h +++ b/include/nuttx/fs/userfs.h @@ -154,7 +154,7 @@ enum userfs_req_e }; /* 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 @@ -213,7 +213,7 @@ struct userfs_operations_s int (*ioctl)(FAR void *volinfo, FAR void *openinfo, int cmd, unsigned long arg); 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, FAR struct stat *buf); int (*opendir)(FAR void *volinfo, FAR const char *relpath,