76ca3cb000306bc4052fe820a7e4a6998dbcf932Robert Mustacchi * CDDL HEADER START
76ca3cb000306bc4052fe820a7e4a6998dbcf932Robert Mustacchi * The contents of this file are subject to the terms of the
76ca3cb000306bc4052fe820a7e4a6998dbcf932Robert Mustacchi * Common Development and Distribution License (the "License").
76ca3cb000306bc4052fe820a7e4a6998dbcf932Robert Mustacchi * You may not use this file except in compliance with the License.
76ca3cb000306bc4052fe820a7e4a6998dbcf932Robert Mustacchi * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
76ca3cb000306bc4052fe820a7e4a6998dbcf932Robert Mustacchi * or http://www.opensolaris.org/os/licensing.
76ca3cb000306bc4052fe820a7e4a6998dbcf932Robert Mustacchi * See the License for the specific language governing permissions
76ca3cb000306bc4052fe820a7e4a6998dbcf932Robert Mustacchi * and limitations under the License.
76ca3cb000306bc4052fe820a7e4a6998dbcf932Robert Mustacchi * When distributing Covered Code, include this CDDL HEADER in each
76ca3cb000306bc4052fe820a7e4a6998dbcf932Robert Mustacchi * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
76ca3cb000306bc4052fe820a7e4a6998dbcf932Robert Mustacchi * If applicable, add the following below this CDDL HEADER, with the
76ca3cb000306bc4052fe820a7e4a6998dbcf932Robert Mustacchi * fields enclosed by brackets "[]" replaced with your own identifying
76ca3cb000306bc4052fe820a7e4a6998dbcf932Robert Mustacchi * information: Portions Copyright [yyyy] [name of copyright owner]
76ca3cb000306bc4052fe820a7e4a6998dbcf932Robert Mustacchi * CDDL HEADER END
76ca3cb000306bc4052fe820a7e4a6998dbcf932Robert Mustacchi * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
76ca3cb000306bc4052fe820a7e4a6998dbcf932Robert Mustacchi * Use is subject to license terms.
76ca3cb000306bc4052fe820a7e4a6998dbcf932Robert Mustacchi * Copyright (c) 2014 Joyent, Inc. All rights reserved.
76ca3cb000306bc4052fe820a7e4a6998dbcf932Robert Mustacchistatic char optbuf[MAX_MNTOPT_STR] = { '\0', };
76ca3cb000306bc4052fe820a7e4a6998dbcf932Robert Mustacchi "Usage: mount [-Ormq] [-o options] special mountpoint\n");
76ca3cb000306bc4052fe820a7e4a6998dbcf932Robert Mustacchi * usage: mount [-Ormq] [-o options] special mountp
76ca3cb000306bc4052fe820a7e4a6998dbcf932Robert Mustacchi * This mount program is exec'ed by /usr/sbin/mount if '-F bootfs' is
76ca3cb000306bc4052fe820a7e4a6998dbcf932Robert Mustacchi char *mountp; /* Entity being mounted on */
76ca3cb000306bc4052fe820a7e4a6998dbcf932Robert Mustacchi (void) snprintf(typename, sizeof (typename), "%s %s", MNTTYPE_BOOTFS,
76ca3cb000306bc4052fe820a7e4a6998dbcf932Robert Mustacchi while ((c = getopt(argc, argv, "o:rmOq")) != EOF) {
76ca3cb000306bc4052fe820a7e4a6998dbcf932Robert Mustacchi if (strlcpy(optbuf, optarg, sizeof (optbuf)) >=
76ca3cb000306bc4052fe820a7e4a6998dbcf932Robert Mustacchi if ((savedoptbuf = strdup(optbuf)) == NULL) {
76ca3cb000306bc4052fe820a7e4a6998dbcf932Robert Mustacchi (void) fprintf(stderr, gettext("%s: out of memory\n"),
76ca3cb000306bc4052fe820a7e4a6998dbcf932Robert Mustacchi if (mount(special, mountp, flags | MS_OPTIONSTR, MNTTYPE_BOOTFS, NULL,