aboutsummaryrefslogtreecommitdiff
path: root/testing/sg_tst_excl2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'testing/sg_tst_excl2.cpp')
-rw-r--r--testing/sg_tst_excl2.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/testing/sg_tst_excl2.cpp b/testing/sg_tst_excl2.cpp
index b4ae9582..f6bd617d 100644
--- a/testing/sg_tst_excl2.cpp
+++ b/testing/sg_tst_excl2.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2019 Douglas Gilbert.
+ * Copyright (c) 2013-2022 Douglas Gilbert.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -47,7 +47,7 @@
#include "sg_pt.h"
#include "sg_unaligned.h"
-static const char * version_str = "1.10 20190917";
+static const char * version_str = "1.11 20220425";
static const char * util_name = "sg_tst_excl2";
/* This is a test program for checking O_EXCL on open() works. It uses
@@ -198,7 +198,7 @@ do_rd_inc_wr_twice(const char * dev_name, unsigned int lba, int block,
{0x88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0};
unsigned char w16CmdBlk [WRITE16_CMD_LEN] =
{0x8a, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0};
- unsigned char sense_buffer[64];
+ unsigned char sense_buffer[64] = {0};
unsigned char lb[READ16_REPLY_LEN];
char ebuff[EBUFF_SZ];
int open_flags = O_RDWR;
@@ -323,7 +323,7 @@ do_inquiry_prod_id(const char * dev_name, int block, int wait_ms,
unsigned char inqCmdBlk [INQ_CMD_LEN] =
{0x12, 0, 0, 0, INQ_REPLY_LEN, 0};
unsigned char inqBuff[INQ_REPLY_LEN];
- unsigned char sense_buffer[64];
+ unsigned char sense_buffer[64] = {0};
char ebuff[EBUFF_SZ];
int open_flags = O_RDWR; /* since O_EXCL | O_RDONLY gives EPERM */