Commit df842101 authored by Tanya Finkel's avatar Tanya Finkel Committed by Bjorn Andersson
Browse files

QDL: Fix UFS provision issue



Fix the return value verification and add printf status message

Signed-off-by: default avatarTanya Finkel <tfinkel@codeaurora.org>
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent 44a80b12
...@@ -624,8 +624,11 @@ int firehose_run(int fd) ...@@ -624,8 +624,11 @@ int firehose_run(int fd)
return ret; return ret;
ret = ufs_provisioning_execute(fd, firehose_apply_ufs_common, ret = ufs_provisioning_execute(fd, firehose_apply_ufs_common,
firehose_apply_ufs_body, firehose_apply_ufs_epilogue); firehose_apply_ufs_body, firehose_apply_ufs_epilogue);
if (ret) if (!ret)
return ret; printf("UFS provisioning succeeded\n");
else
printf("UFS provisioning failed\n");
return ret;
} }
ret = firehose_configure(fd, false); ret = firehose_configure(fd, false);
......
...@@ -308,15 +308,15 @@ int ufs_provisioning_execute(int usbfd, ...@@ -308,15 +308,15 @@ int ufs_provisioning_execute(int usbfd,
// Just ask a target to check the XML w/o real provisioning // Just ask a target to check the XML w/o real provisioning
ret = apply_ufs_common(usbfd, ufs_common_p); ret = apply_ufs_common(usbfd, ufs_common_p);
if (!ret) if (ret)
return ret; return ret;
for (body = ufs_body_p; body; body = body->next) { for (body = ufs_body_p; body; body = body->next) {
ret = apply_ufs_body(usbfd, body); ret = apply_ufs_body(usbfd, body);
if (!ret) if (ret)
return ret; return ret;
} }
ret = apply_ufs_epilogue(usbfd, ufs_epilogue_p, false); ret = apply_ufs_epilogue(usbfd, ufs_epilogue_p, false);
if (!ret) { if (ret) {
fprintf(stderr, fprintf(stderr,
"UFS provisioning impossible, provisioning XML may be corrupted\n"); "UFS provisioning impossible, provisioning XML may be corrupted\n");
return ret; return ret;
...@@ -324,11 +324,11 @@ int ufs_provisioning_execute(int usbfd, ...@@ -324,11 +324,11 @@ int ufs_provisioning_execute(int usbfd,
// Real provisioning -- target didn't refuse a given XML // Real provisioning -- target didn't refuse a given XML
ret = apply_ufs_common(usbfd, ufs_common_p); ret = apply_ufs_common(usbfd, ufs_common_p);
if (!ret) if (ret)
return ret; return ret;
for (body = ufs_body_p; body; body = body->next) { for (body = ufs_body_p; body; body = body->next) {
ret = apply_ufs_body(usbfd, body); ret = apply_ufs_body(usbfd, body);
if (!ret) if (ret)
return ret; return ret;
} }
return apply_ufs_epilogue(usbfd, ufs_epilogue_p, true); return apply_ufs_epilogue(usbfd, ufs_epilogue_p, true);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment