Hello,
I am using mount(2), to mount filesystems using C program. I am able
to do local mounts with that. But I dont know what to fill in
nfs_mount_data structure, to mount nfs filesystem.
Here is the piece of code, I am trying...
structure declarations, from nfs_mount4.h
struct nfs2_fh {
char data[32];
};
struct nfs3_fh {
unsigned short size;
unsigned char data[64];
};
struct nfs_mount_data {
int version;
int fd;
struct nfs2_fh old_root;
int flags;
int rsize;
int wsize;
int timeo;
int retrans;
int acregmin;
int acregmax;
int acdirmin;
int acdirmax;
struct sockaddr_in addr;
char hostname[256];
int namlen;
unsigned int bsize;
struct nfs3_fh root;
};
int main()
{
struct nfs_mount_data data;
mount("192.168.1.102:/home/nilesh","/mnt/mp","nfs",0xC0ED0000,&data);
}
It dosent work and says Invalid arguments. Actually I dont know what to
fill in 'data'.
Can any one please tell me what should I fill in 'data' and pass it to
mount(2) API inorder to mount nfs partition.
Many thanks in advance
Nilesh.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
On Thu, Nov 21, 2002 at 06:13:34PM +0000, Nilesh Simaria wrote:
>
> Hello,
>
> I am using mount(2), to mount filesystems using C program. I am able
> to do local mounts with that. But I dont know what to fill in
> nfs_mount_data structure, to mount nfs filesystem.
>
Check out mount in utils-linux.
H.J.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs