casaroli commented on code in PR #21143:
URL: https://github.com/apache/nuttx/pull/21143#discussion_r4422194461


##########
include/nuttx/fs/fs.h:
##########
@@ -166,6 +166,10 @@
 
 #define INODE_IS_NOEXEC(i)      (((i)->i_flags & FSNODEFLAG_NOEXEC) != 0)
 
+/* A pipe, a FIFO or a socket has no file position (POSIX: ESPIPE) */
+
+#define INODE_IS_NOSEEK(i)      (INODE_IS_PIPE(i) || INODE_IS_SOCKET(i))

Review Comment:
   /dev/null and /dev/zero have no seek method either 
(drivers/misc/dev_null.c:60, dev_zero.c), and lseek() of them succeeds on Linux 
(for example `dd of=/dev/null seek=N`); a seek == NULL test would make them 
fail with ESPIPE.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to