diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2007-10-16 13:24:53 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2007-10-16 13:24:53 +0000 |
commit | fbaabd9e14fc65f34b5fbdb1d83c2d505f078fae (patch) | |
tree | bd40ff6cb572484ca44edbe4cb31af549123e938 /archive | |
parent | 24424a340f3a61f9ffc77a416d6ae81161bfe382 (diff) | |
download | sg3_utils-fbaabd9e14fc65f34b5fbdb1d83c2d505f078fae.tar.gz |
put pre_configure build files under archive directory, doco
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@113 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'archive')
25 files changed, 3974 insertions, 0 deletions
diff --git a/archive/pre_configure/CHANGELOG b/archive/pre_configure/CHANGELOG new file mode 100644 index 00000000..0ec4eaac --- /dev/null +++ b/archive/pre_configure/CHANGELOG @@ -0,0 +1,722 @@ +Each utility has its own version number, date of last change and +some description at the top of its ".c" file. All utilities in the main +directory have their own "man" pages. There is also a sg3_utils man page. + +Changelog for sg3_utils-1.25 [20070711] + - sg_dd: add oflag=sparse to step over bs*bpt number of zeros; + - with oflag=sparse, write last bs*bpt segment at end or after + error so file length of OFILE is appropriate + - allow iflag=null and oflag=null which do nothing (placeholders) + - when coe>1 then SCSI READ LONG logic remember extended block + length of first encountered error + - sg_ses: sync with ses2r17 + - sg_vpd: add block device characteristics VPD page + - place source in subversion repository + +Changelog for sg3_utils-1.24 [20070507] + - sg_raw: new utility to send arbirary SCSI commands + - sg_luns: increase number of luns that can be fetched + - fix length of raw and hex output + - add '--quiet' option to output only ASCII hex + representation of each lun + - sg_rtpg: update for changes in spc4r09 + - sg_persist: update documentation, spc-4 references + - fix exit status values + - sg_inq: update version descriptors per spc4r09 + - fix '--id' and '--extended' + - extend block limits VPD page (sbc3r09) + - sg_vpd: extend block limits VPD page (sbc3r09) + - append relative target port identifier to SAS target + port address with '-iq' option + - sg_logs: add decoding for stats+performance log pages + - fix showing of page names for pdt > 0 + - implement '-HH' for single and all pages, fix '-r' + - when '--maxlen=' given, only do single fetch + - add Tape Alert (ssc), Media and Element statistics (smc) pages + - add '--brief' option + - sg_ses: sync with ses2r16 + - fix bay number for SAS + - sg_format: add '--dcrt' and '--security' options + - sgm_dd: add 'smmap' oflag for shared_mmap_io testing + - add 'dio' oflag + - sg_dd, sgp_dd: add 'dio' iflag and oflag + - sg_modes: change SAS mode page names per sas2r09 + - check validity of block descriptors length + - sg_pt: change opaque context object from 'void *' + to 'struct sg_pt_base *' + - sg_opcodes: anticipate extra tmfs from 07-159r0 + - sg_sat_set_features: add more usage information + - add man page + - sg_sat_phy_event: add to examples directory + - sg_lib: sync asc/ascq codes with spc4r10 + - Solaris port: using uscsi interface + +Changelog for sg3_utils-1.23 [20070131] + - sg_read_buffer: new utility + - sg_write_buffer: new utility + - sg_opcodes, sg_senddiag, sg_logs, sg_modes, sg_start, sg_inq, + sg_turs, sg_readcap, sg_rbuf: add getopt_long() based cli; + old and new cli selectable, new getopt_long cli is default + - scripts: new subdirectory containing some bash scripts + - add scripts/README file + - sg_reassign: add '--hex' option for grown and primary lists + - sg_rtpg: add '--raw' option + - sg_lib.h, sg_cmds_basic.h + sg_cmds_extra.h: add C++ + 'extern "C" ' wrappers + - cleanup C code so it will compile as C++ + - sg_lib: sync with spc4r08 + - include <inttypes.h>, use PRId64 instead of %lld form + - fix sg_get_sense_str() when empty sense buffer + - win32 port: add Makefile.mingw + related support for MinGW + - sg_cmds_extra: add sg_ll_read_buffer() and sg_ll_write_buffer() + - sg_dd, sgp_dd, sgm_dd, sg_read: use lseek64() instead of llseek.c + - sgm_dd: accept coe=<n> for interworking with sg_dd + - sg_rdac: fix on non-linux ports + - sg_ses: fix spurious warning in additional element status page + - '-rr' option outputs a diagnostic page in binary to stdout + - sg_opcodes: add command timeout descriptor support (spc4r08) + - change linux specific pass through to generic pass through + - sg_logs: add 'name=value' decoding for SAS specific lpage + - examples+utils subdirectories: remove symlinks + - synchronize man pages with usage messages + - sg3_utils.spec: rework + +Changelog for sg3_utils-1.22 [20061016] + - sgp_dd: accept verbose=<n> as well as deb=<n> to ease + interworking with sg_dd and sgm_dd + - sg_sat_set_features: added to examples directory + - sg_lib: sync asc/ascq text with spc4r06 + - move SG_LIB_CAT_NO_SENSE and SG_LIB_CAT_RECOVERED to + 20 and 21 respectively; add SG_LIB_CAT_ABORTED_COMMAND + at 11 (its sense key value) + - sg_vpd: tweak '--page=sp --quiet' output + - change '-HHH' so same as '-rr' (prepares ATA Information + (ai) response for hdparm) + - sg_requests: add '-s' option to set exit status from + parameter data + - sg_modes: exit quickly from '-e' if device not ready + - sg_logs: sync sas log pages with sas2r05a + - expand background scan results log page + - add '-m=<max_len>' to limit response length + - drop '-scum' and '-sthr' options and add '-select' + - sg_write_long: add '--16' option to send 16 byte cdb + - add '--wr_uncor' and '--pblock' options + - sg_senddiag: cleanup and add sdiag_sas_p1_stop.txt + to examples directory + - sg_format: add '--cmplst=<n>' option (default: 1) + - add '--pfu=<n>' option + - expand man page to discuss P/D/C/GLISTs + - sg_reassign: add '--primary' option to fetch primary + defect list (PLIST) length + - sg_readcap: add '-H' option to output response in hex + and '-r' to output response in binary to stdout + - add logical blocks per physical block (sbc3r07) + - sginfo: add PLIST and GLIST designation to defect lists + - sg_cmds: split this support file into sg_cmds_basic.[hc] + and sg_cmds_extra.[hc] + - add sg_ll_ata_pt() (SATL ATA pass) to sg_cmds_extra.[hc] + - sg_rdac: fix includes for FreeBSD + - sg_dd: add 'coe_limit=' option to exit after <n> + consecutive 'coe' type read errors + - sgm_dd: print out throughput information when signal arrives + if time=1 (like sg_dd does already) + - sg_inq: change '-HHH' so same as '-rr'. Now sg_inq, sg_vpd + and sdparm output for hdparm with '-HHH' + -add '-l=<resp_len>' option + - sg_read_long: add '--pblock' option for physical blocks + - sg_luns: add '--hex' and '--raw' options + - sg_requests: add '--hex' and '--raw' options + - sg_scan: windows version added (was previously linux only) + - 2 man pages: sg_scan.8l and sg_scan.8w that are installed + as sg_scan.8 + - archive directory: removed all but rescan-scsi-bus.sh + - README points to previous version in that directory + - sg_sat_identify: add to main directory + - rename earlier version to examples/sg__sat_identify.c + - sg_ident: rework as spc4r07 changed command names and + expanded functionality + +Changelog for sg3_utils-1.21 [20060706] + - sg_vpd: new utility for decoding VPD pages. sg_inq's cli is + cluttered; also borrows from sdparm's VPD handling + - sg_rdac: new utility for vendor specific work + - sg_lib: add sg_vpd_dev_id_iter() to iterate over di VPD page + - add sg_ata_get_chars() to fetch chars from ATA words + - sync additional sense code strings with spc4r05a + - add SG_LIB_CAT_NOT_READY category when sense_key is NOT READY + - add SG_LIB_FILE_ERROR category for open problems + - add SG_LIB_SYNTAX_ERROR category for command line problems + - broaden SG_LIB_CAT_MEDIA_CHANGED to SG_LIB_CAT_UNIT_ATTENTION + - add SG_LIB_CAT_MALFORMED for bad responses + - BEWARE: these changes cause confusion if an executable from this + version is run with a libsgutils library from 1.20 or earlier + - sg_cmds: add SG_LIB_CAT_NOT_READY return to most "ll" functions + - alter many utilities to report SG_LIB_CAT_NOT_READY + - sg_dd: add retries=<n> option for sg_io + - sg_logs: add '-T' option to output protocol specific port log page + - add support for log subpages (new in spc4r05) + - more sanity checks in Start Stop Cycle Counter page + - sg_cmds: add sg_ll_read_long16() + - add page_code and subpage_code to sg_ll_log_select() + - add subpage_code to sg_ll_log_sense() + - sg_read_long: do READ LONG(16) when '--16' given + - sg_read: accept and ignore 'of=' arguments + - sg_dd: expand medium/hardware error "coe' processing to include + the "blank check" sense key (for optical devices) + - sg_ses: expand display element (per 05-011r2) + - sg_format: clear 'cmplst' bit (for MO disks) + - add '--six' ('-6') option for mode sense/select(6) + - sg_format + sg_test_rwbuf: fix for when char is unsigned + - sg_inq: VPD page 0x89: output ATA IDENTIFY DEVICE strings + - for IDENTIFY (PACKET) DEVICE response use sg_ata_get_chars() + - sg3_utils.html : new name, was previously u_index.html. Copy + placed in doc subdirectory + - tools.html : SCSI and storage tools reference, copy placed in + doc subdirectory + - sg3_utils.8 : add a new man page containing general information + especially common exit status values + - sg_sat_identify: added to examples directory (SAT passthrough test) + - extend to pass through IDENTIFY PACKET DEVICE with '-p' option + - sg_sat_chk_power: added to examples directory + - sg_sat_smart_rd_data: added to examples directory + - sg_chk_asc: added to utils directory to check asc_ascq codes + - debian: stop placing archive directory under examples + - add build_debian.sh script + +Changelog for sg3_utils-1.20 [20060418] + - sg_logs: decode phy event descriptors in SAS port specific + log page (sas2r03) + - new parameter control byte format (spc4r03), subpages to come + - update Makefile (linux) to install sg_io_linux.h + sg_linux_inc.h + - sg_map26: fix for block device mapping in lk 2.6.16-rc1 and beyond + - cope with sysfs removal of 'generic' symlink post lk 2.6.16, + anticipate removal of 'tape' symlink + - sg_dd, sgm_dd, sgp_dd: fix problem around 0x7fffffff blocks + - sg_dd: fix read_long processing error (when 'coe=2' or 3) + - expand 'coe=' to take 0...3 (invokes read long with 2 or 3) + - allow for SG_GET_RESERVED_SIZE yielding 0, lk 2.6.16 feature + - sgp_dd: add 'iflag=' and 'oflag=' arguments; signals (like sg_dd) + - sgm_dd: add 'iflag=' and 'oflag=' arguments; signals (like sg_dd) + - sg_get_config: double->dual renaming (mmc5r03) + - sg_read: add 'dpo=' and 'fua=' options + - allow 'count' < 0 (or 'bpt=0') for issuing zero block READs + - allow for SG_GET_RESERVED_SIZE yielding 0, lk 2.6.16 feature + - add 'no_dxfer=0|1' option + - sg_modes: fix exit value when MODE SENSE fails + - add '-e' to examine presence of page codes from 0x0 to 0x3e + - sg_requests: add '--num=' and '--time' options for timing multiple + invocations + - sg_inq: fix vpd 0x83 designator code 8 name: "scsi name string" + - sg_scan: if lk 2.6, use sysfs to find active sg device nodes + - sg_map: if lk 2.6, use sysfs to find active sg device nodes + - sg_ses: expand display element (per 05-011r1) + - sg_start: add an '-i' option which is equivalent to '--imm=1' + - sg_senddiag: update man page showing use of two scripts in + examples directory (sdiag_sas_p0_cjtpat.txt and _p1_) + - sg_lib: fix sg_get_sense_descriptors_str() case 9 (ATA Return) + +Changelog for sg3_utils-1.19 [20060127] + - sg_start: accept '--' options (e.g. 'sg_start --stop') + - add '--fl=<n>' option for jump to format layer (mmc5) + - sg_logs: background scan log page, resync with sbc3r03 + - add '-scum' and '-sthr' for setting defaults + - add device statistics log page (ssc + adc) + - fix "last n" deferred errors/error events incrementing + - partial addition of log subpages (spc4r03) + - sg_get_config: sync features with mmc5 rev 02b + - sg_wr_mode: mask out dpofua bit in mode select header + - sg_inq: try harder with '-A' to identify ATA device + - broaden meaning of '-d' option to decode ... + - decode software interface id VPD page ('-p=84 -d') + - decode device capabilities (ssc) VPD page ('-p=b0 -d') + - sginfo: correct defect list handling ('-d' and '-G') + - sg_verify: improve error processing (e.g. medium errors) + - sg_ses: scsi target_initiator port additional element + status (ses2r14) + - many: arguments that currently accept '0x' or '0X' to + indicate a hex number may alternatively take a trailing + 'h' or 'H' to indicate hex + - sg_lib: update asc/ascq strings (spc4r03) + - sg_lib+sg_cmds: make independent of linux via + sg_pt.h function based interface. + - linux pass through code placed in sg_pt_linux.c + - rename sg_include.h to sg_linux_inc.h + - linux specific code in sg_lib.[hc] moved to + sg_io_linux.[hc] + - port to FreeBSD: using sg_pt_freebsd.c + - port to Tru64: using sg_pt_osf1.c + - sg_cmds: add sg_ll_get_config(), sg_ll_format_unit(), + sg_ll_reassign_blocks(), sg_ll_persistent_reserve_in+out(), + sg_ll_read_long10(), sg_ll_verify10(), sg_ll_write_long10() + - sg_persist: add "allow commands" to report capabilities + - sg_persist_tst: (examples) takes device node as argument + - sg_luns: add "security protocol" wlun + +Changelog for sg3_utils-1.18 [20051118] + - sg_map26: new utility to map sg devices in lk 2.6 + - sg_luns: luns > 16,384 (sam-4 rev 4) + - sg_ses: bump fan speed field to 11 bits + - SAS connector names (ses2r13) + - sg_inq: add '-rr' option for "hdparm --Istdin" + - sg_get_config: tracking mmc-5 + - sg_write_long: add support for COR_DIS bit + - sg_cmds: add sg_ll_test_unit_ready_progress() + - sg_turs: '-p' option shows progress + - sg_dd: add 'iflag=' and 'oflag=' options + - remove output of mode page info when verbose > 0 + - add control of DPO bit via iflag/oflag + - sg_lib: add sg_get_pdt_str() + - update asc/ascq strings + - sg_modes + sginfo: add SAS(2) SSP shared mode subpage + - doc: rename "html" directory to "doc" + - Makefile: add 'libtool --finish' to install + +Changelog for sg3_utils-1.17 [20050922] + - sg_inq: add '-a' option for ATA information VPD page + - add '-b' option for Block limits VPD page (SBC) + - add '-A' option for probing ATA or ATAPI device + - increase raw ('-r') and verbose ('-v') output for + ATA(PI) devices to 512 bytes (was 256 bytes) + - output hex ('-H') and verbose response for ATA(PI) + devices in 16 bit words (corrected for endianness) + - output bytes if '-HH' option given + - sync with spc4 rev 02 + - sg_lib: add dWordHex() and sg_is_big_endian() + - sync asc/ascq with spc4 rev 02 + - sg_cmds: defensive prefill for inquiry commands + - sg_opcodes: sync with spc4 rev 02 (add tmf I_T nexus reset) + - sginfo: add EBACKERR in Informational exception mode page + - add Background control mode page (SBC-3) + - sgm_dd: add 'verbose=<n>' option + +Changelog for sg3_utils-1.16 [20050810] + - sg_ident: new utility to report+set device identifier + - sg_map: increase MAX_SG_DEVS from 256 to 2048 + - debian: new directory to support deb package builds + - sg_get_config: add '--current' option, same as '--rt=1' + - update for DVD+RW Dual Layer + - sg_inq: add notes in source about use of SCSI INQUIRY + - decode Management network addresses VPD page ('-m') + - decode Mode page policy VPD page ('-M') + - sginfo: increase device mapping capability (> 78 disks) + - add '-r' option to scan /dev/raw* device nodes [Tim Hunt] + - sg_dd: change bpt default value to 32 when bs >= 2048 bytes + - sg_ses: mention SAF-TE in man page + - sg_readcap: add '-b' option for brief output (2 hex numbers) + - sg_cmds: add sg_ll_start_stop_unit(), sg_ll_prevent_allow(), + sg_ll_report_dev_id() and sg_ll_set_dev_id() + - sg_lib: add extra argument to sense print functions to enable + the suppression of the raw output of the sense buffer + - resid > 0 warnings now includes number actually fetched + - sg_start: add '-load' and '-eject' options + - default to start action when no other indication given + - change -imm=0|1 option default to 0 (was 1) + - gcc 4.0: cleanup warnings (apart from sgp_dd: revisit later) + +Changelog for sg3_utils-1.15 [20050605] + - sg_cmds: sg_get_mode_page_controls(): improve error processing, + add double fetch + - sg_turs, sg_rbuf, sg_requests, sg_test_rwbuf, sg_format, + sg_dd and sgm_dd: add O_NONBLOCK to open() + - sgm_dd: switch to use SG_IO ioctl (that leaves only + sgp_dd using the asynchronous sg write()/read() sequence) + - sg_ses: sync with rev 12 changes + - sg_map: extend to cope with sparse disk device names with + up to 3 letters (e.g. /dev/sdaaa) [Nate Dailey] + - sg_modes: add '-f' option to flexibly decode broken mode + sense responses. + - zero prefill response; stop decoding response after 3 + unit attention mode pages seen (i.e. malformed) + - add '-L' option for LLBAA bit in msense 10 cdb + - sg_reset: update man page + - sg_inq: VPD page 0x83: output eui addresses in hex as well + - Makefile: fix bug in rules for sgp_dd (when 'make dep' used) + - sg_format: expand explanations in its man page + - sg_inq, sg_logs, sg_modes, sg_opcodes, sg_rbuf, sg_readcap, + sg_scan, sg_senddiag, sg_start and sg_turs: allow command + line to take concaternated options + - sg_start: add -start and -stop to parallel "1" and "0" + - sg_senddiag: set pf bit with '-l' option + +Changelog for sg3_utils-1.14 [20050506] + - sg_rmsn: new utility to read media serial number + - sg_rtpg: add T_SUP bit report + - sg_ses: ses-2 rev 11 changes (mainly to additional element status) + - add 'bay number' to SAS additional element status + - sg_modes: recognise attached enclosure and medium changer + - sg_inq: spell out non-zero peripheral qualifiers + - note VS bit preceding MultiP(ort) when latter set + - VPD page 0x83: output naa addresses in hex as well + - sginfo: recognise attached enclosure and medium changer + - increase device mapping capability (to 78 disks) + [Tim Hunt] + - sg_senddiag: add option to send raw diagnostic page + - sg_get_config: update some BD information + - sg_reasign: add '-g' option to give grown defect list length + - sg_dd: note default bpt value (128) may be too high for cd/dvds + - sg_lib: sync with SPC-3 rev 22a [opcodes + asc/q] + - add DID_IMM_RETRY and DID_REQUEUE [linux specific "host" bytes] + - sg_cmds: add send+receive diagnostic, read defect data commands + - add duration output on some commands when verbose > 2 + - spec: change to produce libsgutils (and -devel variant) as well as + sg3_utils binary rpms + - sdparm: new utility like hdparm but for SCSI disks (or other devices) + - moved to its own package called: sdparm + +Changelog for sg3_utils-1.13 [20050313] + - sg_format: new utility to format disks (perhaps change block size) + - sg_ses: rename "device element" to "additional element" [SES-2 rev 10] + - add SAS expander and connector elements; add download + microcode and subenclosure nickname diagnostic pages + - fix additional element descriptor for SAS + - off by 1 error when no type descriptor text in config page + <David dot Baldwin at anu dot edu dot au> + - sg_logs: log page for background media scan results + - sginfo: add "-flba64" option for outputting 64 bit lba defect lists + - sg_get_config: additions for BD from MMC-5 rev 1b + - sg_lib: add SG_LIB_CAT_ILLEGAL_REQ sense category + - add sg_get_sense_progress_fld() + - SPC-3 rev21d updates: report + set timestamp + - sg_get_num() + sg_get_llnum(): switch to multipliers that + are compatible with SI and with IEC 60027-2. Used modern + GNU's dd command as guide. + - report field replaceable unit code in fixed format + - sg_dd: add logic to use read_long on unrecovered read errors when + 'coe' set, read just prior to error if 'coe' clear + - both 'odir' and 'blk_sgio" are honoured on block devices + - add 'verbose' switch, output some mode page info when verbose + - print out elapsed time/throughput when signal received + - add new web page discussing sg_dd, copy in html subdirectory + - sg_read: add 'blk_sgio' and 'odir' options + - sg_wr_mode: clear mode data length in mode select(10) + - sg_test_rwbuf: add long options, allow test to run multiple times + - sg_cmds: add sg_get_mode_page_types() [get current, changeable, etc] + - llseek.c: add Makefile rule without "-std=c99", breaks on some archs + +Changelog for sg3_utils-1.12 [20050121] + - sg_wr_mode: new utility to modify (i.e. write to) mode pages + - sg_reassign: new utility: issues Reassign Blocks command + - sg_rtpg: new utility: issues Report Target Port Groups command + [Christophe Varoqui] + - ATA IDENTIFY command misspelt as "IDENTITY" in several places + - sginfo: tweak SAS mode pages to match sas 1.1 rev 07 + - add NV_DIS bit to disk caching mode page + - sg_map: open /dev/nst* rather than /dev/st* (to stop spurious rewinds) + - sg_lib: ATA return sense descriptor + - add sg_get_sense_info_fld() to fetch info field from sense data + - fix bug in sg_scsi_sense_desc_find() + - add sense key specific decoding for fixed format sense data + - sg_modes: extend '-p' option to allow '-p=<page_code>,<subpage_code>' + - add '-A' option to output all mode pages and subpages + - extend '-l' option to show subpages, selected command set pages + - sg_inq: fix LUN WWN output in unit path report VPD page (emc) + [Hergen Lange] + - sg_get_config: some additions for DVD-R dual layer + - sg_modes: show write protect (WP) and DpoFua flags for disks + - sg_cmds: add llbaa argument to sg_ll_mode_sense10() + +Changelog for sg3_utils-1.11 [20041126] + - sg_sync: new utility: invokes the synchronize cache command + - sg_prevent: new utility: invokes the prevent allow medium removal command + - sg_get_config: new utility: get configuration command for dvds and cds + - sg_request: fix, allocation length wasn't set + - sg_start: remove '-s', as start_stop_unit implicitly syncs caches + - sg_ses: add SAS expander element type + - sg_inq: add sanity check to unit serial number (VPD page 0x80) + - output ANSI version string (e.g. "SPC-2", previously was number) + - add '-s' option to decode SCSI Ports VPD page + - sg_logs: decoding of format status and non-volatile cache log + pages (0x8 and 0x17 in sbc-2) + - sg_dd: handle compile error when O_DIRECT not defined + - sginfo: tighten sanity checks around Unit serial number VPD page + +Changelog for sg3_utils-1.10 [20041030] + - sg_readcap, sg_dd, sgm_dd, sgp_dd: fix sg_ll_readcap_10+16 (sg_cmds.c) + - sg_luns: new utility to report luns + - sg_logs: with '-t' (show temperature) ignore extra parameters in + temperature log page (still show them with '-p=d') + - sg_ses: clean argument sanity checks + - sg_cmds: add more common command wrappers + +Changelog for sg3_utils-1.09 [20041022] + - sg_ses: new utility to get status and set control on SES devices + - sg_verify: new utility to verify block devices + - sg_emc_trespass: new utility for EMC specific trespass mode page + - sg_request: new utility that sends a REQUEST SENSE command + - sg_logs: '-r' to reset to manufacturer's defaults + - decode last n error events and last n deferred errors pages + - add names of ADC log pages + - sg_inq: update to SPC-3 rev 21 + - decode Extended INQUIRY data VPD page [0x86] {'-x'} + - decode Unit Path Report VPD page [0xc0] (EMC) {'-P'} + - sginfo: decode SAS protocol specific lu mode page + - sg_err: convert to sg_lib + update to SPC-3 rev 21 + - change GPL to FreeBSD license + - flag vendor specific asc/ascq ranges + - libsgutils: library made from sg_lib.c and sg_cmds.c + - rpm "spec" file additionally builds a "-devel" rpm with + static libsgutils.a and sg_lib.h and sg_cmds.h + - utils/hxascdmp.c: add FreeBSD license + - sg_persist: additions to man page + - add sg_persist_tst.sh example script to examples directory + - sg_turs: add '-v' and '-V' options + - sg_senddiag: add '-v' option + +Changelog for sg3_utils-1.08 [20040831] + - sg_inq: fix noisy message when EVPD and raw modes set + - for VPD page 0, list supported page names if known {'-e'} + - add '-d' option to list version descriptors + - sg_opcodes: numerically sort list of opcodes unless '-u' given + - add '-a' to sort alphabetically list of opcode names + - add '-t' to report supported task management functions + - sg_persist: add 'register and move" PROUT service action + - add transportId support, document in sg_persist.8 and example + - sg_modes: handle subpage code for known pages (e.g. control extension) + - clean up sense buffer handling (allow for descriptor format) + - SPC-3 draft revision 20a updates + - sg_write_long: new utility to exercise WRITE LONG command + - sg_read_long: new utility to exercise READ LONG command + - sg_err.c: fix compile errors when SG_KERNEL_INCLUDES defined in lk 2.6 + - sg_includes.h typedef of u64 for BLKGETSIZE64 ioctl in lk 2.4 + - add safe_strerror(), sg_scsi_normalize_sense(), sg_normalize_sense() + and sg_scsi_sense_desc_find() functions + - add more sense data descriptor format decoding + - move multiple implementations of dStrHex() into sg_err.c + - sg_logs: exit if SCSI INQUIRY fails (e.g. when applied to ATA disk) + - sginfo: bug fixes and SPC-3 revision 20a updates + - add '-E' option to access Control Extension mode (sub)page + - sg_start: change '-d' switch to '-v' (verbose) switch for consistency + - document extra power condition states in man page + - sg_readcap: output rto_en and prot_en bits from long read capacity data + - add COVERAGE file to list SCSI command coverage + +Changelog for sg3_utils-1.07 [20040708] + - sginfo: clean up inquiry vendor,product,revision strings + - '-Fhead': sort defect list by head + Tom Steudten <steudten at mx dot ch> + - rework sg_err for better command name coverage: service actions, + variable length and peripheral device type + - update asc,ascq codes to SPC-3 revision 19 + - move scsi_devfs_scan to archive directory + - add sg_opcodes utility to list supported operation codes + - add sg_persist utility to support persistent reservations + - add '-i' option to sg_inq to decode device identification VPD page (0x83) + - sg_inq tries an ATA IDENTIFY if SCSI INQUIRY fails + - sg_dd, sgm_dd and sgp_dd calculate block device sizes (if count not given) + - drop SG_GET_VERSION_NUM ioctl guard in most utilities + +Changelog for sg3_utils-1.06 [20040426] + - sg_logs: some HBAs don't like odd transfer lengths so increment + - do INQUIRY and output product strings + - add ASCII rendering of the Protocol specific SAS page + - add '-v' verbose option to output cdb + - sg_scan: optionally take device file names (e.g. /dev/hdc and /dev/sda) + - only request 36 byte INQUIRY responses + - sg_err: add sg_decode_sense() function + - sg_inq: update output (ref: SPC-3 t10/1416-d rev 17, 28 January 2004) + - remove '-p' option to print out PCI address of host + - add '-v' verbose option to output cdb + - sginfo: allow '-u' to take hex arguments (prefixed by '0x'), + when subpage value is 255 show multiple subpages + - accept /dev/hd? ATAPI devices directly in lk 2.6 + - add '-t <pn>[,<spn>]' argument; like '-u' but decodes page + if it recognizes it + - drop '-L' argument + - add cd/dvd, tape, SES, more disk and more SPC-3 decoded mode pages + - add transport protocol decoded mode pages for SPI-4, FCP and SAS + - sg_modes: print all subpages when '-subp=ff' is selected + - do INQUIRY and output product strings + - add '-v' verbose option to output cdb + - Makefile: add -W compile flag and fix exposed warnings + - .spec file: change to build on Mandrake without errors + +Changelog for sg3_utils-1.05 [20031112] + - sginfo: major rework; add IE page, clean up control, cache + + disconnect pages (as per SPC-3 and SBC-2). + - when storing, update saved page (change from previous version) + - use 10 byte mode sense and select by default (override with '-6') + - mode subpage support + - sg_dd, sgm_dd + sgp_dd: + - 64 bit capable (read capacity; count, skip and seek values). + - numerical arguments accept hex (prefixed by '0x' or '0X') + - require bpt > 0 + - fix problem when reading /dev/null + - sg_dd: Treat SIGUSR1 properly: print stats and continue; + - sgp_dd: reduce READ CAPACITY response size to 8 bytes + - sg_read: require bpt > 0 + - sg_test_rwbuf: switch from sg_header to sg_io_hdr interface + N.B. After these changes no sg3_utils utilities (in the main directory) + use the sg_header interface + - sg_scan: switch from sg_header to sg_io_hdr interface + - sg_senddiag: increase extended foreground timeout to 60 minutes + - sg_inq: add names of peripheral device types + - sg_readcap: show total size in bytes, MB, GB + - sg_logs: read log pages twice (first time to get response length), for + fragile HBAs; decode Seagate 0x37 + 0x3e pages; display pcbs + - sg_modes: fix core dump when corrupted response, don't print extra pages + - sg_map: increase sg device scanning from 128 to 256 + - change man page references from lk 2.5 to lk 2.6 + - examples/sg_iovec_tst: added testing sg_iovec (sg_io_hdr iovec's) + [retrospective addition to this log: "#define __user" added into + sg_include.h so user space programs aren't broken if they choose + to include kernel header.] + - utils/hxascdmp: add utility for displaying ASCII hex + +Changelog for sg3_utils-1.04 [20030513] + - all remaining utilities in the main directory have man pages [thanks + to Eric Schwartz <emschwar at debian dot org> for 7 man pages] + - add CREDITS file + - sg_simple1, sg_simple2, sg_simple3, sg_simple4, sg_simple16 and + scsi_inquiry: moved to the examples directory + - sg_debug: moved to the archive directory + - sg_modes: add '-subp=<n>' for sub page code, suggests 6/10 byte + alternative if bad opcode sense received, flip -cpf flag to -pf, + add page names for most peripheral types + - sg_turs: default '-n=' argument to 1, only when '-n=1' print error + message in full + - sg_logs: print temperature "<not available>" for 255, '-t' switch + for temperature (from either temperature or IE log page) + - sg_dd: add '-odir=0|1' switch for O_DIRECT on block devices + - sg_start: add '-imm', '-loej' and 'pc=<n>' switches plus man page + - sg_readcap: add '-pmi' and 'lba=<n>' switches + - open files O_NONBLOCK in sg_inq, sg_modes and sg_logs so they + can be used on cd/dvd drivers when there is no disk present + +Changelog for sg3_utils-1.03 [20030402] + - sg_senddiag: added, allows self tests and listing of diag pages + - sg_start: changed to use SG_IO so works on block devices + - sg_err: print out some "sense key specific" data [Trent Piepho] + - sg_modes: add "-6" switch for force 6 byte MODE SENSE [Trent Piepho] + - sg_modes: more information on page codes and controls + - sg_inq, sg_modes, sg_logs, sg_senddiag: add man pages + - sg_dd: add "append=0|1" switch for glueing together large files + - note in README about utilities offered by scsirastools package + +Changelog for sg3_utils-1.02 [20030101] + - sg_inq: check if cmddt or evpd bits ignored + - sg_inq: warn -o=<n> not used for standard INQUIRY + - sg_turs: add -t option to time Test Unit Ready commands + - sg_errs: (used by most utilities) warn if sense buffer empty + - sg_modes: make safe with block SG_IO (bypass SG_GET_SCSI_ID ioctl) + - sg_logs: make safe with block SG_IO, self-test page work + - sg_dd: add "blksg_io=" switch to experiment with block SG_IO + - sg_read: now use SG_IO ioctl rather than sg write/read + - sginfo: fix writing parameters, check for block devices that answer + sg's ioctls, recognize "scd<n>" device names + - sg_map: stop close error report on tape devices + - sg_readcap: make safe with block SG_IO + - sg_start: make safe with block SG_IO + - sg_test_rwbuf: make safe with block SG_IO + +Changelog for sg3_utils-1.01 [20020814] +---------------------------- + - add raw switch ("-r") to sg_inq [Martin Schwenke] + +Changelog for sg3_utils-1.00 [20020728] +---------------------------- + - update sg_err [to SPC-3 T10/1416-D Rev 07 3 May 2002] + - "sg_inq -cl" now outputs opcode names + - add "continue on error" option to sg_dd + - add _LARGEFILE64_SOURCE _FILE_OFFSET_BITS=64 defines to Makefile + - drop 'gen' argument from sg_dd and friends, allow any file types + except scsi tape device file names + - treat of=/dev/null as special (skip write). Accept of=. as alias + for of=/dev/null + - decode various log pages in sg_logs + - add 'dio' argument to sgm_dd for testing "zero copy" copies + +Changelog for sg3_utils-0.99 [20020317] +---------------------------- + - add 'fua' and 'sync' arguments to sg_dd, sgp_dd and sgm_dd + - improve sg_inq, add "-cl" and "-36" arguments + - add sg_modes + sg_logs for MODE SENSE and LOG SENSE queries + - add rescan-scsi-bus.sh [Kurt Garloff] to archive directory + +Changelog for sg3_utils-0.98 [20020216] +---------------------------- + - move sg_reset back from archive to main directory + build + - sprintf() to snprintf() changes + - add "time=<n>" argument to sg_dd, sgp_dd and sgm_dd to time transfer + - add man pages for sgm_dd and sg_read, update sg_dd and sgp_dd man pages + - add "cdbsz=" argument to sg_dd, sgp_dd, sgm_dd + sg_read + - add "gen=0|1" argument to sg_dd + +Changelog for sg3_utils-0.97 [20011223] +---------------------------- + - move isosize to archive since introduced into util-linux-2.10s + +Changelog for sg3_utils-0.96 [20011221] +---------------------------- + - add '-p' switch to sg_inq to provide PCI slot_name + - add '-n' switch to scsi_inquiry for non-blocking open + - new sgm_dd (dd variant) using mmap-ed IO + - sg_rbuf now has a '-m' argument to select mmap-ed IO + - sg_rbuf now has a '-t' switch to do timing + throughput calculation + - add sg_simple4 to demonstrate mmap-ed IO on an INQUIRY response + - add sg_simple16 to do a READ_16 (16 byte SCSI READ command) + - mmap-ed IO requires sg version 3.1.22 or later + - add sg_read to read multiple times starting at same offset + +Changelog for sg3_utils-0.95 [20010915] +---------------------------- + - make sg_dd, sgp_dd and archive/sgq_dd warn if dio selected but + /proc/scsi/sg/allow_dio is '0' + - sg_map can now do any INQUIRY (when '-i' argument given) + - expand example in scsi_inquiry + +Changelog for sg3_utils-0.94 [20010419] +---------------------------- + - add sg_start, documented in README.sg_start [Kurt Garloff] + - add osst suport in sg_map [Kurt Garloff] + - improvements to sginfo [Kurt Garloff] + +Changelog for sg3_utils-0.93 [20010415] +---------------------------- + - more include file fine tuning + - some "dio" work sg_rbuf + - extend sgp_dd so "continue on error" works on normal files + - introduce sg_include.h to encapsulate sg include problems + - add scsi_devfs_scan + - add sg_bus_xfer to archive directory + - more error info in sginfo + +Changelog for sg3_utils-0.92 [20010116] +---------------------------- + - change sg_err.c output from stdout to stderr + - change sg_debug to call system("cat /proc/scsi/sg/debug"); + - fix in+out totals in sg_dd and sgp_dd when partial transfers + - lower include dependencies in sg_err.h + - add sgq_dd + Makefile to archive directory + +Changelog for sg3_utils-0.91 [20001221] +---------------------------- + - signalling handling added to sg_dd (and documented in sg_dd.8) + - add man page for sg_rbuf (and a small change to its code) + - add "-d" switch to isosize and cope with > 2 GB (and man page) + +Changelog for sg3_utils-0.90 +---------------------------- + - switch from dated versioning. Previous version was sg3_utils001012. + Arbitrarily start at package version 0.90 . Start Changelog. + - incorporate Kurt Garloff's patches from Suse scsi.spm source rpm + compilation: + - add Kurt Garloff's sg_test_rwbuf utility to read and write to disk + buffer + - clean up Makefile to include a "make install" (and also add a + "make uninstall"). + - add "-uno" switch to sginfo + - make raw and sg devices equally acceptable to sg_dd and sgp_dd. + [Raw devices still not as fast as sg devices doing disk to disk + copies in sgp_dd but this may be improved soon. Still faster than + using dd!] + - change lseek() in sg_dd and sgp_dd to _llseek() [using code borrowed + from fdisk] so big disks can be properly offset with 'skip' and + 'seek' arguments. [This change is significant for raw devices and + normal files since sg devices already use 31 bit block addressing.] + - rename sg_s3_inq to sg_inq. This utility allows the INQUIRY response + to be decoded as per SCSI 3 and 4. Also can probe EVPD and CmdDt pages. + - change multiplier suffixes on sg_dd, sgp_dd and sg_turs so lower case + "k, m, g" are powers of 2 while "K, M, G" are powers of 10. This idea + borrowed from lmdd (lmbench suite) + - retire a few more less used utilities into the archive directory. + - add man pages for sg_dd, sgp_dd and sg_map diff --git a/archive/pre_configure/INSTALL_pre b/archive/pre_configure/INSTALL_pre new file mode 100644 index 00000000..7cf0a33a --- /dev/null +++ b/archive/pre_configure/INSTALL_pre @@ -0,0 +1,144 @@ +Unless otherwise noted, these install instructions are for the +Linux operating system. See below for other operating systems. + +By default, the Makefile will build for Linux with a shared library. +The invocation sequence is: + +make +make install [may need root permission] + +Unless overridden or edited in the Makefile, INSTDIR places the executables +in the /usr/local/bin directory, LIBDIR places libraries in the +/usr/local/lib directory, MANDIR places the man pages in the +/usr/local/share/man directory and INCLUDEDIR places header files in the +/usr/local/include/scsi directory. For FreeBSD the default MANDIR is +/usr/local/man . + +Other Makefile targets that might be useful: +make clean # remove .o, executables, core and .depend file +make depend # generate dependency hierarchy in .depend file +make dep # same as 'make depend' +make sg_inq # build a specific executable (e.g. 'sg_inq') +make uninstall # removes executables, libraries and build remnants +make -f no_lib/Makefile.linux # build without a library + +./make_no_lib.sh sg_inq # is a simple script; in this case it expands to: + # make -f no_lib/Makefile.linux sg_inq + +Note that the main Makefile does _not_ call the Makefiles in the +subdirectories (i.e. archive, examples and utils directories). + +By default, this package now builds a shared library called +libsgutils.so and the corresponding static library: libsgutils.a . +The GNU "libtool" is required by sg3_utils to build its libraries. +The 'make' will build those libraries and executables and put them +in the ".libs" subdirectory (as libtool requires/enforces). +The 'make' puts scripts in the main directory with the same names as +the utilities (e.g. sg_dd, sg_inq etc) which set up an appropriate +environment and call the "real" executable "hiding" in the ".libs" +subdirectory. +The "make install" will install the libraries in the /usr/local/lib +directory. If an executable cannot find the libsgutils shared library +(check with 'ldd sg_inq' for example) then the addition of "/usr/local/lib" +to the /etc/ld.so.conf file may be required in some distributions. + +A "spec" file is included for building rpm packages. It is called +sg3_utils.spec . To build binary and source rpms place a copy of the +gzipped tarball in the "SOURCES" directory and place a copy of +sg3_utils.spec in the "SPEC" directory. These directories are found under +/usr/src/redhat on redhat/fedora distributions. Then from the "SPEC" +directory execute "rpmbuild -ba sg3_utils.spec". If all goes well a source +rpm should be found in the SRPMS directory and binary rpms in the RPMS/i386 +directory (for i386 architecture). Note the spec file will only build those +utilities found in the main directory. When the sg3_utils binary rpm is +installed the executables and their associated man pages should be placed in +appropriate places. The sg3_utils.spec file also builds a libsgutils shared +object (shared library) and a libsgutils-*-devel shared object with a static +library and the sg_lib.h, sg_cmds.h sg_cmds_basic.h, sg_cmds_extra.h and +sg_pt.h header files. + +Binary rpms (at least in the RedHat distribution) tend to install +executables in /usr/bin and libraries in /usr/lib . + +To build debian "deb" (binary) packages, first untar the tarball, then +change directory to the top level within the sg3_utils source. Then: + # chmod +x debian/rules + # dpkg-buildpackage -b -rfakeroot +The binary deb packages will be placed in the parent directory (of +the sg3_utils source directory) if all goes well. There is now +a script called build_debian.sh in the main directory which invokes +those two commands. + +If the shared object (library) is troublesome or unwanted then +a "no_lib" version of the Makefile and the sg3_utils.spec file +can be found in the "no_lib" subdirectory. + + +FreeBSD +======= +In FreeBSD, the utilities can be built with "make -f Makefile.freebsd". +This will build a shared object (i.e. libsgutils.so and friends) that +the utilities depend on. To install use "make -f Makefile.freebsd install". +These makes depend on libtool. To build without reliance on a shared +library (and thus libtool) use "make -f no_lib/Makefile.freebsd" (or +execute the "make_no_lib_freebsd.sh" script which does the same thing). +Utilities that are linux specific (e.g. sg_map) are not built for +FreeBSD. + + +Solaris +======= +In Solaris, the utilities can be built with "make -f Makefile.solaris". +This will build a shared object (i.e. libsgutils.so and friends) that +the utilities depend on. To install use "make -f Makefile.solaris install". +These makes depend on gcc and libtool. To build without reliance on a shared +library (and thus libtool) use "make -f no_lib/Makefile.solaris" (or +execute the "make_no_lib_solaris.sh" script which does the same thing). +Utilities that are linux specific (e.g. sg_map) are not built for +Solaris. + + +Tru64 (OSF) +=========== +In Tru64, the utilities can be built with "make -f Makefile.osf1". +This will build a shared object (i.e. libsgutils.so and friends) that +the utilities depend on. To install use "make -f Makefile.osf1 install". +These makes depend on libtool. To build without reliance on a shared +library (and thus libtool) use "make -f no_lib/Makefile.osf1" (or +execute the "make_no_lib_osf1.sh" script which does the same thing). +Utilities that are linux specific (e.g. sg_map) are not built for +Tru64. + + +Windows +======= +In Windows only the Windows NT, 2000, 2003 and XP operating systems (and +their variants) are currently supported. The various device names that the +sg3_utils utilities will accept in Windows can be seen by running the +sg_scan utility (and perhaps looking at its man page (i.e. sg_scan.8 or +sg_scan.8w)). + +The source tarball can be built in a cygwin or MinGW environment on Windows. + +For cygwin see http://www.cygwin.com for more information. Various extras +such as 'gcc' (the GNU C compiler) and 'make' need to be loaded as they are +not in the minimal cygwin default distribution. The build command +is "make -f Makefile.win32" and to install (for a cygwin environment) +use "make -f Makefile.win32 install". Currently the make doesn't build a +dll (cf shared libraries are built on Linux and FreeBSD) so the executable +files are bigger than they need to be. Once built, the various ".exe" +commands can either be executed in a cygwin shell (typically "bash") or a +DOS shell. If cygwin has not been installed on the target machine then +the "cygwin1.dll" (obtained from http://www.cygwin.com ) is required. + +There is also the "Minimalist Gnu for Windows" (MinGW) and its associated +shell (MSYS) that can serve as a build environment for sg3_utils. This +removes the dependence on the proprietary cygwin1.dll at the expense +of some timing features. In a MSYS shell untar the sg3_utils tarball and +in its top level directory use "make -f Makefile.mingw". The executables +will be placed in that directory. They can be executed in a MSYS or "cmd" +shell. + + +3rd May 2007 +Doug Gilbert diff --git a/archive/pre_configure/Makefile b/archive/pre_configure/Makefile new file mode 100644 index 00000000..4ada4238 --- /dev/null +++ b/archive/pre_configure/Makefile @@ -0,0 +1,252 @@ +SHELL = /bin/sh + +PREFIX=/usr/local +LIBDIR=$(DESTDIR)/$(PREFIX)/lib +INSTDIR=$(DESTDIR)/$(PREFIX)/bin +MANDIR=$(DESTDIR)/$(PREFIX)/share/man +INCLUDEDIR=$(DESTDIR)/$(PREFIX)/include + +CC = gcc +LD = gcc + +EXECS = sg_dd sgp_dd sgm_dd sg_read sg_map sg_scan sg_rbuf \ + sginfo sg_readcap sg_turs sg_inq sg_test_rwbuf \ + sg_start sg_reset sg_modes sg_logs sg_senddiag sg_opcodes \ + sg_persist sg_write_long sg_read_long sg_requests sg_ses \ + sg_verify sg_emc_trespass sg_luns sg_sync sg_prevent \ + sg_get_config sg_wr_mode sg_rtpg sg_reassign sg_format \ + sg_rmsn sg_ident sg_map26 sg_rdac sg_vpd sg_sat_identify \ + sg_read_buffer sg_write_buffer sg_raw + +MAN_PGS = sg_dd.8 sgp_dd.8 sgm_dd.8 sg_read.8 sg_map.8 sg_scan.8 sg_rbuf.8 \ + sginfo.8 sg_readcap.8 sg_turs.8 sg_inq.8 sg_test_rwbuf.8 \ + sg_start.8 sg_reset.8 sg_modes.8 sg_logs.8 sg_senddiag.8 \ + sg_opcodes.8 sg_persist.8 sg_write_long.8 sg_read_long.8 \ + sg_requests.8 sg_ses.8 sg_verify.8 sg_emc_trespass.8 \ + sg_luns.8 sg_sync.8 sg_prevent.8 sg_get_config.8 sg_wr_mode.8 \ + sg_rtpg.8 sg_reassign.8 sg_format.8 sg_rmsn.8 sg_ident.8 \ + sg_map26.8 sg_rdac.8 sg_vpd.8 sg3_utils.8 sg_sat_identify.8 \ + sg_read_buffer.8 sg_write_buffer.8 sg_raw.8 +MAN_PREF = man8 + +HEADERS = sg_lib.h sg_cmds.h sg_cmds_basic.h sg_cmds_extra.h sg_pt.h \ + sg_io_linux.h sg_linux_inc.h + +OS_FLAGS = -DSG3_UTILS_LINUX +LARGE_FILE_FLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +S_CFLAGS = $(OS_FLAGS) $(LARGE_FILE_FLAGS) + +# CFLAGS = -O2 -Wall -W +CFLAGS = -g -O2 -Wall -W +# CFLAGS = -g -O2 -Wall -W -pedantic -std=c99 + +CFLAGS_PTHREADS = -D_REENTRANT + +LDFLAGS = +# LDFLAGS = -v -lm + +LIB_VINFO = 1:0:0 +# Perhaps should use "-release RELEASE" instead +# RELEASE = 1.1 + +all: $(EXECS) + +depend dep: + for i in *.c; do $(CC) $(INCLUDES) $(CFLAGS) $(S_CFLAGS) -M $$i; \ + done > .depend + +clean: + /bin/rm -f *.o $(EXECS) core* .depend *.a *.la *.lo + /bin/rm -rf .libs + + +.c.o: + $(CC) $(INCLUDES) $(CFLAGS) $(S_CFLAGS) -c -o $@ $< + +sg_lib.lo: sg_lib.o + libtool --mode=compile $(CC) -c sg_lib.c + +sg_cmds_basic.lo: sg_cmds_basic.o + libtool --mode=compile $(CC) -c sg_cmds_basic.c + +sg_cmds_extra.lo: sg_cmds_extra.o + libtool --mode=compile $(CC) -c sg_cmds_extra.c + +sg_pt_linux.lo: sg_pt_linux.o + libtool --mode=compile $(CC) -c sg_pt_linux.c + +libsgutils.la: sg_lib.lo sg_cmds_basic.lo sg_cmds_extra.lo sg_pt_linux.lo + libtool --mode=link $(LD) -o libsgutils.la sg_lib.lo sg_cmds_basic.lo \ + sg_cmds_extra.lo sg_pt_linux.lo -rpath $(LIBDIR) \ + -version-info $(LIB_VINFO) + +# libsgutils.la: sg_lib.lo sg_cmds_basic.lo sg_cmds_extra.lo +# libtool --mode=link $(LD) -o libsgutils.la sg_lib.lo sg_cmds_basic.lo \ +# sg_cmds_extra.lo -rpath $(LIBDIR) -release $(RELEASE) + +sg_inq: sg_inq.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_dd: sg_dd.o sg_io_linux.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_scan: sg_scan.o sg_io_linux.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sginfo: sginfo.o sg_io_linux.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_start: sg_start.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_rbuf: sg_rbuf.o sg_io_linux.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_readcap: sg_readcap.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sgp_dd.o: sgp_dd.c + $(CC) $(INCLUDES) $(CFLAGS) $(S_CFLAGS) $(CFLAGS_PTHREADS) \ + -c -o sgp_dd.o $< + +sgp_dd: sgp_dd.o sg_io_linux.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ -lpthread + +sgm_dd: sgm_dd.o sg_io_linux.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_map: sg_map.o sg_io_linux.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_turs: sg_turs.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_test_rwbuf: sg_test_rwbuf.o sg_io_linux.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_read: sg_read.o sg_io_linux.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_reset: sg_reset.o + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_modes: sg_modes.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_logs: sg_logs.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_senddiag: sg_senddiag.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_opcodes: sg_opcodes.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_persist: sg_persist.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_write_long: sg_write_long.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_read_long: sg_read_long.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_requests: sg_requests.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_ses: sg_ses.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_verify: sg_verify.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_emc_trespass: sg_emc_trespass.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_luns: sg_luns.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_sync: sg_sync.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_prevent: sg_prevent.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_get_config: sg_get_config.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_wr_mode: sg_wr_mode.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_rtpg: sg_rtpg.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_reassign: sg_reassign.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_format: sg_format.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_rmsn: sg_rmsn.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_ident: sg_ident.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_map26: sg_map26.o + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_rdac: sg_rdac.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_vpd: sg_vpd.o sg_vpd_vendor.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_sat_identify: sg_sat_identify.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_read_buffer: sg_read_buffer.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_write_buffer: sg_write_buffer.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_raw: sg_raw.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + + +install: $(EXECS) + install -d $(INSTDIR) + install -d $(LIBDIR) + libtool --mode=install install -c libsgutils.la $(LIBDIR)/libsgutils.la + libtool --finish $(LIBDIR) + for name in $^; \ + do libtool --mode=install install -m 755 \ + $$name $(INSTDIR); \ + done + install -d $(MANDIR)/$(MAN_PREF) + for mp in $(MAN_PGS); \ + do install -m 644 $$mp $(MANDIR)/$(MAN_PREF); \ + gzip -9f $(MANDIR)/$(MAN_PREF)/$$mp; \ + done + install -d $(INCLUDEDIR)/scsi + for hdr in $(HEADERS); \ + do install -m 644 $$hdr $(INCLUDEDIR)/scsi ; \ + done + +uninstall: + libtool --mode=uninstall rm -f $(LIBDIR)/libsgutils.la + dists="$(EXECS)"; \ + for name in $$dists; do \ + rm -f $(INSTDIR)/$$name; \ + done + for mp in $(MAN_PGS); do \ + rm -f $(MANDIR)/$(MAN_PREF)/$$mp.gz; \ + done + for hdr in $(HEADERS); do \ + rm -f $(INCLUDEDIR)/scsi/$$hdr ; \ + done + +ifeq (.depend,$(wildcard .depend)) +include .depend +endif diff --git a/archive/pre_configure/Makefile.asroot b/archive/pre_configure/Makefile.asroot new file mode 100644 index 00000000..dc3d1990 --- /dev/null +++ b/archive/pre_configure/Makefile.asroot @@ -0,0 +1,252 @@ +SHELL = /bin/sh + +PREFIX=/usr/local +LIBDIR=$(DESTDIR)/$(PREFIX)/lib +INSTDIR=$(DESTDIR)/$(PREFIX)/bin +MANDIR=$(DESTDIR)/$(PREFIX)/share/man +INCLUDEDIR=$(DESTDIR)/$(PREFIX)/include + +CC = gcc +LD = gcc + +EXECS = sg_dd sgp_dd sgm_dd sg_read sg_map sg_scan sg_rbuf \ + sginfo sg_readcap sg_turs sg_inq sg_test_rwbuf \ + sg_start sg_reset sg_modes sg_logs sg_senddiag sg_opcodes \ + sg_persist sg_write_long sg_read_long sg_requests sg_ses \ + sg_verify sg_emc_trespass sg_luns sg_sync sg_prevent \ + sg_get_config sg_wr_mode sg_rtpg sg_reassign sg_format \ + sg_rmsn sg_ident sg_map26 sg_rdac sg_vpd sg_sat_identify \ + sg_read_buffer sg_write_buffer sg_raw + +MAN_PGS = sg_dd.8 sgp_dd.8 sgm_dd.8 sg_read.8 sg_map.8 sg_scan.8 sg_rbuf.8 \ + sginfo.8 sg_readcap.8 sg_turs.8 sg_inq.8 sg_test_rwbuf.8 \ + sg_start.8 sg_reset.8 sg_modes.8 sg_logs.8 sg_senddiag.8 \ + sg_opcodes.8 sg_persist.8 sg_write_long.8 sg_read_long.8 \ + sg_requests.8 sg_ses.8 sg_verify.8 sg_emc_trespass.8 \ + sg_luns.8 sg_sync.8 sg_prevent.8 sg_get_config.8 sg_wr_mode.8 \ + sg_rtpg.8 sg_reassign.8 sg_format.8 sg_rmsn.8 sg_ident.8 \ + sg_map26.8 sg_rdac.8 sg_vpd.8 sg3_utils.8 sg_sat_identify.8 \ + sg_read_buffer.8 sg_write_buffer.8 sg_raw.8 +MAN_PREF = man8 + +HEADERS = sg_lib.h sg_cmds.h sg_cmds_basic.h sg_cmds_extra.h sg_pt.h \ + sg_io_linux.h sg_linux_inc.h + +OS_FLAGS = -DSG3_UTILS_LINUX +LARGE_FILE_FLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +S_CFLAGS = $(OS_FLAGS) $(LARGE_FILE_FLAGS) + +# CFLAGS = -O2 -Wall -W +CFLAGS = -g -O2 -Wall -W +# CFLAGS = -g -O2 -Wall -W -pedantic -std=c99 + +CFLAGS_PTHREADS = -D_REENTRANT + +LDFLAGS = +# LDFLAGS = -v -lm + +LIB_VINFO = 1:0:0 +# Perhaps should use "-release RELEASE" instead +# RELEASE = 1.1 + +all: $(EXECS) + +depend dep: + for i in *.c; do $(CC) $(INCLUDES) $(CFLAGS) $(S_CFLAGS) -M $$i; \ + done > .depend + +clean: + /bin/rm -f *.o $(EXECS) core* .depend *.a *.la *.lo + /bin/rm -rf .libs + + +.c.o: + $(CC) $(INCLUDES) $(CFLAGS) $(S_CFLAGS) -c -o $@ $< + +sg_lib.lo: sg_lib.o + libtool --mode=compile $(CC) -c sg_lib.c + +sg_cmds_basic.lo: sg_cmds_basic.o + libtool --mode=compile $(CC) -c sg_cmds_basic.c + +sg_cmds_extra.lo: sg_cmds_extra.o + libtool --mode=compile $(CC) -c sg_cmds_extra.c + +sg_pt_linux.lo: sg_pt_linux.o + libtool --mode=compile $(CC) -c sg_pt_linux.c + +libsgutils.la: sg_lib.lo sg_cmds_basic.lo sg_cmds_extra.lo sg_pt_linux.lo + libtool --mode=link $(LD) -o libsgutils.la sg_lib.lo sg_cmds_basic.lo \ + sg_cmds_extra.lo sg_pt_linux.lo -rpath $(LIBDIR) \ + -version-info $(LIB_VINFO) + +# libsgutils.la: sg_lib.lo sg_cmds_basic.lo sg_cmds_extra.lo +# libtool --mode=link $(LD) -o libsgutils.la sg_lib.lo sg_cmds_basic.lo \ +# sg_cmds_extra.lo -rpath $(LIBDIR) -release $(RELEASE) + +sg_inq: sg_inq.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_dd: sg_dd.o sg_io_linux.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_scan: sg_scan.o sg_io_linux.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sginfo: sginfo.o sg_io_linux.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_start: sg_start.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_rbuf: sg_rbuf.o sg_io_linux.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_readcap: sg_readcap.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sgp_dd.o: sgp_dd.c + $(CC) $(INCLUDES) $(CFLAGS) $(S_CFLAGS) $(CFLAGS_PTHREADS) \ + -c -o sgp_dd.o $< + +sgp_dd: sgp_dd.o sg_io_linux.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ -lpthread + +sgm_dd: sgm_dd.o sg_io_linux.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_map: sg_map.o sg_io_linux.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_turs: sg_turs.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_test_rwbuf: sg_test_rwbuf.o sg_io_linux.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_read: sg_read.o sg_io_linux.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_reset: sg_reset.o + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_modes: sg_modes.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_logs: sg_logs.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_senddiag: sg_senddiag.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_opcodes: sg_opcodes.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_persist: sg_persist.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_write_long: sg_write_long.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_read_long: sg_read_long.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_requests: sg_requests.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_ses: sg_ses.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_verify: sg_verify.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_emc_trespass: sg_emc_trespass.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_luns: sg_luns.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_sync: sg_sync.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_prevent: sg_prevent.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_get_config: sg_get_config.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_wr_mode: sg_wr_mode.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_rtpg: sg_rtpg.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_reassign: sg_reassign.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_format: sg_format.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_rmsn: sg_rmsn.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_ident: sg_ident.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_map26: sg_map26.o + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_rdac: sg_rdac.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_vpd: sg_vpd.o sg_vpd_vendor.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_sat_identify: sg_sat_identify.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_read_buffer: sg_read_buffer.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_write_buffer: sg_write_buffer.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + +sg_raw: sg_raw.o libsgutils.la + libtool --mode=link $(LD) -o $@ $(LDFLAGS) $^ + + +install: $(EXECS) + install -d $(INSTDIR) + install -d $(LIBDIR) + libtool --mode=install install -c libsgutils.la $(LIBDIR)/libsgutils.la + libtool --finish $(LIBDIR) + for name in $^; \ + do libtool --mode=install install -m 755 -s -o root -g root \ + $$name $(INSTDIR); \ + done + install -d $(MANDIR)/$(MAN_PREF) + for mp in $(MAN_PGS); \ + do install -o root -g root -m 644 $$mp $(MANDIR)/$(MAN_PREF); \ + gzip -9f $(MANDIR)/$(MAN_PREF)/$$mp; \ + done + install -d $(INCLUDEDIR)/scsi + for hdr in $(HEADERS); \ + do install -o root -g root -m 644 $$hdr $(INCLUDEDIR)/scsi ; \ + done + +uninstall: + libtool --mode=uninstall rm -f $(LIBDIR)/libsgutils.la + dists="$(EXECS)"; \ + for name in $$dists; do \ + rm -f $(INSTDIR)/$$name; \ + done + for mp in $(MAN_PGS); do \ + rm -f $(MANDIR)/$(MAN_PREF)/$$mp.gz; \ + done + for hdr in $(HEADERS); do \ + rm -f $(INCLUDEDIR)/scsi/$$hdr ; \ + done + +ifeq (.depend,$(wildcard .depend)) +include .depend +endif diff --git a/archive/pre_configure/Makefile.freebsd b/archive/pre_configure/Makefile.freebsd new file mode 100644 index 00000000..53cddce4 --- /dev/null +++ b/archive/pre_configure/Makefile.freebsd @@ -0,0 +1,206 @@ +SHELL = /bin/sh + +PREFIX=/usr/local +LIBDIR=$(DESTDIR)/$(PREFIX)/lib +INSTDIR=$(DESTDIR)/$(PREFIX)/bin +MANDIR=$(DESTDIR)/$(PREFIX)/man +INCLUDEDIR=$(DESTDIR)/$(PREFIX)/include + +CC = gcc +LD = gcc +# LIBTOOL = libtool15 +LIBTOOL = libtool +LT_EXTRA = --tag=junk + +EXECS = sg_readcap sg_turs sg_inq sg_start sg_modes sg_logs \ + sg_senddiag sg_persist sg_requests sg_ses sg_luns \ + sg_sync sg_prevent sg_get_config sg_wr_mode \ + sg_rtpg sg_reassign sg_format sg_rmsn sg_ident \ + sg_read_long sg_write_long sg_verify sg_rdac sg_vpd \ + sg_sat_identify sg_read_buffer sg_write_buffer sg_opcodes \ + sg_raw + +MAN_PGS = sg_readcap.8 sg_turs.8 sg_inq.8 sg_start.8 sg_modes.8 sg_logs.8 \ + sg_senddiag.8 sg_persist.8 sg_requests.8 sg_ses.8 sg_luns.8 \ + sg_sync.8 sg_prevent.8 sg_get_config.8 sg_wr_mode.8 \ + sg_rtpg.8 sg_reassign.8 sg_format.8 sg_rmsn.8 sg_ident.8 \ + sg_read_long.8 sg_write_long.8 sg_verify.8 sg_rdac.8 sg_vpd.8 \ + sg3_utils.8 sg_sat_identify.8 sg_read_buffer.8 sg_write_buffer.8 \ + sg_opcodes.8 sg_raw.8 +MAN_PREF = man8 + +HEADERS = sg_lib.h sg_cmds.h sg_cmds_basic.h sg_cmds_extra.h sg_pt.h + +OS_FLAGS = -DSG3_UTILS_FREEBSD +LARGE_FILE_FLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +S_CFLAGS = $(OS_FLAGS) $(LARGE_FILE_FLAGS) + +# CFLAGS = -O2 -Wall -W +CFLAGS = -g -O2 -Wall -W +# CFLAGS = -g -O2 -Wall -W -pedantic -std=c99 + +CFLAGS_PTHREADS = -D_REENTRANT + +LDFLAGS = -lcam +# LDFLAGS = -v -lm + +LIB_VINFO = 1:0:0 +# Perhaps should use "-release RELEASE" instead +# RELEASE = 1.1 + +all: $(EXECS) + +depend dep: + for i in *.c; do $(CC) $(INCLUDES) $(CFLAGS) -M $$i; \ + done > .depend + +clean: + /bin/rm -f *.o $(EXECS) core* .depend *.a *.la *.lo + /bin/rm -rf .libs + +.c.o: + $(CC) $(INCLUDES) $(CFLAGS) $(S_CFLAGS) -c -o $@ $< + +sg_lib.lo: sg_lib.o + $(LIBTOOL) $(LT_EXTRA) --mode=compile $(CC) -c sg_lib.c + +sg_cmds_basic.lo: sg_cmds_basic.o + $(LIBTOOL) $(LT_EXTRA) --mode=compile $(CC) -c sg_cmds_basic.c + +sg_cmds_extra.lo: sg_cmds_extra.o + $(LIBTOOL) $(LT_EXTRA) --mode=compile $(CC) -c sg_cmds_extra.c + +sg_pt_freebsd.lo: sg_pt_freebsd.o + $(LIBTOOL) $(LT_EXTRA) --mode=compile $(CC) -c sg_pt_freebsd.c + +libsgutils.la: sg_lib.lo sg_cmds_basic.lo sg_cmds_extra.lo sg_pt_freebsd.lo + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o libsgutils.la sg_lib.lo \ + sg_cmds_basic.lo sg_cmds_extra.lo sg_pt_freebsd.lo -rpath $(LIBDIR) \ + -version-info $(LIB_VINFO) + +# libsgutils.la: sg_lib.lo sg_cmds_basic.lo sg_cmds_extra.lo +# $(LIBTOOL) --mode=link $(LD) -o libsgutils.la sg_lib.lo \ +# sg_cmds_basic.lo sg_cmds_extra.lo -rpath $(LIBDIR) -release $(RELEASE) + +sg_readcap: sg_readcap.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_turs: sg_turs.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_inq: sg_inq.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_start: sg_start.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_modes: sg_modes.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_logs: sg_logs.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_senddiag: sg_senddiag.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_persist: sg_persist.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_requests: sg_requests.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_ses: sg_ses.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_luns: sg_luns.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_sync: sg_sync.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_prevent: sg_prevent.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_get_config: sg_get_config.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_wr_mode: sg_wr_mode.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_rtpg: sg_rtpg.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_reassign: sg_reassign.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_format: sg_format.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_rmsn: sg_rmsn.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_ident: sg_ident.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_read_long: sg_read_long.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_write_long: sg_write_long.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_verify: sg_verify.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_rdac: sg_rdac.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_vpd: sg_vpd.o sg_vpd_vendor.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o sg_vpd_vendor.o libsgutils.la + +sg_sat_identify: sg_sat_identify.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_read_buffer: sg_read_buffer.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_write_buffer: sg_write_buffer.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_opcodes: sg_opcodes.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_raw: sg_raw.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +install: $(EXECS) + install -d $(INSTDIR) + install -d $(LIBDIR) + $(LIBTOOL) --mode=install $(LT_EXTRA) install -c libsgutils.la $(LIBDIR)/libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --finish $(LIBDIR) + for name in $(EXECS); \ + do $(LIBTOOL) $(LT_EXTRA) --mode=install install -m 755 \ + $$name $(INSTDIR); \ + done + install -d $(MANDIR)/$(MAN_PREF) + for mp in $(MAN_PGS); \ + do install -m 644 $$mp $(MANDIR)/$(MAN_PREF); \ + gzip -9f $(MANDIR)/$(MAN_PREF)/$$mp; \ + done + install -d $(INCLUDEDIR)/scsi + for hdr in $(HEADERS); \ + do install -m 644 $$hdr $(INCLUDEDIR)/scsi ; \ + done + +uninstall: + $(LIBTOOL) $(LT_EXTRA) --mode=uninstall rm -f $(LIBDIR)/libsgutils.la + dists="$(EXECS)"; \ + for name in $$dists; do \ + rm -f $(INSTDIR)/$$name; \ + done + for mp in $(MAN_PGS); do \ + rm -f $(MANDIR)/$(MAN_PREF)/$$mp.gz; \ + done + for hdr in $(HEADERS); do \ + rm -f $(INCLUDEDIR)/scsi/$$hdr ; \ + done + diff --git a/archive/pre_configure/Makefile.mingw b/archive/pre_configure/Makefile.mingw new file mode 100644 index 00000000..9b4e240b --- /dev/null +++ b/archive/pre_configure/Makefile.mingw @@ -0,0 +1,145 @@ +# Assumes makefile is used in a MSYS shell with a MinGW compiler available. + +SHELL = /bin/sh + +PREFIX=/usr/local +INSTDIR=$(PREFIX)/bin +MANDIR=$(PREFIX)/man + +CC = gcc +LD = gcc + +EXECS = sg_readcap sg_turs sg_inq sg_start sg_modes sg_logs sg_senddiag \ + sg_persist sg_requests sg_ses sg_luns sg_scan \ + sg_sync sg_prevent sg_get_config sg_wr_mode \ + sg_rtpg sg_reassign sg_format sg_rmsn sg_ident \ + sg_read_long sg_write_long sg_verify sg_rdac sg_vpd \ + sg_sat_identify sg_read_buffer sg_write_buffer sg_opcodes \ + sg_raw + +EXE_S = sg_readcap.exe sg_turs.exe sg_inq.exe sg_start.exe sg_modes.exe \ + sg_logs.exe sg_senddiag.exe sg_persist.exe sg_requests.exe \ + sg_ses.exe sg_luns.exe sg_scan.exe sg_sync.exe sg_prevent.exe \ + sg_get_config.exe sg_wr_mode.exe sg_rtpg.exe sg_reassign.exe \ + sg_format.exe sg_rmsn.exe sg_ident.exe sg_read_long.exe \ + sg_write_long.exe sg_verify.exe sg_rdac.exe sg_vpd.exe \ + sg_sat_identify.exe sg_read_buffer.exe sg_write_buffer.exe \ + sg_opcodes.exe sg_raw.exe + +OS_FLAGS = -DSG3_UTILS_WIN32 -DSG3_UTILS_MINGW -DSPTD +# OS_FLAGS = -DSG3_UTILS_WIN32 -DSG3_UTILS_MINGW +LARGE_FILE_FLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +EXTRA_FLAGS = $(OS_FLAGS) $(LARGE_FILE_FLAGS) + +# CFLAGS = -O2 -Wall -W $(EXTRA_FLAGS) +CFLAGS = -g -O2 -Wall -W $(EXTRA_FLAGS) +# CFLAGS = -g -O2 -Wall -W -pedantic -std=c99 $(EXTRA_FLAGS) + +O_FILES = sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_win32.o +O_BFILES = sg_lib.o sg_cmds_basic.o sg_pt_win32.o +O_RFILES = sg_lib.o sg_pt_win32.o +O_SFILES = sg_lib.o + +LDFLAGS = + +all: $(EXECS) + +clean: + rm *.o $(EXE_S) + +.c.o: + $(CC) $(INCLUDES) $(CFLAGS) $(S_CFLAGS) -c -o $@ $< + +sg_readcap: sg_readcap.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_turs: sg_turs.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_inq: sg_inq.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_start: sg_start.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_modes: sg_modes.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_logs: sg_logs.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_senddiag: sg_senddiag.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_persist: sg_persist.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_requests: sg_requests.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_ses: sg_ses.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_luns: sg_luns.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_scan: sg_scan.o $(O_SFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_SFILES) + +sg_sync: sg_sync.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_prevent: sg_prevent.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_get_config: sg_get_config.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_wr_mode: sg_wr_mode.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_rtpg: sg_rtpg.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_reassign: sg_reassign.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_format: sg_format.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_rmsn: sg_rmsn.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_ident: sg_ident.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_read_long: sg_read_long.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_write_long: sg_write_long.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_verify: sg_verify.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_rdac: sg_rdac.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_vpd: sg_vpd.o sg_vpd_vendor.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o sg_vpd_vendor.o $(O_BFILES) + +sg_sat_identify: sg_sat_identify.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_read_buffer: sg_read_buffer.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_write_buffer: sg_write_buffer.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_opcodes: sg_opcodes.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_raw: sg_raw.o $(O_RFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_RFILES) + diff --git a/archive/pre_configure/Makefile.osf1 b/archive/pre_configure/Makefile.osf1 new file mode 100644 index 00000000..13a7066a --- /dev/null +++ b/archive/pre_configure/Makefile.osf1 @@ -0,0 +1,207 @@ +SHELL = /bin/sh + +PREFIX=/usr/local +LIBDIR=$(DESTDIR)/$(PREFIX)/lib +INSTDIR=$(DESTDIR)/$(PREFIX)/bin +MANDIR=$(DESTDIR)/$(PREFIX)/man +INCLUDEDIR=$(DESTDIR)/$(PREFIX)/include + +CC = cc +LD = cc +# LIBTOOL = libtool15 +LIBTOOL = libtool + +EXECS = sg_readcap sg_turs sg_inq sg_start sg_modes sg_logs \ + sg_senddiag sg_persist sg_requests sg_ses sg_luns \ + sg_sync sg_prevent sg_get_config sg_wr_mode \ + sg_rtpg sg_reassign sg_format sg_rmsn sg_ident \ + sg_read_long sg_write_long sg_verify sg_rdac sg_vpd \ + sg_sat_identify sg_read_buffer sg_write_buffer sg_opcodes \ + sg_raw + +MAN_PGS = sg_readcap.8 sg_turs.8 sg_inq.8 sg_start.8 sg_modes.8 sg_logs.8 \ + sg_senddiag.8 sg_persist.8 sg_requests.8 sg_ses.8 sg_luns.8 \ + sg_sync.8 sg_prevent.8 sg_get_config.8 sg_wr_mode.8 \ + sg_rtpg.8 sg_reassign.8 sg_format.8 sg_rmsn.8 sg_ident.8 \ + sg_read_long.8 sg_write_long.8 sg_verify.8 sg_rdac.8 sg_vpd.8 \ + sg3_utils.8 sg_sat_identify.8 sg_read_buffer.8 sg_write_buffer.8 \ + sg_opcodes.8 sg_raw.8 + +MAN_PREF = man8 + +HEADERS = sg_lib.h sg_cmds.h sg_cmds_basic.h sg_cmds_extra.h sg_pt.h + +OS_FLAGS = -DSG3_UTILS_OSF1 +LARGE_FILE_FLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +S_CFLAGS = $(OS_FLAGS) $(LARGE_FILE_FLAGS) + +# CFLAGS = -O2 -Wall -W +CFLAGS = -g -I./getopt_long +# CFLAGS = -g -O2 -Wall -W -pedantic -std=c99 + +CFLAGS_PTHREADS = -pthread + +LDFLAGS = +# LDFLAGS = -v -lm + +LIB_VINFO = 1:0:0 +# Perhaps should use "-release RELEASE" instead +# RELEASE = 1.1 + +all: $(EXECS) + +depend dep: + for i in *.c; do $(CC) $(INCLUDES) $(CFLAGS) -M $$i; \ + done > .depend + +clean: + /bin/rm -f *.o $(EXECS) core* .depend *.a *.la *.lo + /bin/rm -f getopt_long/*.o + /bin/rm -rf .libs + +.c.o: + $(CC) $(INCLUDES) $(CFLAGS) $(S_CFLAGS) -c -o $@ $< + +sg_lib.lo: sg_lib.o + $(LIBTOOL) $(LT_EXTRA) --mode=compile $(CC) -c sg_lib.c + +sg_cmds_basic.lo: sg_cmds_basic.o + $(LIBTOOL) $(LT_EXTRA) --mode=compile $(CC) -c sg_cmds_basic.c + +sg_cmds_extra.lo: sg_cmds_extra.o + $(LIBTOOL) $(LT_EXTRA) --mode=compile $(CC) -c sg_cmds_extra.c + +sg_pt_osf1.lo: sg_pt_osf1.o + $(LIBTOOL) $(LT_EXTRA) --mode=compile $(CC) -c sg_pt_osf1.c + +libsgutils.la: sg_lib.lo sg_cmds_basic.lo sg_cmds_extra.lo sg_pt_osf1.lo + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o libsgutils.la sg_lib.lo \ + sg_cmds_basic.lo sg_cmds_extra.lo sg_pt_osf1.lo -rpath $(LIBDIR) \ + -version-info $(LIB_VINFO) + +# libsgutils.la: sg_lib.lo sg_cmds_basic.lo sg_cmds_extra.lo +# $(LIBTOOL) --mode=link $(LD) -o libsgutils.la sg_lib.lo +# sg_cmds_basic.lo sg_cmds_extra.lo -rpath $(LIBDIR) -release $(RELEASE) + +sg_readcap: sg_readcap.o libsgutils.la getopt_long/getopt_long.o + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la getopt_long/getopt_long.o + +sg_turs: sg_turs.o libsgutils.la getopt_long/getopt_long.o + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la getopt_long/getopt_long.o + +sg_inq: sg_inq.o libsgutils.la getopt_long/getopt_long.o + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la getopt_long/getopt_long.o + +sg_start: sg_start.o libsgutils.la getopt_long/getopt_long.o + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la getopt_long/getopt_long.o + +sg_modes: sg_modes.o libsgutils.la getopt_long/getopt_long.o + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la getopt_long/getopt_long.o + +sg_logs: sg_logs.o libsgutils.la getopt_long/getopt_long.o + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la getopt_long/getopt_long.o + +sg_senddiag: sg_senddiag.o libsgutils.la getopt_long/getopt_long.o + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la getopt_long/getopt_long.o + +sg_persist: sg_persist.o libsgutils.la getopt_long/getopt_long.o + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la getopt_long/getopt_long.o + +sg_requests: sg_requests.o libsgutils.la getopt_long/getopt_long.o + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la getopt_long/getopt_long.o + +sg_ses: sg_ses.o libsgutils.la getopt_long/getopt_long.o + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la getopt_long/getopt_long.o + +sg_luns: sg_luns.o libsgutils.la getopt_long/getopt_long.o + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la getopt_long/getopt_long.o + +sg_sync: sg_sync.o libsgutils.la getopt_long/getopt_long.o + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la getopt_long/getopt_long.o + +sg_prevent: sg_prevent.o libsgutils.la getopt_long/getopt_long.o + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la getopt_long/getopt_long.o + +sg_get_config: sg_get_config.o libsgutils.la getopt_long/getopt_long.o + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la getopt_long/getopt_long.o + +sg_wr_mode: sg_wr_mode.o libsgutils.la getopt_long/getopt_long.o + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la getopt_long/getopt_long.o + +sg_rtpg: sg_rtpg.o libsgutils.la getopt_long/getopt_long.o + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la getopt_long/getopt_long.o + +sg_reassign: sg_reassign.o libsgutils.la getopt_long/getopt_long.o + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la getopt_long/getopt_long.o + +sg_format: sg_format.o libsgutils.la getopt_long/getopt_long.o + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la getopt_long/getopt_long.o + +sg_rmsn: sg_rmsn.o libsgutils.la getopt_long/getopt_long.o + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la getopt_long/getopt_long.o + +sg_ident: sg_ident.o libsgutils.la getopt_long/getopt_long.o + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la getopt_long/getopt_long.o + +sg_read_long: sg_read_long.o libsgutils.la getopt_long/getopt_long.o + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la getopt_long/getopt_long.o + +sg_write_long: sg_write_long.o libsgutils.la getopt_long/getopt_long.o + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la getopt_long/getopt_long.o + +sg_verify: sg_verify.o libsgutils.la getopt_long/getopt_long.o + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la getopt_long/getopt_long.o + +sg_rdac: sg_rdac.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la getopt_long/getopt_long.o + +sg_vpd: sg_vpd.o sg_vpd_vendor.o libsgutils.la getopt_long/getopt_long.o + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o sg_vpd_vendor.o libsgutils.la getopt_long/getopt_long.o + +sg_sat_identify: sg_sat_identify.o libsgutils.la getopt_long/getopt_long.o + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la getopt_long/getopt_long.o + +sg_read_buffer: sg_read_buffer.o libsgutils.la getopt_long/getopt_long.o + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la getopt_long/getopt_long.o + +sg_write_buffer: sg_write_buffer.o libsgutils.la getopt_long/getopt_long.o + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la getopt_long/getopt_long.o + +sg_opcodes: sg_opcodes.o libsgutils.la getopt_long/getopt_long.o + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la getopt_long/getopt_long.o + +sg_raw: sg_raw.o libsgutils.la getopt_long/getopt_long.o + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la getopt_long/getopt_long.o + +install: $(EXECS) + test -d $(INSTDIR) || mkdir -p $(INSTDIR) + test -d $(LIBDIR) || mkdir -p $(LIBDIR) + $(LIBTOOL) --mode=install $(LT_EXTRA) installbsd -c libsgutils.la $(LIBDIR) + $(LIBTOOL) $(LT_EXTRA) --finish $(LIBDIR) + for name in $(EXECS); \ + do $(LIBTOOL) $(LT_EXTRA) --mode=install installbsd -c -m 755 \ + $$name $(INSTDIR); \ + done + test -d $(MANDIR)/$(MAN_PREF) || mkdir -p $(MANDIR)/$(MAN_PREF) + for mp in $(MAN_PGS); \ + do installbsd -c -m 644 $$mp $(MANDIR)/$(MAN_PREF); \ + gzip -9f $(MANDIR)/$(MAN_PREF)/$$mp; \ + done + test -d $(INCLUDEDIR)/scsi || mkdir -p $(INCLUDEDIR)/scsi + for hdr in $(HEADERS); \ + do installbsd -c -m 644 $$hdr $(INCLUDEDIR)/scsi ; \ + done + +uninstall: + $(LIBTOOL) $(LT_EXTRA) --mode=uninstall rm -f $(LIBDIR)/libsgutils.la + dists="$(EXECS)"; \ + for name in $$dists; do \ + rm -f $(INSTDIR)/$$name; \ + done + for mp in $(MAN_PGS); do \ + rm -f $(MANDIR)/$(MAN_PREF)/$$mp.gz; \ + done + for hdr in $(HEADERS); do \ + rm -f $(INCLUDEDIR)/scsi/$$hdr ; \ + done + diff --git a/archive/pre_configure/Makefile.solaris b/archive/pre_configure/Makefile.solaris new file mode 100644 index 00000000..408e4500 --- /dev/null +++ b/archive/pre_configure/Makefile.solaris @@ -0,0 +1,205 @@ +SHELL = /bin/sh + +PREFIX=/usr/local +LIBDIR=$(DESTDIR)/$(PREFIX)/lib +INSTDIR=$(DESTDIR)/$(PREFIX)/bin +MANDIR=$(DESTDIR)/$(PREFIX)/man +INCLUDEDIR=$(DESTDIR)/$(PREFIX)/include + +CC = gcc +LD = gcc +# LIBTOOL = libtool15 +LIBTOOL = libtool +LT_EXTRA = --tag=junk + +EXECS = sg_readcap sg_turs sg_inq sg_start sg_modes sg_logs \ + sg_senddiag sg_persist sg_requests sg_ses sg_luns \ + sg_sync sg_prevent sg_get_config sg_wr_mode \ + sg_rtpg sg_reassign sg_format sg_rmsn sg_ident \ + sg_read_long sg_write_long sg_verify sg_rdac sg_vpd \ + sg_sat_identify sg_read_buffer sg_write_buffer sg_opcodes \ + sg_raw + +MAN_PGS = sg_readcap.8 sg_turs.8 sg_inq.8 sg_start.8 sg_modes.8 sg_logs.8 \ + sg_senddiag.8 sg_persist.8 sg_requests.8 sg_ses.8 sg_luns.8 \ + sg_sync.8 sg_prevent.8 sg_get_config.8 sg_wr_mode.8 \ + sg_rtpg.8 sg_reassign.8 sg_format.8 sg_rmsn.8 sg_ident.8 \ + sg_read_long.8 sg_write_long.8 sg_verify.8 sg_rdac.8 sg_vpd.8 \ + sg3_utils.8 sg_sat_identify.8 sg_read_buffer.8 sg_write_buffer.8 \ + sg_opcodes.8 sg_raw.8 +MAN_PREF = man8 + +HEADERS = sg_lib.h sg_cmds.h sg_cmds_basic.h sg_cmds_extra.h sg_pt.h + +OS_FLAGS = -DSG3_UTILS_SOLARIS +LARGE_FILE_FLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +S_CFLAGS = $(OS_FLAGS) $(LARGE_FILE_FLAGS) + +# CFLAGS = -O2 -Wall -W +CFLAGS = -g -O2 -Wall -W +# CFLAGS = -g -O2 -Wall -W -pedantic -std=c99 + +CFLAGS_PTHREADS = -D_REENTRANT + +# LDFLAGS = -lcam +# LDFLAGS = -v -lm + +LIB_VINFO = 1:0:0 +# Perhaps should use "-release RELEASE" instead +# RELEASE = 1.1 + +all: $(EXECS) + +depend dep: + for i in *.c; do $(CC) $(INCLUDES) $(CFLAGS) -M $$i; \ + done > .depend + +clean: + /bin/rm -f *.o $(EXECS) core* .depend *.a *.la *.lo + /bin/rm -rf .libs + +.c.o: + $(CC) $(INCLUDES) $(CFLAGS) $(S_CFLAGS) -c -o $@ $< + +sg_lib.lo: sg_lib.o + $(LIBTOOL) $(LT_EXTRA) --mode=compile $(CC) -c sg_lib.c + +sg_cmds_basic.lo: sg_cmds_basic.o + $(LIBTOOL) $(LT_EXTRA) --mode=compile $(CC) -c sg_cmds_basic.c + +sg_cmds_extra.lo: sg_cmds_extra.o + $(LIBTOOL) $(LT_EXTRA) --mode=compile $(CC) -c sg_cmds_extra.c + +sg_pt_solaris.lo: sg_pt_solaris.o + $(LIBTOOL) $(LT_EXTRA) --mode=compile $(CC) -c sg_pt_solaris.c + +libsgutils.la: sg_lib.lo sg_cmds_basic.lo sg_cmds_extra.lo sg_pt_solaris.lo + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o libsgutils.la sg_lib.lo \ + sg_cmds_basic.lo sg_cmds_extra.lo sg_pt_solaris.lo -rpath $(LIBDIR) \ + -version-info $(LIB_VINFO) + +# libsgutils.la: sg_lib.lo sg_cmds_basic.lo sg_cmds_extra.lo +# $(LIBTOOL) --mode=link $(LD) -o libsgutils.la sg_lib.lo \ +# sg_cmds_basic.lo sg_cmds_extra.lo -rpath $(LIBDIR) -release $(RELEASE) + +sg_readcap: sg_readcap.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_turs: sg_turs.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_inq: sg_inq.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_start: sg_start.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_modes: sg_modes.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_logs: sg_logs.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_senddiag: sg_senddiag.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_persist: sg_persist.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_requests: sg_requests.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_ses: sg_ses.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_luns: sg_luns.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_sync: sg_sync.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_prevent: sg_prevent.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_get_config: sg_get_config.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_wr_mode: sg_wr_mode.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_rtpg: sg_rtpg.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_reassign: sg_reassign.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_format: sg_format.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_rmsn: sg_rmsn.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_ident: sg_ident.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_read_long: sg_read_long.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_write_long: sg_write_long.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_verify: sg_verify.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_rdac: sg_rdac.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_vpd: sg_vpd.o sg_vpd_vendor.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o sg_vpd_vendor.o libsgutils.la + +sg_sat_identify: sg_sat_identify.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_read_buffer: sg_read_buffer.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_write_buffer: sg_write_buffer.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_opcodes: sg_opcodes.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +sg_raw: sg_raw.o libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --mode=link $(LD) -o $@ $(LDFLAGS) $@.o libsgutils.la + +install: $(EXECS) + install -d $(INSTDIR) + install -d $(LIBDIR) + $(LIBTOOL) --mode=install $(LT_EXTRA) install -c libsgutils.la $(LIBDIR)/libsgutils.la + $(LIBTOOL) $(LT_EXTRA) --finish $(LIBDIR) + for name in $(EXECS); \ + do $(LIBTOOL) $(LT_EXTRA) --mode=install install -m 755 \ + -f $(INSTDIR) $$name; \ + done + install -d $(MANDIR)/$(MAN_PREF) + for mp in $(MAN_PGS); \ + do install -s -m 644 -f $(MANDIR)/$(MAN_PREF) $$mp; \ + done +# install -d $(INCLUDEDIR)/scsi +# for hdr in $(HEADERS); \ +# do install -m 644 $$hdr $(INCLUDEDIR)/scsi ; \ +# done + +uninstall: + $(LIBTOOL) $(LT_EXTRA) --mode=uninstall rm -f $(LIBDIR)/libsgutils.la + dists="$(EXECS)"; \ + for name in $$dists; do \ + rm -f $(INSTDIR)/$$name; \ + done + for mp in $(MAN_PGS); do \ + rm -f $(MANDIR)/$(MAN_PREF)/$$mp; \ + done +# for hdr in $(HEADERS); do \ +# rm -f $(INCLUDEDIR)/scsi/$$hdr ; \ +# done + diff --git a/archive/pre_configure/Makefile.win32 b/archive/pre_configure/Makefile.win32 new file mode 100644 index 00000000..a3708461 --- /dev/null +++ b/archive/pre_configure/Makefile.win32 @@ -0,0 +1,179 @@ +SHELL = /bin/sh + +PREFIX=/usr/local +INSTDIR=$(PREFIX)/bin +MANDIR=$(PREFIX)/man + +CC = gcc +LD = gcc + +EXECS = sg_readcap sg_turs sg_inq sg_start sg_modes sg_logs sg_senddiag \ + sg_persist sg_requests sg_ses sg_luns sg_scan \ + sg_sync sg_prevent sg_get_config sg_wr_mode \ + sg_rtpg sg_reassign sg_format sg_rmsn sg_ident \ + sg_read_long sg_write_long sg_verify sg_rdac sg_vpd \ + sg_sat_identify sg_read_buffer sg_write_buffer sg_opcodes \ + sg_raw + +EXE_S = sg_readcap.exe sg_turs.exe sg_inq.exe sg_start.exe sg_modes.exe \ + sg_logs.exe sg_senddiag.exe sg_persist.exe sg_requests.exe \ + sg_ses.exe sg_luns.exe sg_scan.exe sg_sync.exe sg_prevent.exe \ + sg_get_config.exe sg_wr_mode.exe sg_rtpg.exe sg_reassign.exe \ + sg_format.exe sg_rmsn.exe sg_ident.exe sg_read_long.exe \ + sg_write_long.exe sg_verify.exe sg_rdac.exe sg_vpd.exe \ + sg_sat_identify.exe sg_read_buffer.exe sg_write_buffer.exe \ + sg_opcodes.exe sg_raw.exe + +MAN_PGS = sg_readcap.8 sg_turs.8 sg_inq.8 sg_start.8 sg_modes.8 sg_logs.8 \ + sg_senddiag.8 sg_persist.8 sg_requests.8 sg_ses.8 sg_luns.8 \ + sg_scan.8 sg_sync.8 sg_prevent.8 sg_get_config.8 sg_wr_mode.8 \ + sg_rtpg.8 sg_reassign.8 sg_format.8 sg_rmsn.8 sg_ident.8 \ + sg_read_long.8 sg_write_long.8 sg_verify.8 sg_rdac.8 sg_vpd.8 \ + sg3_utils.8 sg_sat_identify.8 sg_read_buffer.8 sg_write_buffer.8 \ + sg_opcodes.8 sg_raw.8 + +MAN_PREF = man8 + +OS_FLAGS = -DSG3_UTILS_WIN32 -DSPTD +# OS_FLAGS = -DSG3_UTILS_WIN32 +LARGE_FILE_FLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +EXTRA_FLAGS = $(OS_FLAGS) $(LARGE_FILE_FLAGS) + +# CFLAGS = -O2 -Wall -W $(EXTRA_FLAGS) +CFLAGS = -g -O2 -Wall -W $(EXTRA_FLAGS) +# CFLAGS = -g -O2 -Wall -W -pedantic -std=c99 $(EXTRA_FLAGS) + +O_FILES = sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_win32.o +O_BFILES = sg_lib.o sg_cmds_basic.o sg_pt_win32.o +O_RFILES = sg_lib.o sg_pt_win32.o +O_SFILES = sg_lib.o + +LDFLAGS = + +all: $(EXECS) + cp sg_scan.8w sg_scan.8 + +depend dep: + for i in *.c; do $(CC) $(INCLUDES) $(CFLAGS) -M $$i; \ + done > .depend + +clean: + /bin/rm -f *.o $(EXE_S) core* .depend *.a + +.c.o: + $(CC) $(INCLUDES) $(CFLAGS) $(S_CFLAGS) -c -o $@ $< + +sg_readcap: sg_readcap.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_turs: sg_turs.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_inq: sg_inq.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_start: sg_start.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_modes: sg_modes.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_logs: sg_logs.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_senddiag: sg_senddiag.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_persist: sg_persist.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_requests: sg_requests.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_ses: sg_ses.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_luns: sg_luns.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_scan: sg_scan.o $(O_SFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_SFILES) + +sg_sync: sg_sync.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_prevent: sg_prevent.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_get_config: sg_get_config.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_wr_mode: sg_wr_mode.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_rtpg: sg_rtpg.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_reassign: sg_reassign.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_format: sg_format.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_rmsn: sg_rmsn.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_ident: sg_ident.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_read_long: sg_read_long.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_write_long: sg_write_long.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_verify: sg_verify.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_rdac: sg_rdac.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_vpd: sg_vpd.o sg_vpd_vendor.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o sg_vpd_vendor.o $(O_BFILES) + +sg_sat_identify: sg_sat_identify.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_read_buffer: sg_read_buffer.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_write_buffer: sg_write_buffer.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_opcodes: sg_opcodes.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_raw: sg_raw.o $(O_RFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_RFILES) + +install: $(EXECS) + cp sg_scan.8w sg_scan.8 + install -d $(INSTDIR) + for name in $(EXECS); \ + do install -s -m 755 $$name $(INSTDIR); \ + done + install -d $(MANDIR)/$(MAN_PREF) + for mp in $(MAN_PGS); \ + do install -m 644 $$mp $(MANDIR)/$(MAN_PREF); \ + gzip -9f $(MANDIR)/$(MAN_PREF)/$$mp; \ + done + +uninstall: + dists="$(EXECS)"; \ + for name in $$dists; do \ + rm -f $(INSTDIR)/$$name; \ + done + for mp in $(MAN_PGS); do \ + rm -f $(MANDIR)/$(MAN_PREF)/$$mp.gz; \ + done + diff --git a/archive/pre_configure/README b/archive/pre_configure/README new file mode 100644 index 00000000..1585e48d --- /dev/null +++ b/archive/pre_configure/README @@ -0,0 +1,22 @@ +The contents of this "pre_configure" subdirectory are the hand-crafted +Makefiles and associated scripts that were used prior to their replacment +by the autotools based logic. The autotools suite is associated with the +build sequence: "./configure ; make ; make install" that many users are +coming to expect. While it might be easier for users (especially on +lesser used architectures) autotools is a pain to setup. It can also +be sensitive to which versions of build tools (e.g. autoconf and automake) +are being used. + +Hence the old hand-crafted Makefiles and associated scripts are archived +in this directory. They represent the state of the build system during +the development of sg3_utils version 1.25 . This older build system +won't be maintained past this point and is put here for reference and +may be helpful if autotools breaks down (or at least they may show the +author's intentions). + +Note that various other subdirectories (e.g. utils and examples) still +use hand-crafted Makefiles. + +Douglas Gilbert +18th July 2007 + diff --git a/archive/pre_configure/debian_rules b/archive/pre_configure/debian_rules new file mode 100755 index 00000000..b873367b --- /dev/null +++ b/archive/pre_configure/debian_rules @@ -0,0 +1,80 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 by Joey Hess. +# +# This version is for a hypothetical package that builds an +# architecture-dependant package, as well as an architecture-independent +# package. + +# Uncomment this to turn on verbose mode. +# export DH_VERBOSE=1 + +# Debhelper compatibility level +export DH_COMPAT=4 + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + touch configure-stamp + +build: configure-stamp build-stamp +build-stamp: + dh_testdir + + # Add here commands to compile the package. + PREFIX=/usr MANDIR=/usr/share/man $(MAKE) -e + + touch build-stamp + +clean: + dh_testdir + dh_testroot + + # Add here commands to clean up after the build process. + -$(MAKE) clean + + rm -f build-stamp configure-stamp debian/substvars + + dh_clean + +install: DH_OPTIONS= +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/tmp + $(MAKE) -e install DESTDIR=$(CURDIR)/debian/tmp PREFIX=/usr + + find debian/tmp/usr/bin debian/tmp/usr/lib -type f -exec chrpath -d {} \; + dh_install --autodest --sourcedir=debian/tmp + dh_installman + +# Build architecture-independent files here. +# Pass -i to all debhelper commands in this target to reduce clutter. +binary-indep: build install +# nothing to do here + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir -a + dh_testroot -a + dh_installdocs -a + dh_installexamples -a + dh_installmenu -a + dh_installchangelogs CHANGELOG -a + dh_strip -a + dh_link -a + dh_compress -a -X archive -X .c -X .h + dh_fixperms -a + dh_makeshlibs -V -v + dh_installdeb -a + dh_shlibdeps -ldebian/tmp/usr/lib -L libsgutils1 + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/archive/pre_configure/make_no_lib.sh b/archive/pre_configure/make_no_lib.sh new file mode 100755 index 00000000..a63c04e9 --- /dev/null +++ b/archive/pre_configure/make_no_lib.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +make -f no_lib/Makefile.linux $@ diff --git a/archive/pre_configure/make_no_lib_freebsd.sh b/archive/pre_configure/make_no_lib_freebsd.sh new file mode 100755 index 00000000..49d7ae28 --- /dev/null +++ b/archive/pre_configure/make_no_lib_freebsd.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +make -f no_lib/Makefile.freebsd $@ diff --git a/archive/pre_configure/make_no_lib_osf1.sh b/archive/pre_configure/make_no_lib_osf1.sh new file mode 100755 index 00000000..ee6a97eb --- /dev/null +++ b/archive/pre_configure/make_no_lib_osf1.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +make -f no_lib/Makefile.osf1 $@ diff --git a/archive/pre_configure/make_no_lib_solaris.sh b/archive/pre_configure/make_no_lib_solaris.sh new file mode 100755 index 00000000..bf0aeff6 --- /dev/null +++ b/archive/pre_configure/make_no_lib_solaris.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +make -f no_lib/Makefile.solaris $@ diff --git a/archive/pre_configure/make_no_lib_static.sh b/archive/pre_configure/make_no_lib_static.sh new file mode 100755 index 00000000..5cac9b23 --- /dev/null +++ b/archive/pre_configure/make_no_lib_static.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +make -f no_lib/Makefile.linux_static $@ diff --git a/archive/pre_configure/make_no_lib_win32.sh b/archive/pre_configure/make_no_lib_win32.sh new file mode 100755 index 00000000..24f6953a --- /dev/null +++ b/archive/pre_configure/make_no_lib_win32.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +make -f no_lib/Makefile.win32 $@ diff --git a/archive/pre_configure/no_lib/Makefile.freebsd b/archive/pre_configure/no_lib/Makefile.freebsd new file mode 100644 index 00000000..c2de140e --- /dev/null +++ b/archive/pre_configure/no_lib/Makefile.freebsd @@ -0,0 +1,162 @@ +SHELL = /bin/sh + +PREFIX=/usr/local +INSTDIR=$(DESTDIR)/$(PREFIX)/bin +MANDIR=$(DESTDIR)/$(PREFIX)/man + +CC = gcc +LD = gcc + +EXECS = sg_readcap sg_turs sg_inq sg_start sg_modes sg_logs sg_senddiag \ + sg_persist sg_requests sg_ses sg_luns \ + sg_sync sg_prevent sg_get_config sg_wr_mode \ + sg_rtpg sg_reassign sg_format sg_rmsn sg_ident \ + sg_read_long sg_write_long sg_verify sg_rdac sg_vpd \ + sg_sat_identify sg_read_buffer sg_write_buffer sg_opcodes \ + sg_raw + +MAN_PGS = sg_readcap.8 sg_turs.8 sg_inq.8 sg_start.8 sg_modes.8 sg_logs.8 \ + sg_senddiag.8 sg_persist.8 sg_requests.8 sg_ses.8 sg_luns.8 \ + sg_sync.8 sg_prevent.8 sg_get_config.8 sg_wr_mode.8 \ + sg_rtpg.8 sg_reassign.8 sg_format.8 sg_rmsn.8 sg_ident.8 \ + sg_read_long.8 sg_write_long.8 sg_verify.8 sg_rdac.8 sg_vpd.8 \ + sg3_utils.8 sg_sat_identify.8 sg_read_buffer.8 sg_write_buffer.8 \ + sg_opcodes.8 sg_raw.8 + +MAN_PREF = man8 + +OS_FLAGS = -DSG3_UTILS_FREEBSD +LARGE_FILE_FLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +EXTRA_FLAGS = $(OS_FLAGS) $(LARGE_FILE_FLAGS) + +# CFLAGS = -O2 -Wall -W $(EXTRA_FLAGS) +CFLAGS = -g -O2 -Wall -W $(EXTRA_FLAGS) +# CFLAGS = -g -O2 -Wall -W -pedantic -std=c99 $(EXTRA_FLAGS) + +O_FILES = sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_freebsd.o +O_BFILES = sg_lib.o sg_cmds_basic.o sg_pt_freebsd.o +O_RFILES = sg_lib.o sg_pt_freebsd.o + +LDFLAGS = -lcam +# LDFLAGS = -v -lm + +all: $(EXECS) + +depend dep: + for i in *.c; do $(CC) $(INCLUDES) $(CFLAGS) -M $$i; \ + done > .depend + +clean: + /bin/rm -f *.o $(EXECS) core* .depend *.a *.la *.lo + /bin/rm -rf .libs + +sg_readcap: sg_readcap.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_turs: sg_turs.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_inq: sg_inq.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_start: sg_start.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_modes: sg_modes.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_logs: sg_logs.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_senddiag: sg_senddiag.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_persist: sg_persist.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_requests: sg_requests.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_ses: sg_ses.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_luns: sg_luns.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_sync: sg_sync.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_prevent: sg_prevent.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_get_config: sg_get_config.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_wr_mode: sg_wr_mode.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_rtpg: sg_rtpg.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_reassign: sg_reassign.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_format: sg_format.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_rmsn: sg_rmsn.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_ident: sg_ident.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_read_long: sg_read_long.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_write_long: sg_write_long.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_verify: sg_verify.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_rdac: sg_rdac.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_vpd: sg_vpd.o sg_vpd_vendor.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o sg_vpd_vendor.o $(O_BFILES) + +sg_sat_identify: sg_sat_identify.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_read_buffer: sg_read_buffer.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_write_buffer: sg_write_buffer.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_opcodes: sg_opcodes.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_raw: sg_raw.o $(O_RFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_RFILES) + +install: $(EXECS) + install -d $(INSTDIR) + for name in $(EXECS); \ + do install -s -m 755 $$name $(INSTDIR); \ + done + install -d $(MANDIR)/$(MAN_PREF) + for mp in $(MAN_PGS); \ + do install -m 644 $$mp $(MANDIR)/$(MAN_PREF); \ + gzip -9f $(MANDIR)/$(MAN_PREF)/$$mp; \ + done + +uninstall: + dists="$(EXECS)"; \ + for name in $$dists; do \ + rm -f $(INSTDIR)/$$name; \ + done + for mp in $(MAN_PGS); do \ + rm -f $(MANDIR)/$(MAN_PREF)/$$mp.gz; \ + done + diff --git a/archive/pre_configure/no_lib/Makefile.linux b/archive/pre_configure/no_lib/Makefile.linux new file mode 100644 index 00000000..b07df7db --- /dev/null +++ b/archive/pre_configure/no_lib/Makefile.linux @@ -0,0 +1,208 @@ +SHELL = /bin/sh + +PREFIX=/usr/local +INSTDIR=$(DESTDIR)/$(PREFIX)/bin +MANDIR=$(DESTDIR)/$(PREFIX)/share/man + +ifndef CC +CC = gcc +endif +LD = $(CC) + +EXECS = sg_dd sgp_dd sgm_dd sg_read sg_map sg_scan sg_rbuf \ + sginfo sg_readcap sg_turs sg_inq sg_test_rwbuf \ + sg_start sg_reset sg_modes sg_logs sg_senddiag sg_opcodes \ + sg_persist sg_write_long sg_read_long sg_requests sg_ses \ + sg_verify sg_emc_trespass sg_luns sg_sync sg_prevent \ + sg_get_config sg_wr_mode sg_rtpg sg_reassign sg_format \ + sg_rmsn sg_ident sg_map26 sg_rdac sg_vpd sg_sat_identify \ + sg_read_buffer sg_write_buffer sg_raw + +MAN_PGS = sg_dd.8 sgp_dd.8 sgm_dd.8 sg_read.8 sg_map.8 sg_scan.8 sg_rbuf.8 \ + sginfo.8 sg_readcap.8 sg_turs.8 sg_inq.8 sg_test_rwbuf.8 \ + sg_start.8 sg_reset.8 sg_modes.8 sg_logs.8 sg_senddiag.8 \ + sg_opcodes.8 sg_persist.8 sg_write_long.8 sg_read_long.8 \ + sg_requests.8 sg_ses.8 sg_verify.8 sg_emc_trespass.8 \ + sg_luns.8 sg_sync.8 sg_prevent.8 sg_get_config.8 sg_wr_mode.8 \ + sg_rtpg.8 sg_reassign.8 sg_format.8 sg_rmsn.8 sg_ident.8 \ + sg_map26.8 sg_rdac.8 sg_vpd.8 sg3_utils.8 sg_sat_identify.8 \ + sg_read_buffer.8 sg_write_buffer.8 sg_raw.8 +MAN_PREF = man8 + +OS_FLAGS = -DSG3_UTILS_LINUX +LARGE_FILE_FLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +EXTRA_FLAGS = $(OS_FLAGS) $(LARGE_FILE_FLAGS) + +# CFLAGS = -O2 -Wall -W $(EXTRA_FLAGS) +# CFLAGS = -g -O2 -Wall -W $(EXTRA_FLAGS) +# CFLAGS = -g -O2 -W -DSG_KERNEL_INCLUDES $(EXTRA_FLAGS) +CFLAGS = -g -O2 -Wall -W -pedantic -std=c99 $(EXTRA_FLAGS) +# CFLAGS = -g -O2 -Wall -W -pedantic -std=gnu++98 $(EXTRA_FLAGS) + +CFLAGS_PTHREADS = -D_REENTRANT + +LDFLAGS = +# LDFLAGS = -v -lm + +all: $(EXECS) + +depend dep: + for i in *.c; do $(CC) $(INCLUDES) $(CFLAGS) -M $$i; \ + done > .depend + +clean: + /bin/rm -f *.o $(EXECS) core* .depend *.a *.la *.lo + /bin/rm -rf .libs + +sg_dd: sg_dd.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o sg_io_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_scan: sg_scan.o sg_io_linux.o sg_lib.o + $(LD) -o $@ $(LDFLAGS) $^ + +sginfo: sginfo.o sg_io_linux.o sg_lib.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_start: sg_start.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_rbuf: sg_rbuf.o sg_lib.o sg_io_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_readcap: sg_readcap.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sgp_dd.o: sgp_dd.c + $(CC) $(INCLUDES) $(CFLAGS) $(CFLAGS_PTHREADS) -c $< + +sgp_dd: sgp_dd.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o sg_io_linux.o + $(LD) -o $@ $(LDFLAGS) $^ -lpthread + +sgm_dd: sgm_dd.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o sg_io_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_map: sg_map.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o sg_io_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_turs: sg_turs.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_test_rwbuf: sg_test_rwbuf.o sg_lib.o sg_io_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_inq: sg_inq.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_read: sg_read.o sg_lib.o sg_io_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_reset: sg_reset.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_modes: sg_modes.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_logs: sg_logs.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_senddiag: sg_senddiag.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_opcodes: sg_opcodes.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_persist: sg_persist.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_write_long: sg_write_long.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_read_long: sg_read_long.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_requests: sg_requests.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_ses: sg_ses.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_verify: sg_verify.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_emc_trespass: sg_emc_trespass.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_luns: sg_luns.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_sync: sg_sync.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_prevent: sg_prevent.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_get_config: sg_get_config.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_wr_mode: sg_wr_mode.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_rtpg: sg_rtpg.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_reassign: sg_reassign.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_format: sg_format.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_rmsn: sg_rmsn.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_ident: sg_ident.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_map26: sg_map26.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_rdac: sg_rdac.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_vpd: sg_vpd.o sg_vpd_vendor.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_sat_identify: sg_sat_identify.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_read_buffer: sg_read_buffer.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_write_buffer: sg_write_buffer.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_raw: sg_raw.o sg_lib.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +install: $(EXECS) + install -d $(INSTDIR) + for name in $^; \ + do install -s -o root -g root -m 755 $$name $(INSTDIR); \ + done + install -d $(MANDIR)/$(MAN_PREF) + for mp in $(MAN_PGS); \ + do install -o root -g root -m 644 $$mp $(MANDIR)/$(MAN_PREF); \ + gzip -9f $(MANDIR)/$(MAN_PREF)/$$mp; \ + done + +uninstall: + dists="$(EXECS)"; \ + for name in $$dists; do \ + rm -f $(INSTDIR)/$$name; \ + done + for mp in $(MAN_PGS); do \ + rm -f $(MANDIR)/$(MAN_PREF)/$$mp.gz; \ + done + +ifeq (.depend,$(wildcard .depend)) +include .depend +endif diff --git a/archive/pre_configure/no_lib/Makefile.linux_static b/archive/pre_configure/no_lib/Makefile.linux_static new file mode 100644 index 00000000..12ad5172 --- /dev/null +++ b/archive/pre_configure/no_lib/Makefile.linux_static @@ -0,0 +1,207 @@ +SHELL = /bin/sh + +PREFIX=/usr/local +INSTDIR=$(DESTDIR)/$(PREFIX)/bin +MANDIR=$(DESTDIR)/$(PREFIX)/share/man + +ifndef CC +CC = gcc +endif +LD = $(CC) + +EXECS = sg_dd sgp_dd sgm_dd sg_read sg_map sg_scan sg_rbuf \ + sginfo sg_readcap sg_turs sg_inq sg_test_rwbuf \ + sg_start sg_reset sg_modes sg_logs sg_senddiag sg_opcodes \ + sg_persist sg_write_long sg_read_long sg_requests sg_ses \ + sg_verify sg_emc_trespass sg_luns sg_sync sg_prevent \ + sg_get_config sg_wr_mode sg_rtpg sg_reassign sg_format \ + sg_rmsn sg_ident sg_map26 sg_rdac sg_vpd sg_sat_identify \ + sg_read_buffer sg_write_buffer sg_raw + +MAN_PGS = sg_dd.8 sgp_dd.8 sgm_dd.8 sg_read.8 sg_map.8 sg_scan.8 sg_rbuf.8 \ + sginfo.8 sg_readcap.8 sg_turs.8 sg_inq.8 sg_test_rwbuf.8 \ + sg_start.8 sg_reset.8 sg_modes.8 sg_logs.8 sg_senddiag.8 \ + sg_opcodes.8 sg_persist.8 sg_write_long.8 sg_read_long.8 \ + sg_requests.8 sg_ses.8 sg_verify.8 sg_emc_trespass.8 \ + sg_luns.8 sg_sync.8 sg_prevent.8 sg_get_config.8 sg_wr_mode.8 \ + sg_rtpg.8 sg_reassign.8 sg_format.8 sg_rmsn.8 sg_ident.8 \ + sg_map26.8 sg_rdac.8 sg_vpd.8 sg3_utils.8 sg_sat_identify.8 \ + sg_read_buffer.8 sg_write_buffer.8 sg_raw.8 +MAN_PREF = man8 + +OS_FLAGS = -DSG3_UTILS_LINUX +### LARGE_FILE_FLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +EXTRA_FLAGS = $(OS_FLAGS) $(LARGE_FILE_FLAGS) + +# CFLAGS = -O2 -Wall -W $(EXTRA_FLAGS) +CFLAGS = -g -O2 -Wall -W $(EXTRA_FLAGS) +# CFLAGS = -g -O2 -W -DSG_KERNEL_INCLUDES $(EXTRA_FLAGS) +# CFLAGS = -g -O2 -Wall -W -pedantic -std=c99 $(EXTRA_FLAGS) + +CFLAGS_PTHREADS = -D_REENTRANT + +LDFLAGS = -static +# LDFLAGS = -v -lm + +all: $(EXECS) + +depend dep: + for i in *.c; do $(CC) $(INCLUDES) $(CFLAGS) -M $$i; \ + done > .depend + +clean: + /bin/rm -f *.o $(EXECS) core* .depend *.a *.la *.lo + /bin/rm -rf .libs + +sg_dd: sg_dd.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o sg_io_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_scan: sg_scan.o sg_io_linux.o sg_lib.o + $(LD) -o $@ $(LDFLAGS) $^ + +sginfo: sginfo.o sg_io_linux.o sg_lib.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_start: sg_start.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_rbuf: sg_rbuf.o sg_lib.o sg_io_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_readcap: sg_readcap.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sgp_dd.o: sgp_dd.c + $(CC) $(INCLUDES) $(CFLAGS) $(CFLAGS_PTHREADS) -c $< + +sgp_dd: sgp_dd.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o sg_io_linux.o + $(LD) -o $@ $(LDFLAGS) $^ -lpthread + +sgm_dd: sgm_dd.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o sg_io_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_map: sg_map.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o sg_io_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_turs: sg_turs.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_test_rwbuf: sg_test_rwbuf.o sg_lib.o sg_io_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_inq: sg_inq.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_read: sg_read.o sg_lib.o sg_io_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_reset: sg_reset.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_modes: sg_modes.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_logs: sg_logs.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_senddiag: sg_senddiag.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_opcodes: sg_opcodes.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_persist: sg_persist.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_write_long: sg_write_long.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_read_long: sg_read_long.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_requests: sg_requests.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_ses: sg_ses.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_verify: sg_verify.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_emc_trespass: sg_emc_trespass.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_luns: sg_luns.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_sync: sg_sync.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_prevent: sg_prevent.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_get_config: sg_get_config.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_wr_mode: sg_wr_mode.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_rtpg: sg_rtpg.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_reassign: sg_reassign.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_format: sg_format.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_rmsn: sg_rmsn.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_ident: sg_ident.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_map26: sg_map26.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_rdac: sg_rdac.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_vpd: sg_vpd.o sg_vpd_vendor.o sg_lib.o sg_cmds_basic.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_sat_identify: sg_sat_identify.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_read_buffer: sg_read_buffer.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_write_buffer: sg_write_buffer.o sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +sg_raw: sg_raw.o sg_lib.o sg_pt_linux.o + $(LD) -o $@ $(LDFLAGS) $^ + +install: $(EXECS) + install -d $(INSTDIR) + for name in $^; \ + do install -s -o root -g root -m 755 $$name $(INSTDIR); \ + done + install -d $(MANDIR)/$(MAN_PREF) + for mp in $(MAN_PGS); \ + do install -o root -g root -m 644 $$mp $(MANDIR)/$(MAN_PREF); \ + gzip -9f $(MANDIR)/$(MAN_PREF)/$$mp; \ + done + +uninstall: + dists="$(EXECS)"; \ + for name in $$dists; do \ + rm -f $(INSTDIR)/$$name; \ + done + for mp in $(MAN_PGS); do \ + rm -f $(MANDIR)/$(MAN_PREF)/$$mp.gz; \ + done + +ifeq (.depend,$(wildcard .depend)) +include .depend +endif diff --git a/archive/pre_configure/no_lib/Makefile.osf1 b/archive/pre_configure/no_lib/Makefile.osf1 new file mode 100644 index 00000000..9fdeeb33 --- /dev/null +++ b/archive/pre_configure/no_lib/Makefile.osf1 @@ -0,0 +1,167 @@ +SHELL = /bin/sh + +PREFIX=/usr/local +INSTDIR=$(DESTDIR)/$(PREFIX)/bin +MANDIR=$(DESTDIR)/$(PREFIX)/man + +CC = cc +LD = cc + +EXECS = sg_readcap sg_turs sg_inq sg_start sg_modes sg_logs sg_senddiag \ + sg_persist sg_requests sg_ses sg_luns \ + sg_sync sg_prevent sg_get_config sg_wr_mode \ + sg_rtpg sg_reassign sg_format sg_rmsn sg_ident \ + sg_read_long sg_write_long sg_verify sg_rdac sg_vpd \ + sg_sat_identify sg_read_buffer sg_write_buffer sg_opcodes \ + sg_raw + +MAN_PGS = sg_readcap.8 sg_turs.8 sg_inq.8 sg_start.8 sg_modes.8 sg_logs.8 \ + sg_senddiag.8 sg_persist.8 sg_requests.8 sg_ses.8 sg_luns.8 \ + sg_sync.8 sg_prevent.8 sg_get_config.8 sg_wr_mode.8 \ + sg_rtpg.8 sg_reassign.8 sg_format.8 sg_rmsn.8 sg_ident.8 \ + sg_read_long.8 sg_write_long.8 sg_verify.8 sg_rdac.8 sg_vpd.8 \ + sg3_utils.8 sg_sat_identify.8 sg_read_buffer.8 sg_write_buffer.8 \ + sg_opcodes.8 sg_raw.8 + +MAN_PREF = man8 + +OS_FLAGS = -DSG3_UTILS_OSF1 +LARGE_FILE_FLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +S_CFLAGS = $(OS_FLAGS) $(LARGE_FILE_FLAGS) + +# CFLAGS = -O2 -Wall -W $(S_CFLAGS) +CFLAGS = -g -I./getopt_long $(S_CFLAGS) +# CFLAGS = -g -O2 -Wall -W -pedantic -std=c99 $(S_CFLAGS) + +O_FILES = sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_osf1.o +O_BFILES = sg_lib.o sg_cmds_basic.o sg_pt_osf1.o +O_RFILES = sg_lib.o sg_pt_osf1.o +O_GETOPT_LONG = getopt_long/getopt_long.o + +LDFLAGS = +# LDFLAGS = -v -lm + +all: $(EXECS) + +depend dep: + for i in *.c; do $(CC) $(INCLUDES) $(CFLAGS) -M $$i; \ + done > .depend + +clean: + /bin/rm -f *.o $(EXECS) core* .depend *.a *.la *.lo + /bin/rm -f $(O_GETOPT_LONG) + /bin/rm -rf .libs + +.c.o: + $(CC) $(CFLAGS) -c -o $@ $< + +sg_readcap: sg_readcap.o $(O_BFILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) $(O_GETOPT_LONG) + +sg_turs: sg_turs.o $(O_BFILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) $(O_GETOPT_LONG) + +sg_inq: sg_inq.o $(O_BFILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) $(O_GETOPT_LONG) + +sg_start: sg_start.o $(O_BFILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) $(O_GETOPT_LONG) + +sg_modes: sg_modes.o $(O_BFILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) $(O_GETOPT_LONG) + +sg_logs: sg_logs.o $(O_BFILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) $(O_GETOPT_LONG) + +sg_senddiag: sg_senddiag.o $(O_FILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) $(O_GETOPT_LONG) + +sg_persist: sg_persist.o $(O_FILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) $(O_GETOPT_LONG) + +sg_requests: sg_requests.o $(O_BFILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) $(O_GETOPT_LONG) + +sg_ses: sg_ses.o $(O_FILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) $(O_GETOPT_LONG) + +sg_luns: sg_luns.o $(O_BFILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) $(O_GETOPT_LONG) + +sg_sync: sg_sync.o $(O_BFILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) $(O_GETOPT_LONG) + +sg_prevent: sg_prevent.o $(O_BFILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) $(O_GETOPT_LONG) + +sg_get_config: sg_get_config.o $(O_FILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) $(O_GETOPT_LONG) + +sg_wr_mode: sg_wr_mode.o $(O_BFILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) $(O_GETOPT_LONG) + +sg_rtpg: sg_rtpg.o $(O_FILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) $(O_GETOPT_LONG) + +sg_reassign: sg_reassign.o $(O_FILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) $(O_GETOPT_LONG) + +sg_format: sg_format.o $(O_FILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) $(O_GETOPT_LONG) + +sg_rmsn: sg_rmsn.o $(O_FILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) $(O_GETOPT_LONG) + +sg_ident: sg_ident.o $(O_FILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) $(O_GETOPT_LONG) + +sg_read_long: sg_read_long.o $(O_FILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) $(O_GETOPT_LONG) + +sg_write_long: sg_write_long.o $(O_FILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) $(O_GETOPT_LONG) + +sg_verify: sg_verify.o $(O_FILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) $(O_GETOPT_LONG) + +sg_rdac: sg_rdac.o $(O_BFILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) $(O_GETOPT_LONG) + +sg_vpd: sg_vpd.o sg_vpd_vendor.o $(O_BFILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o sg_vpd_vendor.o $(O_BFILES) $(O_GETOPT_LONG) + +sg_sat_identify: sg_sat_identify.o $(O_FILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) $(O_GETOPT_LONG) + +sg_read_buffer: sg_read_buffer.o $(O_FILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) $(O_GETOPT_LONG) + +sg_write_buffer: sg_write_buffer.o $(O_FILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) $(O_GETOPT_LONG) + +sg_opcodes: sg_opcodes.o $(O_BFILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) $(O_GETOPT_LONG) + +sg_raw: sg_raw.o $(O_RFILES) $(O_GETOPT_LONG) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_RFILES) $(O_GETOPT_LONG) + +install: $(EXECS) + test -d $(INSTDIR) || mkdir -p $(INSTDIR) + for name in $(EXECS); \ + do installbsd -c -s -m 755 $$name $(INSTDIR); \ + done + test -d $(MANDIR)/$(MAN_PREF) || mkdir -p $(MANDIR)/$(MAN_PREF) + for mp in $(MAN_PGS); \ + do installbsd -c -m 644 $$mp $(MANDIR)/$(MAN_PREF); \ + gzip -9f $(MANDIR)/$(MAN_PREF)/$$mp; \ + done + +uninstall: + dists="$(EXECS)"; \ + for name in $$dists; do \ + rm -f $(INSTDIR)/$$name; \ + done + for mp in $(MAN_PGS); do \ + rm -f $(MANDIR)/$(MAN_PREF)/$$mp.gz; \ + done + diff --git a/archive/pre_configure/no_lib/Makefile.solaris b/archive/pre_configure/no_lib/Makefile.solaris new file mode 100644 index 00000000..089617ed --- /dev/null +++ b/archive/pre_configure/no_lib/Makefile.solaris @@ -0,0 +1,161 @@ +SHELL = /bin/sh + +PREFIX=/usr/local +INSTDIR=$(DESTDIR)/$(PREFIX)/bin +MANDIR=$(DESTDIR)/$(PREFIX)/man + +CC = gcc +LD = gcc + +EXECS = sg_readcap sg_turs sg_inq sg_start sg_modes sg_logs sg_senddiag \ + sg_persist sg_requests sg_ses sg_luns \ + sg_sync sg_prevent sg_get_config sg_wr_mode \ + sg_rtpg sg_reassign sg_format sg_rmsn sg_ident \ + sg_read_long sg_write_long sg_verify sg_rdac sg_vpd \ + sg_sat_identify sg_read_buffer sg_write_buffer sg_opcodes \ + sg_raw + +MAN_PGS = sg_readcap.8 sg_turs.8 sg_inq.8 sg_start.8 sg_modes.8 sg_logs.8 \ + sg_senddiag.8 sg_persist.8 sg_requests.8 sg_ses.8 sg_luns.8 \ + sg_sync.8 sg_prevent.8 sg_get_config.8 sg_wr_mode.8 \ + sg_rtpg.8 sg_reassign.8 sg_format.8 sg_rmsn.8 sg_ident.8 \ + sg_read_long.8 sg_write_long.8 sg_verify.8 sg_rdac.8 sg_vpd.8 \ + sg3_utils.8 sg_sat_identify.8 sg_read_buffer.8 sg_write_buffer.8 \ + sg_opcodes.8 sg_raw.8 + +MAN_PREF = man8 + +OS_FLAGS = -DSG3_UTILS_SOLARIS +LARGE_FILE_FLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +EXTRA_FLAGS = $(OS_FLAGS) $(LARGE_FILE_FLAGS) + +# CFLAGS = -O2 -Wall -W $(EXTRA_FLAGS) +CFLAGS = -g -O2 -Wall -W $(EXTRA_FLAGS) +# CFLAGS = -g -O2 -Wall -W -pedantic -std=c99 $(EXTRA_FLAGS) + +O_FILES = sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_solaris.o +O_BFILES = sg_lib.o sg_cmds_basic.o sg_pt_solaris.o +O_RFILES = sg_lib.o sg_pt_solaris.o + +# LDFLAGS = -lcam +# LDFLAGS = -v -lm + +all: $(EXECS) + +depend dep: + for i in *.c; do $(CC) $(INCLUDES) $(CFLAGS) -M $$i; \ + done > .depend + +clean: + /bin/rm -f *.o $(EXECS) core* .depend *.a *.la *.lo + /bin/rm -rf .libs + +sg_readcap: sg_readcap.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_turs: sg_turs.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_inq: sg_inq.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_start: sg_start.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_modes: sg_modes.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_logs: sg_logs.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_senddiag: sg_senddiag.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_persist: sg_persist.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_requests: sg_requests.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_ses: sg_ses.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_luns: sg_luns.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_sync: sg_sync.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_prevent: sg_prevent.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_get_config: sg_get_config.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_wr_mode: sg_wr_mode.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_rtpg: sg_rtpg.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_reassign: sg_reassign.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_format: sg_format.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_rmsn: sg_rmsn.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_ident: sg_ident.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_read_long: sg_read_long.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_write_long: sg_write_long.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_verify: sg_verify.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_rdac: sg_rdac.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_vpd: sg_vpd.o sg_vpd_vendor.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o sg_vpd_vendor.o $(O_BFILES) + +sg_sat_identify: sg_sat_identify.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_read_buffer: sg_read_buffer.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_write_buffer: sg_write_buffer.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_opcodes: sg_opcodes.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_raw: sg_raw.o $(O_RFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_RFILES) + +install: $(EXECS) + install -d $(INSTDIR) + for name in $(EXECS); \ + do install -s -f $(INSTDIR) $$name; \ + done + install -d $(MANDIR)/$(MAN_PREF) + for mp in $(MAN_PGS); \ + do install -s -m 644 -f $(MANDIR)/$(MAN_PREF) $$mp; \ + done + +uninstall: + dists="$(EXECS)"; \ + for name in $$dists; do \ + rm -f $(INSTDIR)/$$name; \ + done + for mp in $(MAN_PGS); do \ + rm -f $(MANDIR)/$(MAN_PREF)/$$mp; \ + done + diff --git a/archive/pre_configure/no_lib/Makefile.win32 b/archive/pre_configure/no_lib/Makefile.win32 new file mode 100644 index 00000000..9a621422 --- /dev/null +++ b/archive/pre_configure/no_lib/Makefile.win32 @@ -0,0 +1,171 @@ +SHELL = /bin/sh + +PREFIX=/usr/local +INSTDIR=$(PREFIX)/bin +MANDIR=$(PREFIX)/man + +CC = gcc +LD = gcc + +EXECS = sg_readcap sg_turs sg_inq sg_start sg_modes sg_logs sg_senddiag \ + sg_persist sg_requests sg_ses sg_luns sg_scan \ + sg_sync sg_prevent sg_get_config sg_wr_mode \ + sg_rtpg sg_reassign sg_format sg_rmsn sg_ident \ + sg_read_long sg_write_long sg_verify sg_rdac sg_vpd \ + sg_sat_identify sg_read_buffer sg_write_buffer sg_opcodes \ + sg_raw + +MAN_PGS = sg_readcap.8 sg_turs.8 sg_inq.8 sg_start.8 sg_modes.8 sg_logs.8 \ + sg_senddiag.8 sg_persist.8 sg_requests.8 sg_ses.8 sg_luns.8 \ + sg_scan.8 sg_sync.8 sg_prevent.8 sg_get_config.8 sg_wr_mode.8 \ + sg_rtpg.8 sg_reassign.8 sg_format.8 sg_rmsn.8 sg_ident.8 \ + sg_read_long.8 sg_write_long.8 sg_verify.8 sg_rdac.8 sg_vpd.8 \ + sg3_utils.8 sg_sat_identify.8 sg_read_buffer.8 sg_write_buffer.8 \ + sg_opcodes.8 sg_raw.8 + +MAN_PREF = man8 + +OS_FLAGS = -DSG3_UTILS_WIN32 -DSPTD +# OS_FLAGS = -DSG3_UTILS_WIN32 +LARGE_FILE_FLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +EXTRA_FLAGS = $(OS_FLAGS) $(LARGE_FILE_FLAGS) + +# CFLAGS = -O2 -Wall -W $(EXTRA_FLAGS) +CFLAGS = -g -O2 -Wall -W $(EXTRA_FLAGS) +# CFLAGS = -g -O2 -Wall -W -pedantic -std=c99 $(EXTRA_FLAGS) + +O_FILES = sg_lib.o sg_cmds_basic.o sg_cmds_extra.o sg_pt_win32.o +O_BFILES = sg_lib.o sg_cmds_basic.o sg_pt_win32.o +O_RFILES = sg_lib.o sg_pt_win32.o +O_SFILES = sg_lib.o + +LDFLAGS = -static + +all: $(EXECS) + cp sg_scan.8w sg_scan.8 + +depend dep: + for i in *.c; do $(CC) $(INCLUDES) $(CFLAGS) -M $$i; \ + done > .depend + +clean: + /bin/rm -f *.o $(EXECS) core* .depend *.a *.la *.lo + /bin/rm -rf .libs + +.c.o: + $(CC) $(INCLUDES) $(CFLAGS) $(S_CFLAGS) -c -o $@ $< + +sg_readcap: sg_readcap.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_turs: sg_turs.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_inq: sg_inq.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_start: sg_start.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_modes: sg_modes.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_logs: sg_logs.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_senddiag: sg_senddiag.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_persist: sg_persist.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_requests: sg_requests.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_ses: sg_ses.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_luns: sg_luns.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_scan: sg_scan.o $(O_SFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_SFILES) + +sg_sync: sg_sync.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_prevent: sg_prevent.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_get_config: sg_get_config.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_wr_mode: sg_wr_mode.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_rtpg: sg_rtpg.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_reassign: sg_reassign.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_format: sg_format.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_rmsn: sg_rmsn.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_ident: sg_ident.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_read_long: sg_read_long.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_write_long: sg_write_long.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_verify: sg_verify.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_rdac: sg_rdac.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_vpd: sg_vpd.o sg_vpd_vendor.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o sg_vpd_vendor.o $(O_BFILES) + +sg_sat_identify: sg_sat_identify.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_read_buffer: sg_read_buffer.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_write_buffer: sg_write_buffer.o $(O_FILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_FILES) + +sg_opcodes: sg_opcodes.o $(O_BFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_BFILES) + +sg_raw: sg_raw.o $(O_RFILES) + $(LD) -o $@ $(LDFLAGS) $@.o $(O_RFILES) + +install: $(EXECS) + cp sg_scan.8w sg_scan.8 + install -d $(INSTDIR) + for name in $(EXECS); \ + do install -s -m 755 $$name $(INSTDIR); \ + done + install -d $(MANDIR)/$(MAN_PREF) + for mp in $(MAN_PGS); \ + do install -m 644 $$mp $(MANDIR)/$(MAN_PREF); \ + gzip -9f $(MANDIR)/$(MAN_PREF)/$$mp; \ + done + +uninstall: + dists="$(EXECS)"; \ + for name in $$dists; do \ + rm -f $(INSTDIR)/$$name; \ + done + for mp in $(MAN_PGS); do \ + rm -f $(MANDIR)/$(MAN_PREF)/$$mp.gz; \ + done + diff --git a/archive/pre_configure/no_lib/sg3_utils.spec b/archive/pre_configure/no_lib/sg3_utils.spec new file mode 100644 index 00000000..58ceba0b --- /dev/null +++ b/archive/pre_configure/no_lib/sg3_utils.spec @@ -0,0 +1,282 @@ +Summary: Utilities for devices that use SCSI command sets +Name: sg3_utils +Version: 1.25 +Release: 1 +Packager: Douglas Gilbert <dgilbert at interlog dot com> +License: GPL/FreeBSD +Group: Utilities/System +Source: ftp://www.torque.net/sg/p/sg3_utils-%{version}.tgz +Url: http://www.torque.net/sg/sg3_utils.html +Provides: sg_utils +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root/ + +%description +Collection of Linux utilities for devices that use the SCSI command set. +Includes utilities to copy data based on "dd" syntax and semantics (called +sg_dd, sgp_dd and sgm_dd); check INQUIRY data and VPD pages (sg_inq); check +mode and log pages (sginfo, sg_modes and sg_logs); spin up and down +disks (sg_start); do self tests (sg_senddiag); and various other functions. +See the README, CHANGELOG and COVERAGE files. Requires the linux kernel 2.4 +series or later. In the 2.4 series SCSI generic device names (e.g. /dev/sg0) +must be used. In the 2.6 series other device names may be used as +well (e.g. /dev/sda). + +Warning: Some of these tools access the internals of your system and their +incorrect usage may render your system inoperable. + +Authors: +-------- + Doug Gilbert <dgilbert at interlog dot com> + See CREDITS file + +%prep +%setup + +%build +make + +%install +if [ "$RPM_BUILD_ROOT" != "/" ]; then + rm -rf $RPM_BUILD_ROOT +fi +make install INSTDIR=$RPM_BUILD_ROOT/usr/bin MANDIR=$RPM_BUILD_ROOT/usr/share/man + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%attr(-,root,root) %doc CREDITS README README.sg_start +%attr(-,root,root) %doc CHANGELOG INSTALL COVERAGE COPYING +%attr(755,root,root) %{_bindir}/sg_dd +%attr(755,root,root) %{_bindir}/sg_inq +%attr(755,root,root) %{_bindir}/sg_scan +%attr(755,root,root) %{_bindir}/sg_rbuf +%attr(755,root,root) %{_bindir}/sginfo +%attr(755,root,root) %{_bindir}/sg_readcap +%attr(755,root,root) %{_bindir}/sgp_dd +%attr(755,root,root) %{_bindir}/sg_map +%attr(755,root,root) %{_bindir}/sg_turs +%attr(755,root,root) %{_bindir}/sg_test_rwbuf +%attr(755,root,root) %{_bindir}/sg_start +%attr(755,root,root) %{_bindir}/sgm_dd +%attr(755,root,root) %{_bindir}/sg_read +%attr(755,root,root) %{_bindir}/sg_reset +%attr(755,root,root) %{_bindir}/sg_modes +%attr(755,root,root) %{_bindir}/sg_logs +%attr(755,root,root) %{_bindir}/sg_senddiag +%attr(755,root,root) %{_bindir}/sg_opcodes +%attr(755,root,root) %{_bindir}/sg_persist +%attr(755,root,root) %{_bindir}/sg_write_long +%attr(755,root,root) %{_bindir}/sg_read_long +%attr(755,root,root) %{_bindir}/sg_requests +%attr(755,root,root) %{_bindir}/sg_ses +%attr(755,root,root) %{_bindir}/sg_verify +%attr(755,root,root) %{_bindir}/sg_emc_trespass +%attr(755,root,root) %{_bindir}/sg_luns +%attr(755,root,root) %{_bindir}/sg_sync +%attr(755,root,root) %{_bindir}/sg_prevent +%attr(755,root,root) %{_bindir}/sg_get_config +%attr(755,root,root) %{_bindir}/sg_wr_mode +%attr(755,root,root) %{_bindir}/sg_rtpg +%attr(755,root,root) %{_bindir}/sg_reassign +%attr(755,root,root) %{_bindir}/sg_format +%attr(755,root,root) %{_bindir}/sg_rmsn +%attr(755,root,root) %{_bindir}/sg_ident +%attr(755,root,root) %{_bindir}/sg_map26 +%attr(755,root,root) %{_bindir}/sg_vpd +%attr(755,root,root) %{_bindir}/sg_rdac +%attr(755,root,root) %{_bindir}/sg_sat_identify +%attr(755,root,root) %{_bindir}/sg_read_buffer +%attr(755,root,root) %{_bindir}/sg_write_buffer +%attr(755,root,root) %{_bindir}/sg_raw +# Mandrake compresses man pages with bzip2, RedHat with gzip +%attr(-,root,root) %doc %{_mandir}/man8/sg_dd.8* +%attr(-,root,root) %doc %{_mandir}/man8/sgp_dd.8* +%attr(-,root,root) %doc %{_mandir}/man8/sgm_dd.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_read.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_map.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_scan.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_rbuf.8* +%attr(-,root,root) %doc %{_mandir}/man8/sginfo.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_readcap.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_turs.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_inq.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_test_rwbuf.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_start.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_reset.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_modes.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_logs.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_senddiag.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_opcodes.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_persist.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_write_long.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_read_long.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_requests.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_ses.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_verify.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_emc_trespass.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_luns.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_sync.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_prevent.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_get_config.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_wr_mode.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_rtpg.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_reassign.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_format.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_rmsn.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_ident.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_map26.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_vpd.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_rdac.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_sat_identify.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_read_buffer.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_write_buffer.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg_raw.8* +%attr(-,root,root) %doc %{_mandir}/man8/sg3_utils.8* + + +%changelog +* Wed Jul 11 2007 - dgilbert at interlog dot com +- sg_dd oflag=sparse,null + * sg3_utils-1.25 + +* Mon May 07 2007 - dgilbert at interlog dot com +- add sg_raw; sg_rtpg, sg_log, sg_inq and sg_format updates + * sg3_utils-1.24 + +* Wed Jan 31 2007 - dgilbert at interlog dot com +- add sg_read_buffer + sg_write_buffer + * sg3_utils-1.23 + +* Mon Oct 16 2006 - dgilbert at interlog dot com +- add sg_sat_identify, expand sg_format and sg_requests + * sg3_utils-1.22 + +* Thu Jul 06 2006 - dgilbert at interlog dot com +- add sg_vpd and sg_rdac, uniform exit statuses + * sg3_utils-1.21 + +* Tue Apr 18 2006 - dgilbert at interlog dot com +- sg_logs: sas port specific page decoding, sg*_dd updates + * sg3_utils-1.20 + +* Fri Jan 27 2006 - dgilbert at interlog dot com +- sg_get_config: resync features with mmc5 rev 1 + * sg3_utils-1.19 + +* Fri Nov 18 2005 - dgilbert at interlog dot com +- add sg_map26, sg_inq: '-rr' option to play with hdparm + * sg3_utils-1.18 + +* Thu Sep 22 2005 - dgilbert at interlog dot com +- add ATA information VPD page + * sg3_utils-1.17 + +* Wed Aug 10 2005 - dgilbert at interlog dot com +- add sg_ident, sg_inq VPD page extensions + * sg3_utils-1.16 + +* Sun Jun 05 2005 - dgilbert at interlog dot com +- use O_NONBLOCK on all fds that use SG_IO iotcl + * sg3_utils-1.15 + +* Fri May 06 2005 - dgilbert at interlog dot com +- add sg_rmsn; sg_ses update to SES-2 rev 11 + * sg3_utils-1.14 + +* Sun Mar 13 2005 - dgilbert at interlog dot com +- add sg_format, sg_dd extensions + * sg3_utils-1.13 + +* Fri Jan 21 2005 - dgilbert at interlog dot com +- add sg_wr_mode, sg_rtpg + sg_reassign; sginfo sas tweaks + * sg3_utils-1.12 + +* Fri Nov 26 2004 - dgilbert at interlog dot com +- add sg_sync, sg_prevent and sg_get_config; fix sg_requests + * sg3_utils-1.11 + +* Tue Oct 26 2004 - dgilbert at interlog dot com +- read_capacity (10+16) fix, add sg_luns + * sg3_utils-1.10 + +* Thu Oct 21 2004 - dgilbert at interlog dot com +- sg_requests, sg_ses, sg_verify, sg_err->sg_lib + * sg3_utils-1.09 + +* Tue Aug 31 2004 - dgilbert at interlog dot com +- 'register+move' in sg_persist, sg_opcodes sorts, sg_write_long + * sg3_utils-1.08 + +* Thu Jul 08 2004 - dgilbert at interlog dot com +- add '-fHead' to sginfo, '-i' for sg_inq, new sg_opcodes + sg_persist + * sg3_utils-1.07 + +* Mon Apr 26 2004 - dgilbert at interlog dot com +- sg3_utils.spec for mandrake; more sginfo work, sg_scan, sg_logs + * sg3_utils-1.06 + +* Wed Nov 12 2003 - dgilbert at interlog dot com +- sg_readcap: sizes; sg_logs: double fetch; sg_map 256 sg devices; sginfo + * sg3_utils-1.05 + +* Tue May 13 2003 - dgilbert at interlog dot com +- default sg_turs '-n=' to 1, sg_logs gets '-t' for temperature, CREDITS + * sg3_utils-1.04 + +* Wed Apr 02 2003 - dgilbert at interlog dot com +- 6 byte CDBs for sg_modes, sg_start on block devs, sg_senddiag, man pages + * sg3_utils-1.03 + +* Wed Jan 01 2003 - dgilbert at interlog dot com +- interwork with block SG_IO, fix in sginfo, '-t' for sg_turs + * sg3_utils-1.02 + +* Wed Aug 14 2002 - dgilbert at interlog dot com +- raw switch in sg_inq + * sg3_utils-1.01 + +* Sun Jul 28 2002 - dgilbert at interlog dot com +- decode sg_logs pages, add dio to sgm_dd, drop "gen=1" arg, "of=/dev/null" + * sg3_utils-1.00 + +* Sun Mar 17 2002 - dgilbert at interlog dot com +- add sg_modes+sg_logs for sense pages, expand sg_inq, add fua+sync to sg_dd++ + * sg3_utils-0.99 + +* Sat Feb 16 2002 - dgilbert at interlog dot com +- resurrect sg_reset; snprintf cleanup, time,gen+cdbsz args to sg_dd++ + * sg3_utils-0.98 + +* Sun Dec 23 2001 - dgilbert at interlog dot com +- move isosize to archive directory; now found in util-linux-2.10s and later + * sg3_utils-0.97 + +* Fri Dec 21 2001 - dgilbert at interlog dot com +- add sgm_dd, sg_read, sg_simple4 and sg_simple16 [add mmap-ed IO support] + * sg3_utils-0.96 + +* Sun Sep 15 2001 - dgilbert at interlog dot com +- sg_map can do inquiry; sg_dd, sgp_dd + sgq_dd dio help + * sg3_utils-0.95 + +* Sun Apr 19 2001 - dgilbert at interlog dot com +- add sg_start, improve sginfo and sg_map [Kurt Garloff] + * sg3_utils-0.94 + +* Sun Mar 5 2001 - dgilbert at interlog dot com +- add scsi_devfs_scan, add sg_include.h, 'coe' more general in sgp_dd + * sg3_utils-0.93 + +* Tue Jan 16 2001 - dgilbert at interlog dot com +- clean sg_err.h include dependencies, bug fixes, Makefile in archive directory + * sg3_utils-0.92 + +* Mon Dec 21 2000 - dgilbert at interlog dot com +- signals for sg_dd, man pages and additions for sg_rbuf and isosize + * sg3_utils-0.91 + +* Mon Dec 11 2000 - dgilbert at interlog dot com +- Initial version of package + * sg3_utils-0.90 diff --git a/archive/pre_configure/sg3_utils.spec_shared b/archive/pre_configure/sg3_utils.spec_shared new file mode 100644 index 00000000..150b6b61 --- /dev/null +++ b/archive/pre_configure/sg3_utils.spec_shared @@ -0,0 +1,184 @@ +Summary: Utilities for devices that use SCSI command sets +Name: sg3_utils +Version: 1.25 +# Release: 1%{?dist} +Release: 1 +License: GPL +Group: Utilities/System +Source: ftp://www.torque.net/sg/p/sg3_utils-%{version}.tgz +Url: http://www.torque.net/sg/sg3_utils.html +Provides: sg_utils +BuildRequires: libtool +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Packager: Douglas Gilbert <dougg@torque.net> + +%description +Collection of Linux utilities for devices that use the SCSI command set. +Includes utilities to copy data based on "dd" syntax and semantics (called +sg_dd, sgp_dd and sgm_dd); check INQUIRY data and VPD pages (sg_inq); check +mode and log pages (sginfo, sg_modes and sg_logs); spin up and down +disks (sg_start); do self tests (sg_senddiag); and various other functions. +See the README, CHANGELOG and COVERAGE files. Requires the linux kernel 2.4 +series or later. In the 2.4 series SCSI generic device names (e.g. /dev/sg0) +must be used. In the 2.6 series other device names may be used as +well (e.g. /dev/sda). + +Warning: Some of these tools access the internals of your system +and the incorrect usage of them may render your system inoperable. + +%package libs +Summary: Shared library for %{name} +Group: System/Libraries + +%description libs +This package contains the shared library for %{name}. + +%package devel +Summary: Static library and header files for the sgutils library +Group: Development/C +Requires: %{name}-libs = %{version}-%{release} + +%description devel +This package contains the static %{name} library and its header files for +developing applications. + +%prep +%setup -q + +%build +make + +%install +if [ "$RPM_BUILD_ROOT" != "/" ]; then + rm -rf $RPM_BUILD_ROOT +fi +%ifarch sparc64 ppc64 s390x x86_64 +make install PREFIX=$RPM_BUILD_ROOT/usr LIBDIR=$RPM_BUILD_ROOT/usr/lib64 +%else +make install PREFIX=$RPM_BUILD_ROOT/usr +%endif + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%doc CHANGELOG COVERAGE CREDITS INSTALL README README.sg_start +%attr(755,root,root) %{_bindir}/* +%{_mandir}/man8/* + +%files libs +%defattr(-,root,root) +%{_libdir}/*.so.* + +%files devel +%defattr(-,root,root) +%{_includedir}/scsi/*.h +%{_libdir}/*.so +%{_libdir}/*.a +%{_libdir}/*.la + +%changelog +* Wed Jul 11 2007 - dgilbert at interlog dot com +- sg_dd oflag=sparse,null + * sg3_utils-1.25 + +* Mon May 07 2007 - dgilbert at interlog dot com +- add sg_raw; sg_rtpg, sg_log, sg_inq and sg_format updates + * sg3_utils-1.24 + +* Wed Jan 31 2007 - dgilbert at interlog dot com +- add sg_read_buffer + sg_write_buffer + * sg3_utils-1.23 + +* Mon Oct 16 2006 - dgilbert at interlog dot com +- add sg_sat_identify, expand sg_format and sg_requests + * sg3_utils-1.22 + +* Thu Jul 06 2006 - dgilbert at interlog dot com +- add sg_vpd and sg_rdac, uniform exit statuses + * sg3_utils-1.21 + +* Tue Apr 18 2006 - dgilbert at interlog dot com +- sg_logs: sas port specific page decoding, sg*_dd updates + * sg3_utils-1.20 + +* Fri Jan 27 2006 - dgilbert at interlog dot com +- sg_get_config: resync features with mmc5 rev 1 + * sg3_utils-1.19 + +* Fri Nov 18 2005 - dgilbert at interlog dot com +- add sg_map26; sg_inq '-rr' option to play with hdparm + * sg3_utils-1.18 + +* Thu Sep 22 2005 - dgilbert at interlog dot com +- add ATA information VPD page to sg_inq + * sg3_utils-1.17 + +* Wed Aug 10 2005 - dgilbert at interlog dot com +- add sg_ident, sg_inq VPD page extensions + * sg3_utils-1.16 + +* Sun Jun 05 2005 - dgilbert at interlog dot com +- use O_NONBLOCK on all fds that use SG_IO ioctl + * sg3_utils-1.15 + +* Fri May 06 2005 - dgilbert at interlog dot com +- produce libsgutils (+ -devel variant) as well as sg3_utils binary rpm + * sg3_utils-1.14 + +* Sun Mar 13 2005 - dgilbert at interlog dot com +- add sg_format, sg_dd extensions + * sg3_utils-1.13 + +* Fri Jan 21 2005 - dgilbert at interlog dot com +- add sg_wr_mode, sg_rtpg + sg_reassign; sginfo sas tweaks + * sg3_utils-1.12 + +* Fri Nov 26 2004 - dgilbert at interlog dot com +- add sg_sync, sg_prevent and sg_get_config; fix sg_requests + * sg3_utils-1.11 + +* Sat Oct 30 2004 - dgilbert at interlog dot com +- fix read capacity (10+16), add sg_luns + * sg3_utils-1.10 + +* Thu Oct 21 2004 - dgilbert at interlog dot com +- sg_requests, sg_ses, sg_verify, libsgutils(sg_lib.c+sg_cmds.c), devel rpm + * sg3_utils-1.09 + +* Tue Aug 31 2004 - dgilbert at interlog dot com +- 'register+move' in sg_persist, sg_opcodes sorts, sg_write_long + * sg3_utils-1.08 + +* Thu Jul 08 2004 - dgilbert at interlog dot com +- add '-fHead' to sginfo, '-i' for sg_inq, new sg_opcodes + sg_persist + * sg3_utils-1.07 + +* Mon Apr 26 2004 - dgilbert at interlog dot com +- sg3_utils.spec for mandrake; more sginfo work, sg_scan, sg_logs + * sg3_utils-1.06 + +* Wed Nov 12 2003 - dgilbert at interlog dot com +- sg_readcap: sizes; sg_logs: double fetch; sg_map 256 sg devices; sginfo + * sg3_utils-1.05 + +* Tue May 13 2003 - dgilbert at interlog dot com +- default sg_turs '-n=' to 1, sg_logs gets '-t' for temperature, CREDITS + * sg3_utils-1.04 + +* Wed Apr 02 2003 - dgilbert at interlog dot com +- 6 byte CDBs for sg_modes, sg_start on block devs, sg_senddiag, man pages + * sg3_utils-1.03 + +* Wed Jan 01 2003 - dgilbert at interlog dot com +- interwork with block SG_IO, fix in sginfo, '-t' for sg_turs + * sg3_utils-1.02 + +* Wed Aug 14 2002 - dgilbert at interlog dot com +- raw switch in sg_inq + * sg3_utils-1.01 + +* Sun Jul 28 2002 - dgilbert at interlog dot com +- decode sg_logs pages, add dio to sgm_dd, drop "gen=1" arg, "of=/dev/null" + * sg3_utils-1.00 |