Skip to content

libcoco: report a missing image as "pathname not found" - #109

Merged
tlindner merged 2 commits into
nitros9project:mainfrom
markrvmurray:pr/toolshed-fixes
Nov 8, 2026
Merged

tlindner merged 2 commits into
nitros9project:mainfrom
markrvmurray:pr/toolshed-fixes

Conversation

@markrvmurray

Copy link
Copy Markdown
Contributor

_coco_identify_image() returned EOS_BPNAM ("badly formed pathname") whenever the image file couldn't be opened, so a missing or unreadable image was reported as a malformed name. It now returns EOS_PNNF (error 216).

os9 dir and os9 attr already report 216 for a missing image by another route, but os9 copy still went through this one:

  • before: copy: error 215 on file 'ok' to 'missing.dsk,ok': badly formed pathname
  • after: copy: error 216 on file 'ok' to 'missing.dsk,ok': pathname not found

A new test in unittest/libdecbtest.c checks the return value; it fails without the fix.

Tested: make -C build/unix builds and every unit-test suite passes, on macOS.

_coco_identify_image: an image that cannot be opened is "pathname not
found" (EOS_PNNF), not "badly formed pathname" (EOS_BPNAM); every
os9/decb/cecb command was pointing at the wrong problem.
Check that _coco_identify_image gives EOS_PNNF for an image file that
does not exist.
@tlindner
tlindner merged commit 55064e9 into nitros9project:main Nov 8, 2026
8 checks passed
@markrvmurray
markrvmurray deleted the pr/toolshed-fixes branch November 9, 2026 22:16
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