dd: do not show zero multiplier warning when zero is the multiplicand (#11673)

* dd: do not show zero multiplier warning when zero is the multiplicand

* tests/dd: test zero multiplier warning when zero is the multiplicand
This commit is contained in:
Ibrahim Burak Yorulmaz
2026-04-06 08:16:40 +02:00
committed by GitHub
parent fca0d0416c
commit db9a111c18
2 changed files with 9 additions and 2 deletions
+7
View File
@@ -263,6 +263,13 @@ fn test_zero_multiplier_warning() {
.succeeds()
.no_stdout()
.stderr_contains("warning: '0x' is a zero multiplier; use '00x' if that is intended");
new_ucmd!()
.args(&[format!("{arg}=0x0x0").as_str(), "status=none"])
.pipe_in("")
.succeeds()
.no_stdout()
.stderr_is("dd: warning: '0x' is a zero multiplier; use '00x' if that is intended\ndd: warning: '0x' is a zero multiplier; use '00x' if that is intended\n");
}
}