This is an automated email from the ASF dual-hosted git repository.

GUIDINGLI pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 7e56b2ef56e5d79c0859de9e97f762e290ec413d
Author: wangyongrong <[email protected]>
AuthorDate: Tue May 26 10:16:58 2026 +0800

    drivers/vhost: use _emerg() instead of syslog(LOG_EMERG)
    
    vhost_dump() prints through syslog(LOG_EMERG, ...). Use the _emerg()
    macro from <debug.h> instead, as the virtio side does, and drop
    <syslog.h>.
    
    Signed-off-by: wangyongrong <[email protected]>
    Signed-off-by: Bowen Wang <[email protected]>
---
 drivers/vhost/vhost.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 653387e4882..f721acde7a9 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -28,7 +28,6 @@
 
 #include <string.h>
 #include <strings.h>
-#include <syslog.h>
 
 #include <nuttx/fs/fs.h>
 #include <nuttx/kmalloc.h>
@@ -136,7 +135,7 @@ static int vhost_dump_device(FAR struct vhost_device_item_s 
*item,
       return 0;
     }
 
-  syslog(LOG_EMERG, "  [%s] id=%" PRIu32 " hdev=%p driver=%p priv=%p\n",
+  _emerg("  [%s] id=%" PRIu32 " hdev=%p driver=%p priv=%p\n",
          dev_name, hdev->id.device, hdev, item->driver, hdev->priv);
 
   /* Call driver-specific dump if available */
@@ -166,13 +165,13 @@ static void vhost_dump(FAR const char *name)
   int count = 0;
   int ret;
 
-  syslog(LOG_EMERG, "VHost devices:\n");
+  _emerg("VHost devices:\n");
 
   name = name == NULL ? "all" : name;
   ret = nxmutex_lock(&g_vhost_bus.lock);
   if (ret < 0)
     {
-      syslog(LOG_EMERG, "  Failed to acquire lock\n");
+      _emerg("  Failed to acquire lock\n");
       return;
     }
 
@@ -190,7 +189,7 @@ static void vhost_dump(FAR const char *name)
 
   if (count == 0)
     {
-      syslog(LOG_EMERG, "  No devices of type '%s' found\n", name);
+      _emerg("  No devices of type '%s' found\n", name);
     }
 
   nxmutex_unlock(&g_vhost_bus.lock);

Reply via email to