OSDN Git Service
(root)
/
uclinux-h8
/
uClibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
90cecc7
)
Re-enable clnt_perror. Patch from Miles Bader.
author
Eric Andersen
<andersen@codepoet.org>
Tue, 9 Apr 2002 16:28:10 +0000
(16:28 -0000)
committer
Eric Andersen
<andersen@codepoet.org>
Tue, 9 Apr 2002 16:28:10 +0000
(16:28 -0000)
libc/inet/rpc/clnt_perror.c
patch
|
blob
|
history
diff --git
a/libc/inet/rpc/clnt_perror.c
b/libc/inet/rpc/clnt_perror.c
index
a3a119d
..
a4d1737
100644
(file)
--- a/
libc/inet/rpc/clnt_perror.c
+++ b/
libc/inet/rpc/clnt_perror.c
@@
-36,18
+36,18
@@
* Copyright (C) 1984, Sun Microsystems, Inc.
*
*/
* Copyright (C) 1984, Sun Microsystems, Inc.
*
*/
+
#include <stdio.h>
#include <stdio.h>
+#include <string.h>
#include <rpc/types.h>
#include <rpc/auth.h>
#include <rpc/clnt.h>
#include <rpc/types.h>
#include <rpc/auth.h>
#include <rpc/clnt.h>
-//extern char *sys_errlist[];
-//static char *auth_errmsg();
+static char *auth_errmsg();
extern char *strcpy();
extern char *strcpy();
-#if 0
static char *buf;
static char *_buf()
static char *buf;
static char *_buf()
@@
-57,14
+57,12
@@
static char *_buf()
buf = (char *) malloc(256);
return (buf);
}
buf = (char *) malloc(256);
return (buf);
}
-#endif
/*
* Print reply error info
*/
char *clnt_sperror __P ((CLIENT *rpch, const char *s))
{
/*
* Print reply error info
*/
char *clnt_sperror __P ((CLIENT *rpch, const char *s))
{
-#if 0
struct rpc_err e;
void clnt_perrno();
char *err;
struct rpc_err e;
void clnt_perrno();
char *err;
@@
-99,7
+97,7
@@
char *clnt_sperror __P ((CLIENT *rpch, const char *s))
case RPC_CANTSEND:
case RPC_CANTRECV:
case RPC_CANTSEND:
case RPC_CANTRECV:
- (void) sprintf(str, "; errno = %s", s
ys_errlist[e.re_errno]
);
+ (void) sprintf(str, "; errno = %s", s
trerror (e.re_errno)
);
str += strlen(str);
break;
str += strlen(str);
break;
@@
-139,8
+137,6
@@
char *clnt_sperror __P ((CLIENT *rpch, const char *s))
}
(void) sprintf(str, "\n");
return (strstart);
}
(void) sprintf(str, "\n");
return (strstart);
-#endif
- return (0);
}
void clnt_perror __P ((CLIENT *rpch, const char *s))
}
void clnt_perror __P ((CLIENT *rpch, const char *s))
@@
-223,8
+219,6
@@
enum clnt_stat num;
char *clnt_spcreateerror __P ((__const char *s))
{
#if 0
char *clnt_spcreateerror __P ((__const char *s))
{
#if 0
- extern int sys_nerr;
- extern char *sys_errlist[];
char *str = _buf();
if (str == 0)
char *str = _buf();
if (str == 0)
@@
-239,13
+233,11
@@
char *clnt_spcreateerror __P ((__const char *s))
case RPC_SYSTEMERROR:
(void) strcat(str, " - ");
case RPC_SYSTEMERROR:
(void) strcat(str, " - ");
- if (rpc_createerr.cf_error.re_errno > 0
- && rpc_createerr.cf_error.re_errno < sys_nerr)
- (void) strcat(str,
- sys_errlist[rpc_createerr.cf_error.re_errno]);
+ if (rpc_createerr.cf_error.re_errno > 0)
+ (void) strcat(str, strerror (rpc_createerr.cf_error.re_errno));
else
else
- (void
)
sprintf(&str[strlen(str)], "Error %d",
-
rpc_createerr.cf_error.re_errno);
+ (void
)
sprintf(&str[strlen(str)], "Error %d",
+ rpc_createerr.cf_error.re_errno);
break;
}
(void) strcat(str, "\n");
break;
}
(void) strcat(str, "\n");
@@
-264,7
+256,6
@@
struct auth_errtab {
char *message;
};
char *message;
};
-#if 0
static struct auth_errtab auth_errlist[] = {
{AUTH_OK,
"Authentication OK"},
static struct auth_errtab auth_errlist[] = {
{AUTH_OK,
"Authentication OK"},
@@
-296,4
+287,3
@@
enum auth_stat stat;
}
return (NULL);
}
}
return (NULL);
}
-#endif