Page MenuHomeFreeBSD

diff: Report I/O errors in Stone algorithm
ClosedPublic

Authored by des on Thu, Feb 5, 3:44 PM.
Tags
None
Referenced Files
F146007760: D55125.id171243.diff
Thu, Feb 26, 11:44 PM
Unknown Object (File)
Wed, Feb 25, 11:25 PM
Unknown Object (File)
Thu, Feb 19, 12:33 AM
Unknown Object (File)
Wed, Feb 18, 3:39 AM
Unknown Object (File)
Mon, Feb 16, 12:10 PM
Unknown Object (File)
Mon, Feb 16, 9:32 AM
Unknown Object (File)
Sat, Feb 14, 11:47 AM
Unknown Object (File)
Wed, Feb 11, 2:29 PM
Subscribers

Details

Summary

In the legacy Stone algorithm, we do a first pass over the files to
check if they're identical before we start diffing them. That code
would correctly set the exit status if an I/O error was encountered,
but would not emit an error message. Do so.

PR: 292198
Fixes: 55f160fb07ea ("diff: Print an error message on I/O error")
MFC after: 1 week
Sponsored by: Klara, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 70432
Build 67315: arc lint + arc unit

Event Timeline

des requested review of this revision.Thu, Feb 5, 3:44 PM
This revision is now accepted and ready to land.Thu, Feb 5, 3:47 PM
olce added inline comments.
usr.bin/diff/diffreg.c
506–509

Putting the assignments in the if makes things less readable, especially given that i and j are not used in the test nor if blocks.

You might want to rename i and j for better clarity.

This revision was automatically updated to reflect the committed changes.