You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "Gary-Hobson (via GitHub)" <gi...@apache.org> on 2023/07/12 09:25:31 UTC

[GitHub] [nuttx] Gary-Hobson commented on a diff in pull request #9781: syslog: add syslog channel filtering function

Gary-Hobson commented on code in PR #9781:
URL: https://github.com/apache/nuttx/pull/9781#discussion_r1260886344


##########
drivers/syslog/syslog_chardev.c:
##########
@@ -71,6 +80,62 @@ static ssize_t syslog_chardev_write(FAR struct file *filep,
   return len;
 }
 
+#ifdef CONFIG_SYSLOG_IOCTL
+static int syslog_chardev_ioctl(FAR struct file *filep,
+                                int cmd, unsigned long arg)
+{
+  FAR struct syslog_channel_info_s *info;
+  struct syslog_channel_s *channel = NULL;

Review Comment:
   Done



##########
drivers/syslog/syslog_channel.c:
##########
@@ -272,6 +288,14 @@ int syslog_channel(FAR struct syslog_channel_s *channel)
         {
           if (g_syslog_channel[i] == NULL)
             {
+#  ifdef CONFIG_SYSLOG_IOCTL
+              if (channel->sc_name[0] == '\0')
+                {
+                  snprintf(channel->sc_name, sizeof(channel->sc_name),
+                          "channel-%p", channel->sc_ops);

Review Comment:
   Done



-- 
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