You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/11/22 14:58:51 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7659: driver/syslog:add stream as syslog backend, let crash dump into stream.

xiaoxiang781216 commented on code in PR #7659:
URL: https://github.com/apache/incubator-nuttx/pull/7659#discussion_r1029438396


##########
libs/libc/stream/Kconfig:
##########
@@ -21,4 +21,15 @@ config STREAM_LZF_BLOG
 
 endif
 
+config STREAM_BACKEND_MTD

Review Comment:
   remove, let's check CONFIG_MTD



##########
libs/libc/stream/Make.defs:
##########
@@ -25,7 +25,7 @@ CSRCS += lib_meminstream.c lib_memoutstream.c lib_memsistream.c
 CSRCS += lib_memsostream.c lib_lowoutstream.c lib_rawinstream.c
 CSRCS += lib_rawoutstream.c lib_rawsistream.c lib_rawsostream.c
 CSRCS += lib_zeroinstream.c lib_nullinstream.c lib_nulloutstream.c
-CSRCS += lib_libnoflush.c lib_libsnoflush.c
+CSRCS += lib_libnoflush.c lib_libsnoflush.c lib_mtdoutstream.c

Review Comment:
   let's split mtdoutstream to the new patch



##########
include/nuttx/streams.h:
##########
@@ -427,6 +440,46 @@ int lib_blkoutstream_open(FAR struct lib_blkoutstream_s *stream,
 void lib_blkoutstream_close(FAR struct lib_blkoutstream_s *stream);
 #endif
 
+/****************************************************************************
+ * Name: lib_mtdoutstream_open
+ *
+ * Description:
+ *  mtd driver stream backend
+ *
+ * Input Parameters:
+ *   stream   - User allocated, uninitialized instance of struct
+ *                lib_mtdoutstream_s to be initialized.
+ *   sys_node - The inode of mtd device.
+ *
+ * Returned Value:
+ *   Returns zero on success or a negated errno on failure
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_STREAM_BACKEND_MTD
+int lib_mtdoutstream_open(FAR struct lib_mtdoutstream_s *stream,
+                          FAR struct inode *sys_node);

Review Comment:
   why not use pathname



-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org