obj.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef __OBJ_H
#define __OBJ_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* local include files
*/
#include "partition.h"
/*
* Object types
*/
#ifdef notdef
#endif
/*
* These are the object independent attributes, and control
* structures.
*/
typedef struct obj {
struct q q; /* for future use */
char *o_name; /* name of the object */
char *o_dir; /* directory it lives in */
char *o_props; /* property string for object */
} obj_t;
#define OBJ_UP_NAME 0x001
#define OBJ_UP_DIR 0x002
#define OBJ_UP_UID 0x004
#define OBJ_UP_GID 0x008
#define OBJ_UP_MODE 0x010
#define OBJ_UP_ATIME 0x020
#define OBJ_UP_CTIME 0x040
#define OBJ_UP_MTIME 0x080
#define OBJ_UP_LABEL 0x100
#define OBJ_UP_LOC 0x200
#define OBJ_UP_FLAGS 0x400
#define OBJ_UP_NLINKS 0x800
/*
* define enum for file systems supported by volmgt
*/
typedef enum volfs {
} volfs_t;
/*
* The volume object.
*/
typedef struct vol {
char *v_mtype; /* volume type (cdrom, floppy, ..) */
char *v_location; /* location string */
struct clue {
} v_clue; /* Hint for the various user friendy action features */
} vol_t;
/*
* fields in v_flags
*/
/*
* Defs to identify partitions
*/
/* for pcfs, currently only supporting 4, will change for extended p's */
/* for ufs, id'ing max of 16 slices */
#define V_S5 0x20
#define V_S6 0x40
#define V_S7 0x80
#define V_S8 0x100
#define V_S9 0x200
#define V_S10 0x400
#define V_S11 0x800
#define V_S12 0x1000
#define V_S13 0x2000
#define V_S14 0x4000
#define V_S15 0x8000
/* disk partition information */
#ifdef TAPES_SUPPORTED
/* tape behavior */
#endif
/* tape and floppy densities */
#ifdef notdef
#endif
/*
* The directory object.
*/
typedef struct dirat {
int da_pad[10];
} dirat_t;
/*
* For the links, we keep the pointers as paths, and only resolve
* them to a vvnode when we actually do the lookup on them.
*/
/*
* The symbolic link object.
*/
typedef struct symat {
char *sla_ptr; /* who it points at */
int sla_pad[10];
} symat_t;
/*
* The hard link object.
*/
typedef struct linkat {
int la_pad[10];
} linkat_t;
/*
* The partition object.
*/
typedef struct partat {
int pa_pad[10];
} partat_t;
/*
* change the attribute of a database object.
*/
/*
* these only apply to volumes
*/
extern char *obj_basepath(obj_t *);
#ifdef __cplusplus
}
#endif
#endif /* __OBJ_H */