NFS mount System Call in linux

后端 未结 3 1599
时光说笑
时光说笑 2021-01-06 03:48

I am trying to mount a source directory from nfs server to a destination directory in embedded board having linux. The following command works perfectly as expected in shell

3条回答
  •  情书的邮戳
    2021-01-06 04:38

    It solved by the following call for me now.

    if(system("mount -t nfs -o nolock 10.126.62.45:/vol/home/avinoba/Sky /mnt")==-1);
    {
         printf("ERROR: mount failed \n");
    }
    

    But still searching for the answer with mount() call as it accepts 'filesystemtype' argument as "nfs".

提交回复
热议问题