Skip to content

Pfs2tar improvements#51

Merged
uyjulian merged 16 commits intops2homebrew:masterfrom
AKuHAK:pfs2tar-improvements
Jul 2, 2025
Merged

Pfs2tar improvements#51
uyjulian merged 16 commits intops2homebrew:masterfrom
AKuHAK:pfs2tar-improvements

Conversation

@AKuHAK
Copy link
Copy Markdown
Member

@AKuHAK AKuHAK commented Jun 14, 2025

Pull Request checklist

Note: these are not necessarily requirements

  • 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 or other dependencies
  • Others (please specify below)

Pull Request description

@uyjulian
Copy link
Copy Markdown
Member

I think it would be better to have it an option to explicitly specify the output tar name, and when not present, use the automatically generated tar name

@AKuHAK AKuHAK marked this pull request as draft June 28, 2025 21:11
@AKuHAK AKuHAK force-pushed the pfs2tar-improvements branch from 1af11ae to deba674 Compare July 1, 2025 11:51
@AKuHAK AKuHAK force-pushed the pfs2tar-improvements branch from 0f6ebba to 653eed5 Compare July 1, 2025 17:16
@AKuHAK AKuHAK marked this pull request as ready for review July 1, 2025 17:36
@AKuHAK AKuHAK requested review from Copilot and uyjulian July 1, 2025 17:36
@AKuHAK
Copy link
Copy Markdown
Member Author

AKuHAK commented Jul 1, 2025

@uyjulian returned tar filename handle and added option to restore tar archives back to the HDD.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the pfs2tar tool with bidirectional tar support (extract and restore), timezone- and format-aware timestamp/mode conversions, and improved CLI and build integration.

  • Added --extract/--restore modes with partition and overwrite options
  • Implemented POSIX-to-iomanX time/mode converters and parent-directory creation
  • Updated Meson configs and CI to always build and upload the new pfs2tar executable

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/pfs2tar.c Added convert functions, restore logic, overwrite flag, and CLI
meson_options.txt Changed enable_pfs2tar default to true
meson.build Refactored pfs2tar executable definition and platform flags
.github/workflows/ci.yml Added -Denable_pfs2tar=true to CI setups and upload artifact
Comments suppressed due to low confidence (2)

src/pfs2tar.c:179

  • This new POSIX-to-iomanX time conversion logic lacks unit tests. Consider adding tests for edge cases (e.g., year boundaries, DST offsets) to validate correctness.
static void convert_posix_time_to_iox_time(time_t posix_time, unsigned char *iomanx_time)

src/pfs2tar.c:534

  • [nitpick] The function name part_tar is ambiguous in contrast to tar_part; renaming it to something like restore_tar would improve clarity.
static int part_tar(const char *arg)

Comment thread src/pfs2tar.c
Comment thread src/pfs2tar.c
Comment thread src/pfs2tar.c
Comment thread src/pfs2tar.c Outdated
Comment thread src/pfs2tar.c Outdated
Copy link
Copy Markdown
Member

@uyjulian uyjulian left a comment

Choose a reason for hiding this comment

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

Lgtm

@uyjulian uyjulian merged commit f4c5de0 into ps2homebrew:master Jul 2, 2025
6 checks passed
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.

3 participants