From: Scott Lurndal on
SpreadTooThin <bjobrien62(a)gmail.com> writes:
>I am trying to mount a drive from within my C application.
>It would appear that in order to mount a volume I must use the
>mount(2) command from within my C code.
>
>However the man page isn't very informative on the parameters passed
>to the command....
>
>Imagine I want to mount afp://user:password(a)host/dir
>
>How would I format the mount command in C to do this?
>

Generally, user applications are discouraged from directly calling
the mount(2) system call (since, amongst other things, the /etc/mnttab
file maintained by the 'mount(8)' command will become inconsistent).

You should probably use system(3) to invoke the mount(8) command.

scott