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

wc: Do not use st_size if it equals zero #985

Closed
wants to merge 1 commit into from

Conversation

ricardobranco777
Copy link
Contributor

Fix for wc(1) not being able to wc -c a file in pseudo-filesystems that advertize a zero size value.

@igalic
Copy link
Contributor

igalic commented Jan 3, 2024

is there a bug in bugzilla?

@ricardobranco777
Copy link
Contributor Author

is there a bug in bugzilla?

Forgot to open https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276093

@bsdimp bsdimp added the ready label Feb 3, 2024
@bsdimp bsdimp self-assigned this Feb 3, 2024
freebsd-git pushed a commit that referenced this pull request Feb 3, 2024
Pseudo-filesystems often cannot compute the size of the file correctly
and report 0 for the size. Ignore the size when it's zero and fallback
to the size unknown code.

PR: 276093
Reviewed by: imp
Pull Request: #985
@bsdimp bsdimp added merged and removed ready labels Feb 3, 2024
@bsdimp bsdimp closed this Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants