pussuw commented on code in PR #16361: URL: https://github.com/apache/nuttx/pull/16361#discussion_r2095602534
########## fs/inode/fs_files.c: ########## @@ -858,6 +1027,263 @@ int fs_putfilep(FAR struct file *filep) } #endif +/**************************************************************************** + * Name: nx_fcntl + * + * Description: + * nx_fcntl() will perform the operation specified by 'cmd' on an open + * file. + * + * Input Parameters: + * fd - File descriptor of the open file + * cmd - Identifies the operation to be performed. Command specific + * arguments may follow. + * arg - The argument. + * + * Returned Value: + * A non-negative value is returned on success; a negated errno value is + * returned on any failure. + * + ****************************************************************************/ + +int nx_fcntl(int fd, int cmd, unsigned long arg) Review Comment: I'm trying to hide fl_lock semantics inside fs_files.c. We could make getters/setters for all of the file descriptor flags (closeonexec, fdsan, fdcheck) but this would generate a lot of code. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org