sdparm.c (sdparm-1.11.tgz) | : | sdparm.c (sdparm-1.12.tgz) | ||
---|---|---|---|---|
/* | /* | |||
* Copyright (c) 2005-2020, Douglas Gilbert | * Copyright (c) 2005-2021, Douglas Gilbert | |||
* All rights reserved. | * All rights reserved. | |||
* | * | |||
* Redistribution and use in source and binary forms, with or without | * Redistribution and use in source and binary forms, with or without | |||
* modification, are permitted provided that the following conditions are met: | * modification, are permitted provided that the following conditions are met: | |||
* | * | |||
* 1. Redistributions of source code must retain the above copyright notice, | * 1. Redistributions of source code must retain the above copyright notice, | |||
* this list of conditions and the following disclaimer. | * this list of conditions and the following disclaimer. | |||
* 2. Redistributions in binary form must reproduce the above copyright | * 2. Redistributions in binary form must reproduce the above copyright | |||
* notice, this list of conditions and the following disclaimer in the | * notice, this list of conditions and the following disclaimer in the | |||
* documentation and/or other materials provided with the distribution. | * documentation and/or other materials provided with the distribution. | |||
skipping to change at line 83 | skipping to change at line 83 | |||
int verbose); | int verbose); | |||
#endif /* SG_LIB_LINUX */ | #endif /* SG_LIB_LINUX */ | |||
#include "sg_lib.h" | #include "sg_lib.h" | |||
#include "sg_cmds_basic.h" | #include "sg_cmds_basic.h" | |||
#include "sg_unaligned.h" | #include "sg_unaligned.h" | |||
#include "sg_pr2serr.h" | #include "sg_pr2serr.h" | |||
#include "sdparm.h" | #include "sdparm.h" | |||
static const char * version_str = "1.11 20200303 [svn: r334]"; | static const char * version_str = "1.12 20210421 [svn: r347]"; | |||
#define MAX_DEV_NAMES 256 | #define MAX_DEV_NAMES 256 | |||
#define INHEX_BUFF_SZ 4096 | #define INHEX_BUFF_SZ 4096 | |||
static uint8_t inhex_buff[INHEX_BUFF_SZ]; | static uint8_t inhex_buff[INHEX_BUFF_SZ]; | |||
static uint8_t * cur_aligned_mp; | static uint8_t * cur_aligned_mp; | |||
static uint8_t * cha_aligned_mp; | static uint8_t * cha_aligned_mp; | |||
static uint8_t * def_aligned_mp; | static uint8_t * def_aligned_mp; | |||
static uint8_t * sav_aligned_mp; | static uint8_t * sav_aligned_mp; | |||
skipping to change at line 460 | skipping to change at line 460 | |||
vpp = sdp_get_vendor_pair(vendor_id); | vpp = sdp_get_vendor_pair(vendor_id); | |||
mpi = (vpp ? vpp->mitem : NULL); | mpi = (vpp ? vpp->mitem : NULL); | |||
} else if ((transp >= 0) && (transp < 16)) | } else if ((transp >= 0) && (transp < 16)) | |||
mpi = sdparm_transport_mp[transp].mitem; | mpi = sdparm_transport_mp[transp].mitem; | |||
else | else | |||
mpi = sdparm_mitem_arr; | mpi = sdparm_mitem_arr; | |||
if (NULL == mpi) | if (NULL == mpi) | |||
return; | return; | |||
for ( ; mpi->acron; ++mpi) { | for ( ; mpi->acron; ++mpi) { | |||
if ((pdt >= 0) && (mpi->pdt_s >= 0) && !pdt_s_eq(pdt, mpi->pdt_s)) | if (! pdt_s_eq(pdt, mpi->pdt_s)) | |||
continue; | continue; | |||
if ((t_pn == mpi->pg_num) && (t_spn == mpi->subpg_num) && | if ((t_pn == mpi->pg_num) && (t_spn == mpi->subpg_num) && | |||
pdt_s_eq(t_pdt_s, mpi->pdt_s)) { | pdt_s_eq(t_pdt_s, mpi->pdt_s)) { | |||
if ((pn >= 0) && ((pn != t_pn) || (spn != t_spn))) | if ((pn >= 0) && ((pn != t_pn) || (spn != t_spn))) | |||
continue; | continue; | |||
} else { | } else { | |||
t_pn = mpi->pg_num; | t_pn = mpi->pg_num; | |||
t_spn = mpi->subpg_num; | t_spn = mpi->subpg_num; | |||
t_pdt_s = mpi->pdt_s; | t_pdt_s = mpi->pdt_s; | |||
if ((pn >= 0) && ((pn != t_pn) || (spn != t_spn))) | if ((pn >= 0) && ((pn != t_pn) || (spn != t_spn))) | |||
continue; | continue; | |||
if ((pdt >= 0) && !pdt_s_eq(pdt, t_pdt_s)) | if (! pdt_s_eq(pdt, t_pdt_s)) | |||
continue; | continue; | |||
mpp = sdp_get_mpt_with_str(t_pn, t_spn, t_pdt_s, transp, | mpp = sdp_get_mpt_with_str(t_pn, t_spn, t_pdt_s, transp, | |||
vendor_id, long_o, true, sizeof(d), d); | vendor_id, long_o, true, sizeof(d), d); | |||
if (long_o && (transp < 0) && (vendor_id < 0)) | if (long_o && (transp < 0) && (vendor_id < 0)) | |||
printf("%s [%s] mode page:\n", d, | printf("%s [%s] mode page:\n", d, | |||
sg_get_pdt_str(t_pdt_s, sizeof(b), b)); | sg_get_pdt_str(t_pdt_s, sizeof(b), b)); | |||
else | else | |||
printf("%s mode page:\n", d); | printf("%s mode page:\n", d); | |||
if (mpp && ((mdp = mpp->mp_desc))) { | if (mpp && ((mdp = mpp->mp_desc))) { | |||
have_desc = true; | have_desc = true; | |||
skipping to change at line 509 | skipping to change at line 509 | |||
print_mp_extra(mpi->extra); | print_mp_extra(mpi->extra); | |||
} | } | |||
found = true; | found = true; | |||
} | } | |||
if ((! found) && (pn >= 0)) { | if ((! found) && (pn >= 0)) { | |||
sdp_get_mpt_with_str(pn, spn, pdt, transp, vendor_id, | sdp_get_mpt_with_str(pn, spn, pdt, transp, vendor_id, | |||
long_o, true, sizeof(d), d); | long_o, true, sizeof(d), d); | |||
pr2serr("%s mode page: no items found\n", d); | pr2serr("%s mode page: no items found\n", d); | |||
} | } | |||
if (found && have_desc && (long_o || (e_num > 1))) { | if (found && have_desc && (long_o || (e_num > 1))) { | |||
if ((-1 == mdp->num_descs_off) && (-1 == mdp->num_descs_bytes)) | ||||
return; /* Nothing to warn about in this case */ | ||||
if (mdp->name) | if (mdp->name) | |||
printf(" <<%s mode descriptor>>\n", mdp->name); | printf(" <<%s mode descriptor>>\n", mdp->name); | |||
else | else | |||
printf(" <<mode descriptor>>\n"); | printf(" <<mode descriptor>>\n"); | |||
printf(" num_descs_off=%d, num_descs_bytes=%d, " | printf(" num_descs_off=%d, num_descs_bytes=%d, " | |||
"num_descs_inc=%d, first_desc_off=%d\n", | "num_descs_inc=%d, first_desc_off=%d\n", | |||
mdp->num_descs_off, mdp->num_descs_bytes, | mdp->num_descs_off, mdp->num_descs_bytes, | |||
mdp->num_descs_inc, mdp->first_desc_off); | mdp->num_descs_inc, mdp->first_desc_off); | |||
if (mdp->desc_len > 0) | if (mdp->desc_len > 0) | |||
printf(" descriptor_len=%d, ", mdp->desc_len); | printf(" descriptor_len=%d, ", mdp->desc_len); | |||
skipping to change at line 1089 | skipping to change at line 1091 | |||
mpi = sdparm_mitem_arr; | mpi = sdparm_mitem_arr; | |||
if (NULL == mpi) | if (NULL == mpi) | |||
return SG_LIB_CAT_OTHER; | return SG_LIB_CAT_OTHER; | |||
last_mpi = mpi; | last_mpi = mpi; | |||
if (pn >= 0) { /* step to first item of given page */ | if (pn >= 0) { /* step to first item of given page */ | |||
single_pg = true; | single_pg = true; | |||
fetch_pg = true; | fetch_pg = true; | |||
for ( ; mpi->acron; ++mpi) { | for ( ; mpi->acron; ++mpi) { | |||
if ((pn == mpi->pg_num) && (spn == mpi->subpg_num)) { | if ((pn == mpi->pg_num) && (spn == mpi->subpg_num)) { | |||
if ((pdt < 0) || (mpi->pdt_s < 0) || | if (pdt_s_eq(pdt, mpi->pdt_s) || op->flexible) | |||
pdt_s_eq(pdt, mpi->pdt_s) || op->flexible) | ||||
break; | break; | |||
} | } | |||
} | } | |||
if (NULL == mpi->acron) { /* page has no known fields */ | if (NULL == mpi->acron) { /* page has no known fields */ | |||
if (op->do_hex) | if (op->do_hex) | |||
mpi = last_mpi; /* trick to enter main loop once */ | mpi = last_mpi; /* trick to enter main loop once */ | |||
else if (op->examine) | else if (op->examine) | |||
return print_mode_page_hex(sg_fd, pn, spn, op); | return print_mode_page_hex(sg_fd, pn, spn, op); | |||
else { | else { | |||
sdp_get_mpt_with_str(pn, spn, pdt, op->transport, | sdp_get_mpt_with_str(pn, spn, pdt, op->transport, | |||
skipping to change at line 1129 | skipping to change at line 1130 | |||
have_desc_id = false; | have_desc_id = false; | |||
desc_id = -1; | desc_id = -1; | |||
desc_len = -1; | desc_len = -1; | |||
req_len = mode6 ? DEF_MODE_6_RESP_LEN : DEF_MODE_RESP_LEN; | req_len = mode6 ? DEF_MODE_6_RESP_LEN : DEF_MODE_RESP_LEN; | |||
/* starting at first match, loop over each mode page item in given | /* starting at first match, loop over each mode page item in given | |||
* namespace */ | * namespace */ | |||
for (smask = 0, warned = false ; mpi->acron; ++mpi, fetch_pg = false) { | for (smask = 0, warned = false ; mpi->acron; ++mpi, fetch_pg = false) { | |||
if (! fetch_pg) { | if (! fetch_pg) { | |||
if ((pn == mpi->pg_num) && (spn == mpi->subpg_num)) { | if ((pn == mpi->pg_num) && (spn == mpi->subpg_num)) { | |||
if ((pdt >=0) && (mpi->pdt_s >= 0) && | if (! pdt_s_eq(pdt, mpi->pdt_s) && ! op->flexible) | |||
!pdt_s_eq(pdt, mpi->pdt_s) && (! op->flexible)) | ||||
continue; | continue; | |||
if (! (((orig_pn >= 0) ? 1 : op->do_all) || | if (! (((orig_pn >= 0) ? 1 : op->do_all) || | |||
(MF_COMMON & mpi->flags))) | (MF_COMMON & mpi->flags))) | |||
continue; | continue; | |||
/* here if matches everything at the mpage level */ | /* here if matches everything at the mpage level */ | |||
} else { /* page changed? some clean up to do */ | } else { /* page changed? some clean up to do */ | |||
if (fdesc_mpi) { | if (fdesc_mpi) { | |||
last_mpi = mpi - 1; | last_mpi = mpi - 1; | |||
if ((pn == last_mpi->pg_num) && | if ((pn == last_mpi->pg_num) && | |||
(spn == last_mpi->subpg_num) && | (spn == last_mpi->subpg_num) && | |||
(single_pg || op->do_all)) | (single_pg || op->do_all)) | |||
print_mitem_desc_after1(pc_arr, pg_len, mpp, | print_mitem_desc_after1(pc_arr, pg_len, mpp, | |||
fdesc_mpi, last_mpi, op, | fdesc_mpi, last_mpi, op, | |||
smask, desc_len); | smask, desc_len); | |||
} | } | |||
if (single_pg) | if (single_pg) | |||
break; | break; | |||
if (! pdt_s_eq(pdt, mpi->pdt_s)) | ||||
continue; /* ... but pdt_s didn't match */ | ||||
fetch_pg = true; | fetch_pg = true; | |||
pn = mpi->pg_num; | pn = mpi->pg_num; | |||
spn = mpi->subpg_num; | spn = mpi->subpg_num; | |||
} | } | |||
} | } | |||
if (fetch_pg) { | if (fetch_pg) { | |||
pg_len = 0; | pg_len = 0; | |||
/* Only fetch mode page when needed (e.g. item page changed) */ | /* Only fetch mode page when needed (e.g. item page changed) */ | |||
mpp = sdp_get_mpt_with_str(pn, spn, pdt, op->transport, | mpp = sdp_get_mpt_with_str(pn, spn, pdt, op->transport, | |||
op->vendor_id, op->do_long, | op->vendor_id, op->do_long, | |||
skipping to change at line 1374 | skipping to change at line 1376 | |||
mpi = sdparm_transport_mp[transport].mitem; | mpi = sdparm_transport_mp[transport].mitem; | |||
else | else | |||
mpi = sdparm_mitem_arr; | mpi = sdparm_mitem_arr; | |||
if (NULL == mpi) | if (NULL == mpi) | |||
return SG_LIB_CAT_OTHER; | return SG_LIB_CAT_OTHER; | |||
now_try_generic: | now_try_generic: | |||
last_mpi = mpi; | last_mpi = mpi; | |||
for ( ; mpi->acron; ++mpi) { | for ( ; mpi->acron; ++mpi) { | |||
if ((pn == mpi->pg_num) && (spn == mpi->subpg_num)) { | if ((pn == mpi->pg_num) && (spn == mpi->subpg_num)) { | |||
if ((op->pdt < 0) || (mpi->pdt_s < 0) || | if (pdt_s_eq(op->pdt, mpi->pdt_s) || op->flexible) | |||
pdt_s_eq(op->pdt, mpi->pdt_s) || op->flexible) | ||||
break; | break; | |||
} | } | |||
} | } | |||
if (NULL == mpi->acron) { /* page has no known fields */ | if (NULL == mpi->acron) { /* page has no known fields */ | |||
if (op->do_all && ((transport >= 0) || (vendor_id >= 0))) { | if (op->do_all && ((transport >= 0) || (vendor_id >= 0))) { | |||
if (transport >= 0) | if (transport >= 0) | |||
transport = -1; | transport = -1; | |||
if (vendor_id >= 0) | if (vendor_id >= 0) | |||
vendor_id = -1; | vendor_id = -1; | |||
mpi = sdparm_mitem_arr; | mpi = sdparm_mitem_arr; | |||
skipping to change at line 1446 | skipping to change at line 1447 | |||
printf("[0x%x] ", pn); | printf("[0x%x] ", pn); | |||
} | } | |||
printf("mode page"); | printf("mode page"); | |||
if ((op->do_long > 1) || op->verbose) | if ((op->do_long > 1) || op->verbose) | |||
printf(" [PS=%d]:\n", !!(pg_p[0] & 0x80)); | printf(" [PS=%d]:\n", !!(pg_p[0] & 0x80)); | |||
else | else | |||
printf(":\n"); | printf(":\n"); | |||
check_mode_page(pg_p, pn, pg_len, op); | check_mode_page(pg_p, pn, pg_len, op); | |||
} else { /* if not first_time */ | } else { /* if not first_time */ | |||
if ((pn == mpi->pg_num) && (spn == mpi->subpg_num)) { | if ((pn == mpi->pg_num) && (spn == mpi->subpg_num)) { | |||
if ((op->pdt >=0) && (mpi->pdt_s >= 0) && | if (! pdt_s_eq(op->pdt, mpi->pdt_s) && ! op->flexible) | |||
!pdt_s_eq(op->pdt, mpi->pdt_s) && (! op->flexible)) | ||||
continue; | continue; | |||
if (! (((orig_pn >= 0) ? true : op->do_all) || | if (! (((orig_pn >= 0) ? true : op->do_all) || | |||
(MF_COMMON & mpi->flags))) | (MF_COMMON & mpi->flags))) | |||
continue; | continue; | |||
} else { /* mode page or subpage changed */ | } else { /* mode page or subpage changed */ | |||
if (fdesc_mpi) { | if (fdesc_mpi) { | |||
last_mpi = mpi - 1; /* last_mpi that matched ... */ | last_mpi = mpi - 1; /* last_mpi that matched ... */ | |||
if ((pn == last_mpi->pg_num) && | if ((pn == last_mpi->pg_num) && | |||
(spn == last_mpi->subpg_num)) | (spn == last_mpi->subpg_num)) | |||
print_mitem_desc_after1(pc_arr, pg_len, mpp, | print_mitem_desc_after1(pc_arr, pg_len, mpp, | |||
skipping to change at line 1714 | skipping to change at line 1714 | |||
} | } | |||
if (adapt) { | if (adapt) { | |||
if (! desc_adjust_start_byte(desc_num, mpp, cur_mp, rep_len, | if (! desc_adjust_start_byte(desc_num, mpp, cur_mp, rep_len, | |||
&i, op)) { | &i, op)) { | |||
pr2serr(">> failed to find field acronym: %s in current " | pr2serr(">> failed to find field acronym: %s in current " | |||
"page\n", mpi->acron); | "page\n", mpi->acron); | |||
res = SG_LIB_CAT_OTHER; | res = SG_LIB_CAT_OTHER; | |||
goto out; | goto out; | |||
} | } | |||
} | } | |||
if ((pdt >= 0) && (! warned) && mpi->acron && | if (! warned && mpi->acron && ! pdt_s_eq(pdt, mpi->pdt_s)) { | |||
(mpi->pdt_s >= 0) && !pdt_s_eq(pdt, mpi->pdt_s)) { | ||||
warned = true; | warned = true; | |||
pr2serr(">> warning: peripheral device type (pdt) is 0x%x but " | pr2serr(">> warning: peripheral device type (pdt) is 0x%x but " | |||
"acronym %s\n is associated with pdt 0x%x.\n", pdt, | "acronym %s\n is associated with pdt 0x%x.\n", pdt, | |||
ivp->mpi.acron, ivp->mpi.pdt_s); | ivp->mpi.acron, ivp->mpi.pdt_s); | |||
} | } | |||
len = (smask & 1) ? sdp_mpage_len(cur_mp) : 0; | len = (smask & 1) ? sdp_mpage_len(cur_mp) : 0; | |||
if (mpi->start_byte >= len) { | if (mpi->start_byte >= len) { | |||
pr2serr(">> warning: "); | pr2serr(">> warning: "); | |||
if (mpi->acron) | if (mpi->acron) | |||
pr2serr("%s ", mpi->acron); | pr2serr("%s ", mpi->acron); | |||
skipping to change at line 1817 | skipping to change at line 1816 | |||
char b[128]; | char b[128]; | |||
char b_tmp[32]; | char b_tmp[32]; | |||
char ebuff[EBUFF_SZ]; | char ebuff[EBUFF_SZ]; | |||
uint8_t * mdpg = oth_aligned_mp; | uint8_t * mdpg = oth_aligned_mp; | |||
struct sdparm_mode_page_item ampi; | struct sdparm_mode_page_item ampi; | |||
if (pdt >= 0) { | if (pdt >= 0) { | |||
/* sanity check: check acronym's pdt matches device's pdt */ | /* sanity check: check acronym's pdt matches device's pdt */ | |||
for (k = 0; k < mps->num_it_vals; ++k) { | for (k = 0; k < mps->num_it_vals; ++k) { | |||
ivp = &mps->it_vals[k]; | ivp = &mps->it_vals[k]; | |||
if (ivp->mpi.acron && (ivp->mpi.pdt_s >= 0) && | if (ivp->mpi.acron && ! pdt_s_eq(pdt, ivp->mpi.pdt_s)) { | |||
!pdt_s_eq(pdt, ivp->mpi.pdt_s)) { | ||||
pr2serr("%s: peripheral device type (pdt) is 0x%x but " | pr2serr("%s: peripheral device type (pdt) is 0x%x but " | |||
"acronym %s\n is associated with pdt 0x%x. To " | "acronym %s\n is associated with pdt 0x%x. To " | |||
"bypass use numeric addressing mode.\n", __func__, | "bypass use numeric addressing mode.\n", __func__, | |||
pdt, ivp->mpi.acron, ivp->mpi.pdt_s); | pdt, ivp->mpi.acron, ivp->mpi.pdt_s); | |||
return SG_LIB_SYNTAX_ERROR; | return SG_LIB_SYNTAX_ERROR; | |||
} | } | |||
} | } | |||
} | } | |||
pn = mps->pg_num; | pn = mps->pg_num; | |||
spn = mps->subpg_num; | spn = mps->subpg_num; | |||
skipping to change at line 2440 | skipping to change at line 2438 | |||
#endif /* SG_LIB_LINUX */ | #endif /* SG_LIB_LINUX */ | |||
if (res) { | if (res) { | |||
pr2serr("SCSI INQUIRY command failed on %s\n", device_name); | pr2serr("SCSI INQUIRY command failed on %s\n", device_name); | |||
if (res > 0) | if (res > 0) | |||
res = -res; | res = -res; | |||
goto err_out; | goto err_out; | |||
} | } | |||
} | } | |||
l_pdt = sir.peripheral_type; | l_pdt = sir.peripheral_type; | |||
if ((PDT_WO == l_pdt) || (PDT_OPTICAL == l_pdt)) | if ((PDT_WO == l_pdt) || (PDT_OPTICAL == l_pdt)) | |||
*pdt = PDT_DISK; /* map disk-like pdt's to PDT_DOSK */ | *pdt = PDT_DISK; /* map disk-like pdt's to PDT_DISK */ | |||
else | else | |||
*pdt = l_pdt; | *pdt = l_pdt; | |||
if (protect) | if (protect) | |||
*protect = !! (sir.byte_5 & 0x1); /* PROTECT bit SPC-3 and later */ | *protect = !! (sir.byte_5 & 0x1); /* PROTECT bit SPC-3 and later */ | |||
if ((0 == op->do_hex) && (0 == op->do_quiet)) { | if ((0 == op->do_hex) && (0 == op->do_quiet)) { | |||
printf(" %s: %.8s %.16s %.4s", | printf(" %s: %.8s %.16s %.4s", | |||
device_name, sir.vendor, sir.product, sir.revision); | device_name, sir.vendor, sir.product, sir.revision); | |||
if (0 != l_pdt) | if (0 != l_pdt) | |||
printf(" [%s]", sg_get_pdt_str(l_pdt, sizeof(b), b)); | printf(" [%s]", sg_get_pdt_str(l_pdt, sizeof(b), b)); | |||
printf("\n"); | printf("\n"); | |||
skipping to change at line 2482 | skipping to change at line 2480 | |||
else | else | |||
pr2serr("Accepts mode page numbers from 0 to 62 .\n" | pr2serr("Accepts mode page numbers from 0 to 62 .\n" | |||
" Accepts mode subpage numbers from 0 to 254 .\n" | " Accepts mode subpage numbers from 0 to 254 .\n" | |||
" For VPD pages add a '--inquiry' option.\n"); | " For VPD pages add a '--inquiry' option.\n"); | |||
return SG_LIB_SYNTAX_ERROR; | return SG_LIB_SYNTAX_ERROR; | |||
} | } | |||
if ((pn > 0) && (pdt >= 0)) { | if ((pn > 0) && (pdt >= 0)) { | |||
mpp = sdp_get_mpage_t(pn, spn, pdt, op->transport, op->vendor_id); | mpp = sdp_get_mpage_t(pn, spn, pdt, op->transport, op->vendor_id); | |||
if (NULL == mpp) | if (NULL == mpp) | |||
mpp = sdp_get_mpage_t(pn, spn, -1, op->transport, op->vendor_id); | mpp = sdp_get_mpage_t(pn, spn, -1, op->transport, op->vendor_id); | |||
if (mpp && mpp->name && (mpp->pdt_s >= 0) && | if (mpp && mpp->name && ! pdt_s_eq(pdt, mpp->pdt_s)) { | |||
!pdt_s_eq(pdt, mpp->pdt_s)) { | ||||
pr2serr(">> Warning: %s mode page associated with\n", mpp->name); | pr2serr(">> Warning: %s mode page associated with\n", mpp->name); | |||
pr2serr(" peripheral device type 0x%x but device pdt is 0x%x\n", | pr2serr(" peripheral device type 0x%x but device pdt is 0x%x\n", | |||
mpp->pdt_s, pdt); | mpp->pdt_s, pdt); | |||
if (! op->flexible) | if (! op->flexible) | |||
pr2serr(" may need '--flexible' option to override\n"); | pr2serr(" may need '--flexible' option to override\n"); | |||
} | } | |||
} | } | |||
if (1 == op->defaults) | if (1 == op->defaults) | |||
res = set_mp_defaults(sg_fd, pn, spn, pdt, op); | res = set_mp_defaults(sg_fd, pn, spn, pdt, op); | |||
else if (op->defaults > 1) | else if (op->defaults > 1) | |||
End of changes. 14 change blocks. | ||||
19 lines changed or deleted | 16 lines changed or added |