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 C exit code #322

Merged
merged 2 commits into from
Jul 30, 2024
Merged

Conversation

tmuehlbacher
Copy link

As reported on IRC:

  bi_parent_subvol=0
  bi_nocow=0
, fixing
bcachefs (nvme0n1p7): Ratelimiting new instances of previous error
bcachefs (nvme0n1p7): check_path(): error EEXIST_str_hash_set
bcachefs (nvme0n1p7): bch2_check_directory_structure(): error EEXIST_str_hash_set
bcachefs (nvme0n1p7): bch2_fsck_online_thread_fn(): error EEXIST_str_hash_set
thread 'main' panicked at src/bcachefs.rs:113:79:
called `Result::unwrap()` on an `Err` value: TryFromIntError(())
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Some C command functions return integers that are larger than 255.

Fixes Rust panics if some C command (like fsck) returns a value bigger
than 255. The process exit code will be mangled but what can we do, it's
less confusing than a panic (that unfortunately doesn't print the return
value).

Signed-off-by: Thomas Mühlbacher <[email protected]>
@koverstreet koverstreet merged commit 1e5452a into koverstreet:master Jul 30, 2024
1 check passed
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