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

Fix uname return value condition for Illumos #15

Merged
merged 2 commits into from
Nov 28, 2021
Merged

Fix uname return value condition for Illumos #15

merged 2 commits into from
Nov 28, 2021

Conversation

messense
Copy link
Contributor

@messense messense commented Nov 28, 2021

https://illumos.org/man/2/uname

Upon successful completion, a non-negative value is returned. Otherwise,
-1 is returned and errno is set to indicate the error.

Other platforms:

  1. Linux: On success, zero is returned. On error, -1 is returned, and errno is set to indicate the error.
  2. FreeBSD: The uname() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error.
  3. macOS: The uname() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error.
  4. Solaris: Upon successful completion, a non-negative value is returned. Otherwise, −1 is returned and errno is set to indicate the error.

@sylvestre
Copy link
Contributor

Could you please update the commit message ?
it is more about fixing an issue with illumos than porting it
thanks

https://illumos.org/man/2/uname

> Upon successful completion, a non-negative value is returned. Otherwise,
> -1 is returned and errno is set to indicate the error.
@messense messense changed the title Add support for Illumos Fix uname return value condition for Illumos Nov 28, 2021
@messense
Copy link
Contributor Author

Could you please update the commit message ? it is more about fixing an issue with illumos than porting it thanks

Done.

@codecov
Copy link

codecov bot commented Nov 28, 2021

Codecov Report

Merging #15 (5405378) into master (69fd71c) will not change coverage.
The diff coverage is 0.00%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master     #15   +/-   ##
======================================
  Coverage    4.34%   4.34%           
======================================
  Files           2       2           
  Lines          23      23           
  Branches        1       1           
======================================
  Hits            1       1           
  Misses         22      22           
Impacted Files Coverage Δ
src/unix.rs 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 69fd71c...5405378. Read the comment docs.

@sylvestre sylvestre merged commit 2d0c26f into uutils:master Nov 28, 2021
@messense
Copy link
Contributor Author

A new release on crates.io would be great, thanks!

@sylvestre
Copy link
Contributor

Yeah, I am working on polishing this crate a bit :)
#17

@sylvestre
Copy link
Contributor

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