|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| Makefile | H A D | 25-Apr-2025 | 4.6 KiB | 159 | 93 |
| Makefile.cyg | H A D | 25-Apr-2025 | 2.7 KiB | 111 | 61 |
| Makefile.freebsd | H A D | 25-Apr-2025 | 2.4 KiB | 97 | 47 |
| README | H A D | 25-Apr-2025 | 2.2 KiB | 48 | 38 |
| bsg_queue_tst.c | H A D | 25-Apr-2025 | 5.3 KiB | 172 | 131 |
| sg_chk_asc.c | H A D | 25-Apr-2025 | 6 KiB | 219 | 181 |
| sg_iovec_tst.cpp | H A D | 25-Apr-2025 | 19.2 KiB | 600 | 525 |
| sg_json_builder_test.c | H A D | 25-Apr-2025 | 1.7 KiB | 74 | 49 |
| sg_mrq_dd.cpp | H A D | 25-Apr-2025 | 161.7 KiB | 4,665 | 4,211 |
| sg_queue_tst.c | H A D | 25-Apr-2025 | 7.3 KiB | 235 | 173 |
| sg_scat_gath.cpp | H A D | 25-Apr-2025 | 32.7 KiB | 1,050 | 869 |
| sg_scat_gath.h | H A D | 25-Apr-2025 | 5 KiB | 144 | 90 |
| sg_sense_test.c | H A D | 25-Apr-2025 | 6.8 KiB | 205 | 170 |
| sg_take_snap.c | H A D | 25-Apr-2025 | 7 KiB | 226 | 179 |
| sg_tst_async.cpp | H A D | 25-Apr-2025 | 77.5 KiB | 2,228 | 2,003 |
| sg_tst_bidi.c | H A D | 25-Apr-2025 | 21.5 KiB | 603 | 532 |
| sg_tst_context.cpp | H A D | 25-Apr-2025 | 15.8 KiB | 503 | 393 |
| sg_tst_excl.cpp | H A D | 25-Apr-2025 | 32.3 KiB | 985 | 780 |
| sg_tst_excl2.cpp | H A D | 25-Apr-2025 | 18.1 KiB | 557 | 432 |
| sg_tst_excl3.cpp | H A D | 25-Apr-2025 | 18.5 KiB | 562 | 437 |
| sg_tst_ioctl.c | H A D | 25-Apr-2025 | 47.7 KiB | 1,352 | 1,207 |
| sg_tst_json_builder.c | H A D | 25-Apr-2025 | 4.4 KiB | 161 | 122 |
| sg_tst_nvme.c | H A D | 25-Apr-2025 | 33.5 KiB | 958 | 878 |
| sgh_dd.cpp | H A D | 25-Apr-2025 | 181.4 KiB | 5,091 | 4,631 |
| sgs_dd.c | H A D | 25-Apr-2025 | 54.3 KiB | 1,668 | 1,519 |
| tst_sg_lib.c | H A D | 25-Apr-2025 | 25.2 KiB | 735 | 630 |
| uapi_sg.h | H A D | 25-Apr-2025 | 22.5 KiB | 494 | 220 |
README
1
2
3The utilities in this directory are _not_ built automatically. So:
4 cd <root_of_sg3_utils_src>
5 ./configure ; make ; make install
6will _not_ build and install them. The make command (or some variant
7of it) needs to be run in this directory as outlined below.
8
9Building files in this directory depends on several files being already
10built in the ../lib directory. So to build files here, the ./configure
11needs to be executed in the parent directory followed by changing
12directory to the lib directory and calling 'make' there.
13Another way is to do a top level 'make' after the ./configure which
14will make the libraries followed by all the utilities in the src/
15directory. To make them in FreeBSD use 'make -f Makefile.freebsd' .
16
17The utilities in this directory do not have manpages. They have
18relatively complete but terse help messages, typically seen by using
19the '--help' option one or more times. If called several times, the
20shorter form of the help option is more convenient, for example: '-hhh'.
21And of course there is the source code. Unfortunately where the code
22implements many different options, it can become a bit dense. There
23is also a large amount of error checking, as many of these utilities
24were used to test new features placed in the sg v4 driver in Linux.
25
26The sg_chk_asc utility decodes the SCSI additional sense code table
27found at https://www.t10.org/lists/asc-num.txt and checks it against
28the table found in sg_lib_data.c in the lib/ subdirectory. It is
29designed to keep the table in sg_lib_data.c in "sync" with the
30table at the t10.org web site.
31
32The tst_sg_lib utility exercises several functions found in sg_lib.c
33and related files in the 'lib' sibling directory. Use 'tst_sg_lib -h'
34to get more information.
35
36There are both C and C++ files in this directory, they have extensions
37'.c' and '.cpp' respectively. Now both are built with rules in Makefile
38(at least in Linux). A gcc/g++ compiler of 4.7.3 vintage or later
39(or a recent clang compiler) will be required. To make them in FreeBSD
40use 'make -f Makefile.freebsd'.
41
42The sgh_dd utility (C++) uses 'libatomic' which may not be installed
43on some systems. On Debian based systems 'apt install libatomic1' fixes
44this.
45
46Douglas Gilbert
4717th September 2019
48