When attempting to mount shared folders via C code, getting error 71 (Protocol Error).
I am NOT running the program from the mount folder.
I have tried using a different name for the share and the mount target but that did not help.
When I manually mount, it works.
Code: Select all
mount -t vboxsf vm_shared /mnt/vm_sharedTest Code:
Code: Select all
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/mount.h>
void main(void)
{
int r;
r = mount("vm_shared", "/mnt/vm_shared", "vboxsf", 0, "user,exec,rw");
if(r == -1)
printf("%d - %s\n", errno, strerror(errno));
}Any ideas?
Thank you.