*** empty log message ***

svn path=/trunk/boinc/; revision=10290
This commit is contained in:
David Anderson 2006-06-09 22:53:24 +00:00
parent eb9fc95945
commit 8b53c08ffb
3 changed files with 16 additions and 1 deletions

View File

@ -168,7 +168,7 @@
#define ERR_WRONG_URL -219
#define ERR_DUP_NAME -220
#define ERR_ABORTED_BY_PROJECT -221
#define ERR_GETGRNAM -222
// PLEASE: add a text description of your error to
// the text description function boincerror() in util.C.

View File

@ -40,6 +40,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <grp.h>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
@ -1023,6 +1024,7 @@ const char* boincerror(int which_error) {
case ERR_FSYNC: return "Couldn't sync file";
case ERR_TRUNCATE: return "Couldn't truncate file";
case ERR_ABORTED_BY_PROJECT: return "Aborted by project";
case ERR_GETGRNAM: return "Group not found";
case 404: return "HTTP file not found";
case 407: return "HTTP proxy authentication failure";
case 416: return "HTTP range request error";
@ -1037,4 +1039,13 @@ const char* boincerror(int which_error) {
return buf;
}
#ifndef _WIN32
int lookup_group(char* name, gid_t& gid) {
struct group* gp = getgrnam(name);
if (!gp) return ERR_GETGRNAM;
gid = gp->gr_gid;
return 0;
}
#endif
const char *BOINC_RCSID_ab65c90e1e = "$Id$";

View File

@ -130,4 +130,8 @@ extern void mysql_timestamp(double, char*);
//
extern const char* boincerror(int which_error);
#ifndef _WIN32
extern int lookup_group(char*, gid_t& gid);
#endif
#endif