diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2022-06-27 18:26:54 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2022-06-27 18:26:54 +0000 |
commit | 30842a3103045e471ec8169f09135bb6766e5e1d (patch) | |
tree | a37d6d0bc773726fff04c163457d3bb22e6efa71 /src/sg_vpd_vendor.c | |
parent | 2e225c87784735360e9619766efe06782179a86a (diff) | |
download | sg3_utils-30842a3103045e471ec8169f09135bb6766e5e1d.tar.gz |
more JSON work: sense data and vpd device id, start on sg_vpd
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@956 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_vpd_vendor.c')
-rw-r--r-- | src/sg_vpd_vendor.c | 42 |
1 files changed, 2 insertions, 40 deletions
diff --git a/src/sg_vpd_vendor.c b/src/sg_vpd_vendor.c index a1a1a501..1a607404 100644 --- a/src/sg_vpd_vendor.c +++ b/src/sg_vpd_vendor.c @@ -28,6 +28,8 @@ #include "sg_unaligned.h" #include "sg_pr2serr.h" +#include "sg_vpd.h" + /* This is a companion file to sg_vpd.c . It contains logic to output and decode vendor specific VPD pages @@ -98,46 +100,6 @@ #define DEF_ALLOC_LEN 252 #define MX_ALLOC_LEN (0xc000 + 0x80) -/* These two structures are duplicates of those of the same name in - * sg_vpd.c . <<< Take care that both are the same. >>> */ -struct opts_t { - bool do_all; - bool do_enum; - bool do_force; - bool do_long; - bool do_quiet; - bool verbose_given; - bool version_given; - int do_hex; - int do_ident; - int do_raw; - int examine; - int maxlen; - int vend_prod_num; - int verbose; - int vpd_pn; - const char * device_name; - const char * page_str; - const char * inhex_fn; - const char * vend_prod; -}; - -struct svpd_values_name_t { - int value; /* VPD page number */ - int subvalue; /* to differentiate if value+pdt are not unique */ - int pdt; /* peripheral device type id, -1 is the default */ - /* (all or not applicable) value */ - const char * acron; - const char * name; -}; - -int vpd_fetch_page(int sg_fd, uint8_t * rp, int page, int mxlen, - bool qt, int vb, int * rlenp); - -/* sharing large global buffer, defined in sg_vpd.c */ -extern uint8_t * rsp_buff; - -/* end of section copied from sg_vpd.c . Maybe sg_vpd.h is needed */ struct svpd_vp_name_t { int vend_prod_num; /* vendor/product identifier */ |