hack around to pass a string for now...

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19889 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
François Revol 2007-01-21 11:06:25 +00:00
parent a565f1ff5d
commit 06615cfc7b

View File

@ -8,6 +8,7 @@
#include <unistd.h>
#include <signal.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#ifdef __HAIKU__
#include <fs_volume.h>
int mount(const char *filesystem, const char *where, const char *device, ulong flags, void *parameters, size_t len)
@ -17,6 +18,8 @@ int mount(const char *filesystem, const char *where, const char *device, ulong f
}
#endif
#define BUFSZ 1024
struct mount_nfs_params
{
unsigned int serverIP;
@ -36,6 +39,7 @@ void usage (const char *exename)
int main (int argc, char **argv)
{
char buf[BUFSZ];
signal(SIGINT, SIG_IGN);
signal(SIGHUP, SIG_IGN);
@ -93,8 +97,16 @@ int main (int argc, char **argv)
gethostname (hostname,256);
params.hostname=hostname;
sprintf(buf, "nfs:%s:%s,uid=%u,gid=%u,hostname=%s",
inet_ntoa(*((struct in_addr *)ent->h_addr)),
params._export,
params.uid,
params.gid,
params.hostname);
int result=mount ("nfs",argv[2],NULL,0,&params,sizeof(params));
int result=mount ("nfs",argv[2],NULL,0,buf,sizeof(params));
//int result=mount ("nfs",argv[2],NULL,0,&params,sizeof(params));
delete[] server;