Skip to content

Conversation

@beanhuo
Copy link
Contributor

@beanhuo beanhuo commented Jan 20, 2021

No description provided.

After changeing the binary configuration image file, possibly, the
size of configuration file will be one byte bigger than original size
by using seek(). in this case, we choose QUERY_DESC_CONFIGURAION_MAX_SIZE
as its length.

Signed-off-by: Bean Huo <[email protected]>
IDE 01h in Atrributes is Reserved.

Signed-off-by: Bean Huo <[email protected]>
Flags length has been changed, but we didn't update it in the verify_and_set_idn()

Signed-off-by: Bean Huo <[email protected]>
WriteBooster related flags are an array of flags, add its index
distinguish.

Signed-off-by: Bean Huo <[email protected]>
WriteBooster related attributes are an array of attributes, add its index
distinguish.

Signed-off-by: Bean Huo <[email protected]>
opt->index, opt->selector, 0, 0, 0);
tmp->device_level & ARRAY ?
opt->index : 0,
opt->selector, 0, 0, 0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is redundant fix, By default in case and user didn't set index, selector the values are 0.
See verify_arg_and_set_default function

opt->index, opt->selector, 0, 0, 0);
(tmp->device_level & ARRAY) ?
opt->index : 0,
opt->selector, 0, 0, 0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as previous one

break;
case FLAG_TYPE:
if (idn > QUERY_FLAG_IDN_PERMANENTLYDISABLEFW) {
if (idn > QUERY_FLAG_IDN_MAX) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct

struct attr_fields ufs_attrs[] = {
{"bBootLunEn", BYTE, (URD|UWRT), (READ_ONLY|WRITE_PRSIST), DEV},
{"bMAX_DATA_SIZE_FOR_HPB_SINGLE_CMD", BYTE, URD, READ_ONLY, DEV},
{ATTR_RSRV()},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct


if (file_size > QUERY_DESC_CONFIGURAION_MAX_SIZE)
file_size = QUERY_DESC_CONFIGURAION_MAX_SIZE;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case an user create the wrong config file. I don't think the tool shall try fix it. Better if the user will receive Invalid length Query error and fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants