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:
@@ -8,6 +8,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
#include <arpa/inet.h>
|
||||||
#ifdef __HAIKU__
|
#ifdef __HAIKU__
|
||||||
#include <fs_volume.h>
|
#include <fs_volume.h>
|
||||||
int mount(const char *filesystem, const char *where, const char *device, ulong flags, void *parameters, size_t len)
|
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
|
#endif
|
||||||
|
|
||||||
|
#define BUFSZ 1024
|
||||||
|
|
||||||
struct mount_nfs_params
|
struct mount_nfs_params
|
||||||
{
|
{
|
||||||
unsigned int serverIP;
|
unsigned int serverIP;
|
||||||
@@ -36,6 +39,7 @@ void usage (const char *exename)
|
|||||||
|
|
||||||
int main (int argc, char **argv)
|
int main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
char buf[BUFSZ];
|
||||||
signal(SIGINT, SIG_IGN);
|
signal(SIGINT, SIG_IGN);
|
||||||
signal(SIGHUP, SIG_IGN);
|
signal(SIGHUP, SIG_IGN);
|
||||||
|
|
||||||
@@ -94,7 +98,15 @@ int main (int argc, char **argv)
|
|||||||
|
|
||||||
params.hostname=hostname;
|
params.hostname=hostname;
|
||||||
|
|
||||||
int result=mount ("nfs",argv[2],NULL,0,¶ms,sizeof(params));
|
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,buf,sizeof(params));
|
||||||
|
//int result=mount ("nfs",argv[2],NULL,0,¶ms,sizeof(params));
|
||||||
|
|
||||||
delete[] server;
|
delete[] server;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user