Skip to content

Make fs::err_t enum a subcategory of std::error_condition; use the st…#13128

Merged
cuavas merged 2 commits into
mamedev:masterfrom
ajrhacker:fs_err
Feb 22, 2025
Merged

Make fs::err_t enum a subcategory of std::error_condition; use the st…#13128
cuavas merged 2 commits into
mamedev:masterfrom
ajrhacker:fs_err

Conversation

@ajrhacker

Copy link
Copy Markdown
Contributor

…andard codes in some places

@ajrhacker ajrhacker requested a review from galibert December 28, 2024 13:58
@cuavas

cuavas commented Dec 29, 2024

Copy link
Copy Markdown
Member

I think making the errors an error_condition category is a sensible change.

However, I don’t think using std::errc error conditions for errors relating to the emulated filesystem is a great idea. It makes it impossible to distinguish between errors accessing the underlying storage holding the disk image and errors from accessing the filesystem withing the disk image. If anything, I would have considered using std::errc::not_supported in place of ERR_UNSUPPORTED but kept ERR_NOT_FOUND, ERR_NOT_EMPTY and ERR_NO_SPACE equivalents in the filesystem error category.

Comment on lines 312 to 314
break;
fprintf(stderr, "Reading to pos %d from track %d sector %d\n", pos, track, sector);
auto dblk = m_blockdev.get(track*16 + sector);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this extra printf intentional? It looks like the kind of thing that would get spammy fast.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's a leftover from an unrelated debugging effort. I'll remove it.

@cuavas cuavas merged commit c4da9ca into mamedev:master Feb 22, 2025
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.

2 participants