@@ -209,12 +209,14 @@ DMOD_INPUT_WEAK_API_DECLARATION(Dmod, 1.0, void*, _ResolveStreamFile, ( Dmod_Pid
209209/**
210210 * @brief Register the path of the file backing one of a process's standard streams
211211 *
212- * This is a weak implementation that does nothing.
212+ * This is a weak implementation that does nothing. Path == NULL is meant to clear an
213+ * existing binding, but since this weak implementation never binds anything in the first
214+ * place, there is nothing to clear either.
213215 * The real implementation should be provided by the dmosi layer.
214216 *
215217 * @param Pid Process ID to set the stream file path for
216218 * @param StdHandle One of DMOD_STDIN/DMOD_STDOUT/DMOD_STDERR/DMOD_STDLOG
217- * @param Path Path of the file to associate with this (Pid, StdHandle) pair
219+ * @param Path Path of the file to associate with this (Pid, StdHandle) pair, or NULL to clear it
218220 */
219221DMOD_INPUT_WEAK_API_DECLARATION (Dmod , 1.0 , int , _SetStreamFilePath , ( Dmod_Pid_t Pid , void * StdHandle , const char * Path ))
220222{
@@ -224,6 +226,31 @@ DMOD_INPUT_WEAK_API_DECLARATION(Dmod, 1.0, int, _SetStreamFilePath, ( Dmod_Pid_t
224226 return - ENOSYS ;
225227}
226228
229+ /**
230+ * @brief Snapshot the currently explicitly-bound standard streams of a process
231+ *
232+ * This is a weak implementation that always reports an empty snapshot (nothing bound),
233+ * since this weak implementation never binds anything via Dmod_SetStreamFilePath either.
234+ * The real implementation should be provided by the dmosi layer.
235+ *
236+ * @param Pid Process ID to snapshot
237+ * @param OutEntries Buffer to receive the snapshot entries
238+ * @param MaxEntries Capacity of OutEntries, in entries
239+ * @param OutCount Receives the number of entries written to OutEntries (always 0 here)
240+ * @return 0
241+ */
242+ DMOD_INPUT_WEAK_API_DECLARATION (Dmod , 1.0 , int , _GetStreamRedirections , ( Dmod_Pid_t Pid , Dmod_StreamRedirection_t * OutEntries , size_t MaxEntries , size_t * OutCount ))
243+ {
244+ (void )Pid ;
245+ (void )OutEntries ;
246+ (void )MaxEntries ;
247+ if ( OutCount != NULL )
248+ {
249+ * OutCount = 0 ;
250+ }
251+ return 0 ;
252+ }
253+
227254/**
228255 * @brief Locks the stdio buffer (for current pid) to protect against recursive calls
229256 *
0 commit comments