All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Need Little Help on mounting nfs using mount(2)
  2002-11-21 18:13 Need Little Help on mounting nfs using mount(2) Nilesh Simaria
@ 2002-11-21 17:29 ` H. J. Lu
  0 siblings, 0 replies; 2+ messages in thread
From: H. J. Lu @ 2002-11-21 17:29 UTC (permalink / raw)
  To: Nilesh Simaria; +Cc: 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  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Need Little Help on mounting nfs using mount(2)
@ 2002-11-21 18:13 Nilesh Simaria
  2002-11-21 17:29 ` H. J. Lu
  0 siblings, 1 reply; 2+ messages in thread
From: Nilesh Simaria @ 2002-11-21 18:13 UTC (permalink / raw)
  To: nfs


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  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-11-21 17:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-21 18:13 Need Little Help on mounting nfs using mount(2) Nilesh Simaria
2002-11-21 17:29 ` H. J. Lu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.