aboutsummaryrefslogtreecommitdiff
path: root/src/sg_logs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sg_logs.c')
-rw-r--r--src/sg_logs.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/sg_logs.c b/src/sg_logs.c
index ba5f82f8..89a5c3d5 100644
--- a/src/sg_logs.c
+++ b/src/sg_logs.c
@@ -31,7 +31,7 @@
#include "sg_unaligned.h"
#include "sg_pr2serr.h"
-static const char * version_str = "1.40 20160313"; /* spc5r08 + sbc4r10 */
+static const char * version_str = "1.41 20160323"; /* spc5r08 + sbc4r10 */
#define MX_ALLOC_LEN (0xfffc)
#define SHORT_RESP_LEN 128
@@ -6155,6 +6155,7 @@ fetchTemperature(int sg_fd, uint8_t * resp, int max_len, struct opts_t * op)
return (res >= 0) ? res : SG_LIB_CAT_OTHER;
}
+/* Returns 0 if successful else SG_LIB_SYNTAX_ERROR. */
static int
decode_pg_arg(struct opts_t * op)
{
@@ -6305,6 +6306,11 @@ main(int argc, char * argv[])
}
return 0;
}
+ if (op->pg_arg) { /* do this for 'sg_logs -p xxx' */
+ res = decode_pg_arg(op);
+ if (res)
+ return res;
+ }
pr2serr("No DEVICE argument given\n");
usage_for(1, op);
return SG_LIB_SYNTAX_ERROR;