Title: Veritas files system mount form a C program

Hallo all,

I tried to mount a veritas filesystem (VERSION:  3.4,REV=GA03) from a C program.

The program was simple:

#include <stdio.h>
#include <errno.h>
#include <string.h>
#include "/usr/ucbinclude/sys/file.h"
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/mount.h>
#include <sys/mntent.h>
#include <sys/param.h>

main()
{
if (mount("/dev/dsk/c0t2d0s7", "/mnt", (int) 0, "vxfs", (char *) 0, (int) 0, (char *) 0, (int) 0)) {
    printf("errno=%d (%s)\n", errno, strerror(errno));
    }
}

I get the error message:

errno=22 (Invalid argument)

I use gcc 2.95.2. Solaris is 2.8.

Anybody who knows this problem? A mount from the OS works.

regards
Bernd

_______________________________________________
Solaris-Users mailing list
[EMAIL PROTECTED]
http://www.filibeto.org/mailman/listinfo/solaris-users

Reply via email to