浏览代码

vhost_net: Print feature masks in hex

"0x200000000" is much more readable than "8589934592".
The change saves one step (conversion) while debugging.

Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Message-Id: <20220318140440.596019-1-i.maximets@ovn.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Ilya Maximets 3 年之前
父节点
当前提交
1eed051c8c
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      hw/net/vhost_net.c

+ 2 - 2
hw/net/vhost_net.c

@@ -201,7 +201,7 @@ struct vhost_net *vhost_net_init(VhostNetOptions *options)
             net->dev.features &= ~(1ULL << VIRTIO_NET_F_MRG_RXBUF);
             net->dev.features &= ~(1ULL << VIRTIO_NET_F_MRG_RXBUF);
         }
         }
         if (~net->dev.features & net->dev.backend_features) {
         if (~net->dev.features & net->dev.backend_features) {
-            fprintf(stderr, "vhost lacks feature mask %" PRIu64
+            fprintf(stderr, "vhost lacks feature mask 0x%" PRIx64
                    " for backend\n",
                    " for backend\n",
                    (uint64_t)(~net->dev.features & net->dev.backend_features));
                    (uint64_t)(~net->dev.features & net->dev.backend_features));
             goto fail;
             goto fail;
@@ -213,7 +213,7 @@ struct vhost_net *vhost_net_init(VhostNetOptions *options)
     if (net->nc->info->type == NET_CLIENT_DRIVER_VHOST_USER) {
     if (net->nc->info->type == NET_CLIENT_DRIVER_VHOST_USER) {
         features = vhost_user_get_acked_features(net->nc);
         features = vhost_user_get_acked_features(net->nc);
         if (~net->dev.features & features) {
         if (~net->dev.features & features) {
-            fprintf(stderr, "vhost lacks feature mask %" PRIu64
+            fprintf(stderr, "vhost lacks feature mask 0x%" PRIx64
                     " for backend\n",
                     " for backend\n",
                     (uint64_t)(~net->dev.features & features));
                     (uint64_t)(~net->dev.features & features));
             goto fail;
             goto fail;