diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2018-01-19 20:14:20 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2018-01-19 20:14:20 +0000 |
commit | 6293187a432dd0bbf85961a897755bd0260f28ad (patch) | |
tree | d8a060af6e3e03f286881dc4d5ed6a398e466ccd /examples | |
parent | 400444efd4e3c2cd758aee250556c84e052634dc (diff) | |
download | sg3_utils-6293187a432dd0bbf85961a897755bd0260f28ad.tar.gz |
update BSD license from 3 to 2 clause aka FreeBSD license (without reference to FreeBSD project); more hex2* cleanup
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@746 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'examples')
-rw-r--r-- | examples/Makefile | 2 | ||||
-rw-r--r-- | examples/README | 4 | ||||
-rw-r--r-- | examples/sg__sat_phy_event.c | 10 |
3 files changed, 8 insertions, 8 deletions
diff --git a/examples/Makefile b/examples/Makefile index 1501850f..73df9bc2 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -36,7 +36,7 @@ CFLAGS = -g -O2 -W -Wall -iquote ../include -D_REENTRANT $(LARGE_FILE_FLAGS) LDFLAGS = LIBFILESOLD = ../lib/sg_lib.o ../lib/sg_lib_data.o ../lib/sg_io_linux.o -LIBFILESNEW = ../lib/sg_lib.o ../lib/sg_lib_data.o ../lib/sg_pt_linux.o +LIBFILESNEW = ../lib/sg_lib.o ../lib/sg_lib_data.o ../lib/sg_pt_common.o ../lib/sg_pt_linux.o ../lib/sg_pt_linux_nvme.o all: $(EXECS) diff --git a/examples/README b/examples/README index 0b86426c..7a5ae285 100644 --- a/examples/README +++ b/examples/README @@ -4,7 +4,7 @@ needs to be executed in the parent directory followed by changing directory to the lib directory and calling 'make' there. Another way is to do a top level 'make' after the ./configure which will make the libraries followed by all the utilities in the src/ -directory. +directory. To make them in FreeBSD use 'make -f Makefile.freebsd' . There is an brief explanation of each example in the README file in the main (i.e. this directory's parent) directory. There are also @@ -14,4 +14,4 @@ Some files that were previously in this directory have been moved to the 'testing' directory. Douglas Gilbert -4th November 2017 +19th January 2018 diff --git a/examples/sg__sat_phy_event.c b/examples/sg__sat_phy_event.c index e2dd2d01..fab33393 100644 --- a/examples/sg__sat_phy_event.c +++ b/examples/sg__sat_phy_event.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2016 Douglas Gilbert. + * Copyright (c) 2006-2018 Douglas Gilbert. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -64,7 +64,7 @@ #define EBUFF_SZ 256 -static const char * version_str = "1.01 20160528"; +static const char * version_str = "1.02 20180119"; static struct option long_options[] = { {"help", no_argument, 0, 'h'}, @@ -135,7 +135,7 @@ static const char * find_phy_desc(int id) return NULL; } -static void dStrRaw(const char* str, int len) +static void dStrRaw(const uint8_t * str, int len) { int k; @@ -304,12 +304,12 @@ int main(int argc, char * argv[]) if (ok) { /* output result if it is available */ if (raw > 0) - dStrRaw((const char *)inBuff, 512); + dStrRaw(inBuff, 512); else { if (verbose && hex) fprintf(stderr, "Response to READ LOG EXT (page=11h):\n"); if (1 == hex) - dStrHex((const char *)inBuff, 512, 0); + hex2stdout(inBuff, 512, 0); else if (hex > 1) dWordHex((const unsigned short *)inBuff, 256, 0, sg_is_big_endian()); |