diff --git a/usr.bin/patch/patch.c b/usr.bin/patch/patch.c --- a/usr.bin/patch/patch.c +++ b/usr.bin/patch/patch.c @@ -463,9 +463,13 @@ 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; }