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

Improve text printing #25

Merged
merged 3 commits into from
Feb 26, 2024

Conversation

fischerling
Copy link
Contributor

This pull request improves the file printing capabilities of the userspace tools.

It fixes the broken read/puts implementations in cat and man.

Additionally, it improves the exit code of cat to return 1 if one or more file could not be printed.

Using puts to output data retrieved through write is broken.
Puts expects a null-terminated string, which is not returned by read.
Use write to exactly output the data previously read.
Exit with status 1 if one or more arguments could not be printed.
This reduces the required code in man and additionally,
replaces the old broken read/puts implementation.

Puts expects a null-terminated string, but write does not return
a null-terminted string.
@Galfurian Galfurian merged commit b617fcc into mentos-team:master Feb 26, 2024
17 checks passed
@fischerling fischerling deleted the improve-text-printing branch February 29, 2024 10:52
@Galfurian Galfurian added enhancement New feature or request bug Something isn't working labels Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants