Blame SOURCES/sg_raw-version.patch

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