aboutsummaryrefslogtreecommitdiff
path: root/src/sg_unmap.c
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2015-12-20 16:23:44 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2015-12-20 16:23:44 +0000
commit9fbc884d5e7900d4edab95d18dc16d5ca8caa5b5 (patch)
treebeedd798f77493980f389ccc4ef58a3489cfbbaf /src/sg_unmap.c
parente359da1369caf436878cd05386b83b54359ecce1 (diff)
downloadsg3_utils-9fbc884d5e7900d4edab95d18dc16d5ca8caa5b5.tar.gz
rescan-scsi-bus.sh: updates from Suse; sg_lib: add 'sense' categories for SCSI statuses; pr2serr() rework; drop SUGGEST_*
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@654 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_unmap.c')
-rw-r--r--src/sg_unmap.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/src/sg_unmap.c b/src/sg_unmap.c
index fd7a5eaa..cdaba327 100644
--- a/src/sg_unmap.c
+++ b/src/sg_unmap.c
@@ -9,7 +9,6 @@
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
-#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#include <getopt.h>
@@ -24,6 +23,7 @@
#include "sg_cmds_basic.h"
#include "sg_cmds_extra.h"
#include "sg_unaligned.h"
+#include "sg_pr2serr.h"
/* A utility program originally written for the Linux OS SCSI subsystem.
*
@@ -31,7 +31,7 @@
* logical blocks.
*/
-static const char * version_str = "1.08 20151205";
+static const char * version_str = "1.09 20151219";
#define DEF_TIMEOUT_SECS 60
@@ -56,25 +56,6 @@ static struct option long_options[] = {
};
-#ifdef __GNUC__
-static int pr2serr(const char * fmt, ...)
- __attribute__ ((format (printf, 1, 2)));
-#else
-static int pr2serr(const char * fmt, ...);
-#endif
-
-static int
-pr2serr(const char * fmt, ...)
-{
- va_list args;
- int n;
-
- va_start(args, fmt);
- n = vfprintf(stderr, fmt, args);
- va_end(args);
- return n;
-}
-
static void
usage()
{