Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UDNL: Fix to GetFileStatFromImage #317

Merged
merged 2 commits into from
Aug 20, 2020
Merged

Conversation

PSI-Rockin
Copy link
Contributor

@PSI-Rockin PSI-Rockin commented Aug 17, 2020

Pull Request checklist

  • I reformatted the code with clang-format
  • I checked to make sure my submission worked
  • I am the author of submission or have permission from the original author
  • Requires update of the PS2SDK
  • Requires update of the gsKit
  • Others (please specify below)

Pull Request description

This PR fixes a minor bug in GetFileStatFromImage, where the UDNL clone would reject an image's IOPBTCONF if it had no ext info. However, the boot ROM UDNL will be successful regardless of the presence of any ext info.

@uyjulian
Copy link
Member

cc @sp193

@sp193
Copy link
Contributor

sp193 commented Aug 20, 2020

To avoid having multiple return paths (which was the original intent), would it be preferrable to move the goto end; (and the result = stat; assignment) to where you inserted that return statement?
Indeed, in the disassembly of UDNL, the file is accepted, even if there is no EXTINFO.

Alternatively, perhaps if you prefer so, we could replace the goto with two returns? Today, I would not use goto today, but this module was written many years ago.

@PSI-Rockin
Copy link
Contributor Author

I have replaced the goto with two returns. There's a lot of cleanup that could be done for this, but I think that goes outside the scope of the PR.

@uyjulian
Copy link
Member

Would you like me to fix the formatting, or would you like to do it yourself?

@PSI-Rockin
Copy link
Contributor Author

Go ahead and fix the formatting.

@AKuHAK
Copy link
Member

AKuHAK commented Aug 20, 2020

Would you like me to fix the formatting, or would you like to do it yourself?

BTW could you make CI format-check more verbose? As for now it just produces

Run make format-check
make format-check
shell: sh -e {0}
make: *** [Makefile:319: format-check] Error 1
##[error]Process completed with exit code 2.

As for me, I think that such type of command should be run completely from the shell, not from Makefile. It will make code maintaining more clear and portable.

@uyjulian uyjulian merged commit e977352 into ps2homebrew:master Aug 20, 2020
@PSI-Rockin PSI-Rockin deleted the udnl_fix branch August 25, 2020 19:20
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.

None yet

4 participants