From 2de385e9c731ccec8569461b3ebe65be1471d253 Mon Sep 17 00:00:00 2001 From: werner Date: Wed, 23 Mar 2011 08:07:31 +0000 Subject: [PATCH] hack: set errno to ENOENT when -1 fails, so that the error isn't too ugly The caller assumes that any error would be signaled via errno. A proper solution would be to allow also for non-errno errors. git-svn-id: http://svn.openmoko.org/trunk/eda/fped@6004 99fdad57-331a-0410-800a-d7fa5415bdb3 --- postscript.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/postscript.c b/postscript.c index ccdd03b..caf671b 100644 --- a/postscript.c +++ b/postscript.c @@ -14,6 +14,7 @@ #include #include #include +#include #include "util.h" #include "coord.h" @@ -1095,6 +1096,7 @@ static int ps_for_all_pkg(FILE *file, pages++; if (one && !pages) { fprintf(stderr, "no package \"%s\" to select\n", one); + errno = ENOENT; return 0; } prologue(file, pages);