Skip to content

hasher: align -c behaviour with coreutils#196

Closed
nkraetzschmar wants to merge 1 commit into
smuellerDD:masterfrom
nkraetzschmar:hasher_check_files_multiple
Closed

hasher: align -c behaviour with coreutils#196
nkraetzschmar wants to merge 1 commit into
smuellerDD:masterfrom
nkraetzschmar:hasher_check_files_multiple

Conversation

@nkraetzschmar
Copy link
Copy Markdown
Contributor

Fixes #194

Make -c/--check a mode flag instead of an option requiring an argument, aligning libkcapi behaviour with GNU coreutils, BusyBox, and FreeBSD utilities1

Verification now operates on remaining argv operands, supports multiple checkfiles, and reads from stdin when none are provided.

Split verification logic into process_checkfiles and process_checkfile, reusing a single kcapi_handle across all check files.

Footnotes

  1. https://github.com/smuellerDD/libkcapi/issues/194#issuecomment-3960404275

Align -c/--check with coreutils by treating it as a mode flag instead of an option argument.
Process remaining argv as checkfiles (stdin if none) and split verification logic into process_checkfiles() and process_checkfile().
@smuellerDD
Copy link
Copy Markdown
Owner

Applied, thanks.

@smuellerDD smuellerDD closed this Feb 26, 2026
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.

sha256sum/sha512sum does not validate like coreutils when trying to check via pipe

2 participants