DF-3243 / mntquota.c
/* mount ufs with MNT_QUOTA directly via mount(2) (mount_ufs userland * dropped the 'quota' option string; kernel still supports it) */ #include <sys/param.h> #include <sys/mount.h> #include <vfs/ufs/ufsmount.h> #include <stdio.h> #include <string.h> #include <errno.h> #include <fcntl.h> int main(int argc, char **argv) { struct ufs_args args; memset(&args, 0, sizeof(args)); args.fspec = argv[1]; int rc = mount("ufs", argv[2], MNT_QUOTA, &args); printf("mount(ufs, %s, MNT_QUOTA) = %d errno=%d\n", argv[2], rc, errno); return rc; } |