Skip to content

[ISSUE]: Incorrect argv[0]/CWD for non-HDD targets when HDD support built in #74

@arobins

Description

@arobins

Checks

Describe the issue

Setup:

  • PS2BBL built with HDD and MX4SIO support
  • HDD MBR configured to launch PS2BBL
  • Highest-precedence PS2BBL config located in hdd0:__sysconf/PS2BBL/CONFIG.INI

Two observations, probably the same issue:

  • The launched program's argv[0] starts with hdd0:__sysconf:, followed by something more likely to be the real path (may require same IRX load order). As a concrete example, I had a program named ps2_test_app_usb.elf in the root of a USB key, and launching it gets hdd0:__sysconf:mass:/ps2_test_app_usb.elf instead of just mass:/ps2_test_app_usb.elf.
  • The CWD as returned by getcwd returns paths with an unexpected hdd0:__sysconf: prefix. For the same example program, I get hdd0:__sysconf:mass: as the CWD.

I confirmed that this happens for both USB (always present) and MX4SIO (optional) storage devices.

Console model

SCPH-39001

Program version (if possible, also provide hash)

Custom build - including #73

System modifications

No response

What kind of boot method are you using to run the bootloader?

HDD MBR

Context and extra information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions