mirror of
git://projects.qi-hardware.com/fped.git
synced 2024-11-06 02:12:48 +02:00
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
This commit is contained in:
parent
f44accdad7
commit
2de385e9c7
@ -14,6 +14,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#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);
|
||||
|
Loading…
Reference in New Issue
Block a user