partition.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
d62bc4badc1c1f1549c961cfb8b420e650e1272byz * CDDL HEADER START
a399b7655a1d835aa8606c2b29e4e777baac8635zf * The contents of this file are subject to the terms of the
a399b7655a1d835aa8606c2b29e4e777baac8635zf * Common Development and Distribution License, Version 1.0 only
a399b7655a1d835aa8606c2b29e4e777baac8635zf * (the "License"). You may not use this file except in compliance
a399b7655a1d835aa8606c2b29e4e777baac8635zf * with the License.
a399b7655a1d835aa8606c2b29e4e777baac8635zf * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
a399b7655a1d835aa8606c2b29e4e777baac8635zf * See the License for the specific language governing permissions
a399b7655a1d835aa8606c2b29e4e777baac8635zf * and limitations under the License.
a399b7655a1d835aa8606c2b29e4e777baac8635zf * When distributing Covered Code, include this CDDL HEADER in each
a399b7655a1d835aa8606c2b29e4e777baac8635zf * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
a399b7655a1d835aa8606c2b29e4e777baac8635zf * If applicable, add the following below this CDDL HEADER, with the
a399b7655a1d835aa8606c2b29e4e777baac8635zf * fields enclosed by brackets "[]" replaced with your own identifying
a399b7655a1d835aa8606c2b29e4e777baac8635zf * information: Portions Copyright [yyyy] [name of copyright owner]
a399b7655a1d835aa8606c2b29e4e777baac8635zf * CDDL HEADER END
a399b7655a1d835aa8606c2b29e4e777baac8635zf * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
a399b7655a1d835aa8606c2b29e4e777baac8635zf * Use is subject to license terms.
a399b7655a1d835aa8606c2b29e4e777baac8635zf#pragma ident "%Z%%M% %I% %E% SMI"
fb91fd8a302dfb13e250bbefb6a3970c2edc3ae3zfextern "C" {
a399b7655a1d835aa8606c2b29e4e777baac8635zf * Partition class interface file.
a399b7655a1d835aa8606c2b29e4e777baac8635zf * Local include files
a399b7655a1d835aa8606c2b29e4e777baac8635zf * The partition class stores its attributes as private
a399b7655a1d835aa8606c2b29e4e777baac8635zf * data. Client classes can't access them directly.
a399b7655a1d835aa8606c2b29e4e777baac8635zf * They can only use the services declared in this
a399b7655a1d835aa8606c2b29e4e777baac8635zf * public include file.
a399b7655a1d835aa8606c2b29e4e777baac8635zftypedef void * partition_handle_t;
a399b7655a1d835aa8606c2b29e4e777baac8635zf * IMPORTANT NOTE:
a399b7655a1d835aa8606c2b29e4e777baac8635zf * The strings in the partition_result_codes[] string array in
a399b7655a1d835aa8606c2b29e4e777baac8635zf * partition_private.h MUST match the result types in typdef enum
a399b7655a1d835aa8606c2b29e4e777baac8635zf * partition_result_t below. When you add or remove result
a399b7655a1d835aa8606c2b29e4e777baac8635zf * types, keep the result types and the matching strings in
a399b7655a1d835aa8606c2b29e4e777baac8635zf * alphabetical order to make it easier to maintain the match.
a399b7655a1d835aa8606c2b29e4e777baac8635zftypedef enum partition_result {
a399b7655a1d835aa8606c2b29e4e777baac8635zf * Creates a partition object that models the top-level
a399b7655a1d835aa8606c2b29e4e777baac8635zf * partition on the medium modeled by the medium object
a399b7655a1d835aa8606c2b29e4e777baac8635zf * whose handle is on_mediump. Writes a handle to the
a399b7655a1d835aa8606c2b29e4e777baac8635zf * object to the partition handle addressed by partitionpp.
a399b7655a1d835aa8606c2b29e4e777baac8635zf * If it can't create the object it returns an error code
a399b7655a1d835aa8606c2b29e4e777baac8635zf * and nulls the partition handle.
a399b7655a1d835aa8606c2b29e4e777baac8635zf * Destroys the partition object whose handle is addressed
a399b7655a1d835aa8606c2b29e4e777baac8635zf * by partitionpp. Nulls the handle.
a399b7655a1d835aa8606c2b29e4e777baac8635zf * Mounts the partition modeled by the partition object addressed by
a399b7655a1d835aa8606c2b29e4e777baac8635zf * partitionp.
a399b7655a1d835aa8606c2b29e4e777baac8635zf * Returns the number of different partition types currently supported
a399b7655a1d835aa8606c2b29e4e777baac8635zf * by the partition class.
a399b7655a1d835aa8606c2b29e4e777baac8635zf * Creates vnodes that link the file system to the partition
a399b7655a1d835aa8606c2b29e4e777baac8635zf * modeled by the partition object addressed by partitionp.
a399b7655a1d835aa8606c2b29e4e777baac8635zf * Remounts the partition modeled by the partition object addressed by
a399b7655a1d835aa8606c2b29e4e777baac8635zf * partitionp.
a399b7655a1d835aa8606c2b29e4e777baac8635zf * Unmounts the partition modeled by the partition object addressed
a399b7655a1d835aa8606c2b29e4e777baac8635zf * by partitionp.
a399b7655a1d835aa8606c2b29e4e777baac8635zf#endif /* __PARTITION_H */