* Copyright (c) 1993, 1994
* The Regents of the University of California. All rights reserved.
* %sccs.include.redist.c%
static char copyright
[] =
"@(#) Copyright (c) 1993, 1994\n\
The Regents of the University of California. All rights reserved.\n";
static char sccsid
[] = "@(#)mount_ufs.c 8.1 (Berkeley) %G%";
void ufs_usage
__P((void));
static struct mntopt mopts
[] = {
optind
= optreset
= 1; /* Reset for parse of new argv. */
while ((ch
= getopt(argc
, argv
, "o:")) != EOF
)
getmntopts(optarg
, mopts
, &mntflags
);
args
.fspec
= argv
[0]; /* The name of the device file. */
fs_name
= argv
[1]; /* The mount point. */
#define DEFAULT_ROOTUID -2
args
.export
.ex_root
= DEFAULT_ROOTUID
;
if (mntflags
& MNT_RDONLY
)
args
.export
.ex_flags
= MNT_EXRDONLY
;
args
.export
.ex_flags
= 0;
if (mount(MOUNT_UFS
, fs_name
, mntflags
, &args
) < 0) {
(void)fprintf(stderr
, "%s on %s: ", args
.fspec
, fs_name
);
(void)fprintf(stderr
, "mount table full.\n");
if (mntflags
& MNT_UPDATE
)
"Specified device does not match mounted device.\n");
"Incorrect super block.\n");
(void)fprintf(stderr
, "%s\n", strerror(errno
));
(void)fprintf(stderr
, "usage: mount_ufs [-o options] special node\n");