aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/patch/patch.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/patch/patch.c')
-rw-r--r--usr.bin/patch/patch.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/patch/patch.c b/usr.bin/patch/patch.c
index a23fc82d3d90..48d3bd37fe5b 100644
--- a/usr.bin/patch/patch.c
+++ b/usr.bin/patch/patch.c
@@ -463,9 +463,13 @@ main(int argc, char *argv[])
if (!check_only)
say("%d out of %d hunks %s--saving rejects to %s\n",
failed, hunk, skip_rest_of_patch ? "ignored" : "failed", rejname);
- else
+ else if (filearg[0] != NULL)
say("%d out of %d hunks %s while patching %s\n",
failed, hunk, skip_rest_of_patch ? "ignored" : "failed", filearg[0]);
+ else
+ /* File prompt ignored, just note # hunks. */
+ say("%d out of %d hunks %s\n",
+ failed, hunk, skip_rest_of_patch ? "ignored" : "failed");
if (!check_only && move_file(TMPREJNAME, rejname) < 0)
trejkeep = true;
}