Bug 11711 - dd no longer reports errors when it cannot write full records
Summary: dd no longer reports errors when it cannot write full records
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Standard Compliance (show other bugs)
Version: 1.30.x
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-05 11:23 UTC by pete.shanahan
Modified: 2019-05-14 15:49 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
patch for the coreutils/dd.c source to do the correct check (761 bytes, text/plain)
2019-03-05 11:23 UTC, pete.shanahan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pete.shanahan 2019-03-05 11:23:49 UTC
Created attachment 7966 [details]
patch for the coreutils/dd.c source to do the correct check

This patch: https://git.busybox.net/busybox/commit/?h=1_30_stable&id=394eebed6656dfc2e56a79500b602023000ac415

has caused a regression in dd, where it no longer reports errors when unable to write to the disk e.g. out of space.

The problem is the underlying full_write call no longer returns -1 on error.

All consumers should be checked for this condition, and changed to check for -1 or an incomplete write
Comment 1 pete.shanahan 2019-03-05 11:35:48 UTC
A quick look through the code seems to indicate that dd is the only one with the problem.
Comment 2 Denys Vlasenko 2019-05-14 15:49:44 UTC
Fixed in git, thanks!