repositories
/
deb_libnfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add example for how to call MOUNT/EXPORT and get the exports list using the raw lowle...
[deb_libnfs.git]
/
lib
/
init.c
diff --git
a/lib/init.c
b/lib/init.c
index fb2ae83512150b4f0eb0114eccbc11ec9b5dcad5..aba7e5e0981205002f1c0ca71586163a8bca5fcc 100644
(file)
--- a/
lib/init.c
+++ b/
lib/init.c
@@
-21,6
+21,8
@@
#include <unistd.h>
#include <string.h>
#include <strings.h>
#include <unistd.h>
#include <string.h>
#include <strings.h>
+#include <stdlib.h>
+#include <rpc/rpc.h>
#include <rpc/xdr.h>
#include "slist.h"
#include "libnfs.h"
#include <rpc/xdr.h>
#include "slist.h"
#include "libnfs.h"
@@
-33,7
+35,6
@@
struct rpc_context *rpc_init_context(void)
rpc = malloc(sizeof(struct rpc_context));
if (rpc == NULL) {
rpc = malloc(sizeof(struct rpc_context));
if (rpc == NULL) {
- printf("Failed to allocate rpc context\n");
return NULL;
}
bzero(rpc, sizeof(struct rpc_context));
return NULL;
}
bzero(rpc, sizeof(struct rpc_context));
@@
-41,14
+42,12
@@
struct rpc_context *rpc_init_context(void)
rpc->encodebuflen = 65536;
rpc->encodebuf = malloc(rpc->encodebuflen);
if (rpc->encodebuf == NULL) {
rpc->encodebuflen = 65536;
rpc->encodebuf = malloc(rpc->encodebuflen);
if (rpc->encodebuf == NULL) {
- printf("Failed to allocate a buffer for rpc encoding\n");
free(rpc);
return NULL;
}
rpc->auth = authunix_create_default();
if (rpc->auth == NULL) {
free(rpc);
return NULL;
}
rpc->auth = authunix_create_default();
if (rpc->auth == NULL) {
- printf("failed to create authunix\n");
free(rpc->encodebuf);
free(rpc);
return NULL;
free(rpc->encodebuf);
free(rpc);
return NULL;