Blame SOURCES/sg_raw-version.patch

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