[Libguestfs] [libnbd PATCH 4/4] info: Permit --size --json

Eric Blake eblake at redhat.com
Mon Aug 3 18:45:57 UTC 2020


A single integer IS a valid JSON document, after all, at least
according to RFC8259.
---
 info/nbdinfo.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/info/nbdinfo.c b/info/nbdinfo.c
index f37ffea..2e0bf27 100644
--- a/info/nbdinfo.c
+++ b/info/nbdinfo.c
@@ -158,11 +158,6 @@ main (int argc, char *argv[])
     usage (stderr, EXIT_FAILURE);

   /* You can combine certain options. */
-  if (json_output && size_only) {
-    fprintf (stderr, "%s: you cannot use %s and %s together.\n",
-             argv[0], "--json", "--size");
-    exit (EXIT_FAILURE);
-  }
   if (list_all && size_only) {
     fprintf (stderr, "%s: you cannot use %s and %s together.\n",
              argv[0], "--list", "--size");
-- 
2.28.0




More information about the Libguestfs mailing list