Blame SOURCES/sg_raw-version.patch

85ee44
From c683e6e2bc62b43c140934b919323d107b0a48cb Mon Sep 17 00:00:00 2001
85ee44
From: Tomas Bzatek <tbzatek@redhat.com>
85ee44
Date: Tue, 28 May 2019 16:06:06 +0200
85ee44
Subject: [PATCH] sg_raw: do not print error about device not specified on
85ee44
 version request
85ee44
85ee44
---
85ee44
 src/sg_raw.c | 7 +++++++
85ee44
 1 file changed, 7 insertions(+)
85ee44
85ee44
diff --git a/src/sg_raw.c b/src/sg_raw.c
85ee44
index 33a85f7c..453ff42a 100644
85ee44
--- a/src/sg_raw.c
85ee44
+++ b/src/sg_raw.c
85ee44
@@ -440,6 +440,13 @@ parse_cmd_line(struct opts_t * op, int argc, char *argv[])
85ee44
         }
85ee44
     }
85ee44
 
85ee44
+    if (op->version_given
85ee44
+#ifdef DEBUG
85ee44
+       && ! op->verbose_given
85ee44
+#endif
85ee44
+       )
85ee44
+        return 0;
85ee44
+
85ee44
     if (optind >= argc) {
85ee44
         pr2serr("No device specified\n\n");
85ee44
         return SG_LIB_SYNTAX_ERROR;