"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "include/sg_cmds_basic.h" between
sdparm-1.11.tgz and sdparm-1.12.tgz

About: sdparm let you access SCSI modes pages, read VPD pages, send simple SCSI commands (similar functionality for SCSI disks like "hdparm" for ATA disks).

sg_cmds_basic.h  (sdparm-1.11.tgz):sg_cmds_basic.h  (sdparm-1.12.tgz)
#ifndef SG_CMDS_BASIC_H #ifndef SG_CMDS_BASIC_H
#define SG_CMDS_BASIC_H #define SG_CMDS_BASIC_H
/* /*
* Copyright (c) 2004-2019 Douglas Gilbert. * Copyright (c) 2004-2020 Douglas Gilbert.
* All rights reserved. * All rights reserved.
* Use of this source code is governed by a BSD-style * Use of this source code is governed by a BSD-style
* license that can be found in the BSD_LICENSE file. * license that can be found in the BSD_LICENSE file.
* *
* SPDX-License-Identifier: BSD-2-Clause * SPDX-License-Identifier: BSD-2-Clause
*/ */
/* /*
* Error, warning and verbose output is sent to the file pointed to by * Error, warning and verbose output is sent to the file pointed to by
* sg_warnings_strm which is declared in sg_lib.h and can be set with * sg_warnings_strm which is declared in sg_lib.h and can be set with
skipping to change at line 36 skipping to change at line 36
#include <stdbool.h> #include <stdbool.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* Functions with the "_pt" suffix take a pointer to an object (derived from) /* Functions with the "_pt" suffix take a pointer to an object (derived from)
* sg_pt_base rather than an open file descriptor as their first argument. * sg_pt_base rather than an open file descriptor as their first argument.
* That object is assumed to be constructed and have a device file descriptor * That object is assumed to be constructed and have a device file descriptor
* associated with it. clear_scsi_pt_obj() is called at the start of each * associated with it. clear_scsi_pt_obj() is called at the start of each
* "_pt" function. Caller is responsible for lifetime of ptp. */ * "_pt" function. Caller is responsible for lifetime of ptp.
* If the sense buffer is accessed outside the "_pt" function then the caller
* must invoke set_scsi_pt_sense() _prior_ to the "_pt" function. Otherwise
* a sense buffer local to "_pt" function is used.
* Usually the cdb pointer will be NULL going into the "_pt" functions but
* could be given by the caller in which case it will used rather than a
* locally generated one. */
struct sg_pt_base; struct sg_pt_base;
/* Invokes a SCSI INQUIRY command and yields the response /* Invokes a SCSI INQUIRY command and yields the response
* Returns 0 when successful, SG_LIB_CAT_INVALID_OP -> not supported, * Returns 0 when successful, SG_LIB_CAT_INVALID_OP -> not supported,
* SG_LIB_CAT_ILLEGAL_REQ -> bad field in cdb, * SG_LIB_CAT_ILLEGAL_REQ -> bad field in cdb,
* SG_LIB_CAT_ABORTED_COMMAND, a negated errno or -1 -> other errors */ * SG_LIB_CAT_ABORTED_COMMAND, a negated errno or -1 -> other errors */
int sg_ll_inquiry(int sg_fd, bool cmddt, bool evpd, int pg_op, void * resp, int sg_ll_inquiry(int sg_fd, bool cmddt, bool evpd, int pg_op, void * resp,
int mx_resp_len, bool noisy, int verbose); int mx_resp_len, bool noisy, int verbose);
 End of changes. 2 change blocks. 
2 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)