=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/patch/pch.c,v retrieving revision 1.54 retrieving revision 1.55 diff -u -r1.54 -r1.55 --- src/usr.bin/patch/pch.c 2015/10/16 07:33:47 1.54 +++ src/usr.bin/patch/pch.c 2016/09/02 09:48:03 1.55 @@ -1,4 +1,4 @@ -/* $OpenBSD: pch.c,v 1.54 2015/10/16 07:33:47 tobias Exp $ */ +/* $OpenBSD: pch.c,v 1.55 2016/09/02 09:48:03 otto Exp $ */ /* * patch - a program to apply diffs to original files @@ -225,8 +225,10 @@ filearg[0] = fetchname(buf, &exists, 0); } if (!exists) { - ask("No file found--skip this patch? [n] "); - if (*buf != 'y') + int def_skip = *bestguess == '\0'; + ask("No file found--skip this patch? [%c] ", + def_skip ? 'y' : 'n'); + if (*buf == 'n' || (!def_skip && *buf != 'y')) continue; if (verbose) say("Skipping patch...\n");