Bug 213007 - [patch] sbin/md5/md5.{c,1} make '-c' flag also work with stdin, add '-P' flag to print digest to stderr
Summary: [patch] sbin/md5/md5.{c,1} make '-c' flag also work with stdin, add '-P' flag...
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2016-09-26 15:53 UTC by Mārcis Lielturks
Modified: 2016-09-26 17:05 UTC (History)
1 user (show)

See Also:


Attachments
sbin/md5/md5.c patch to apply '-c' to stdin input and add '-P' which outputs digest to stderr (3.43 KB, patch)
2016-09-26 15:53 UTC, Mārcis Lielturks
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mārcis Lielturks 2016-09-26 15:53:52 UTC
Created attachment 175182 [details]
sbin/md5/md5.c patch to apply '-c' to stdin input and add '-P' which outputs digest to stderr

I thought that extending '-c' to also verify digest, if it was passed from STDIN, would be useful and allow using md5 in pipeline. For similar reasons I added option '-P', which resembles '-p', only digest is output to STDERR.

I recently had been writing 11.0-RCx images to USB flash several times, I started to use pipeline, which fetches and writes image to USB flash directly, without intermediately storing it on computer. This, however, means that checksum verification was not straight forward.