usr/src/cmd/zfs/zfs_iter.h
author ck153898
Mon, 12 Feb 2007 11:30:24 -0800
changeset 3635 63e2169c1249
parent 2676 5cee47eddab6
child 5094 71a3e95fb9e2
permissions -rw-r--r--
PSARC 2007/050 zfs list -d 6260523 want 'zfs list <path>'
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     1
/*
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     2
 * CDDL HEADER START
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     3
 *
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     4
 * The contents of this file are subject to the terms of the
2082
76b439ec3ac1 PSARC 2006/223 ZFS Hot Spares
eschrock
parents: 789
diff changeset
     5
 * Common Development and Distribution License (the "License").
76b439ec3ac1 PSARC 2006/223 ZFS Hot Spares
eschrock
parents: 789
diff changeset
     6
 * You may not use this file except in compliance with the License.
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     7
 *
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     8
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
     9
 * or http://www.opensolaris.org/os/licensing.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    10
 * See the License for the specific language governing permissions
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    11
 * and limitations under the License.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    12
 *
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    13
 * When distributing Covered Code, include this CDDL HEADER in each
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    14
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    15
 * If applicable, add the following below this CDDL HEADER, with the
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    16
 * fields enclosed by brackets "[]" replaced with your own identifying
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    17
 * information: Portions Copyright [yyyy] [name of copyright owner]
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    18
 *
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    19
 * CDDL HEADER END
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    20
 */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    21
/*
3635
63e2169c1249 PSARC 2007/050 zfs list -d
ck153898
parents: 2676
diff changeset
    22
 * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    23
 * Use is subject to license terms.
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    24
 */
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    25
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    26
#ifndef	ZFS_ITER_H
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    27
#define	ZFS_ITER_H
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    28
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    29
#pragma ident	"%Z%%M%	%I%	%E% SMI"
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    30
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    31
#ifdef	__cplusplus
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    32
extern "C" {
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    33
#endif
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    34
2379
0ff8239b1e93 PSARC 2006/308 zfs list sort option
sjelinek
parents: 2082
diff changeset
    35
typedef struct zfs_sort_column {
0ff8239b1e93 PSARC 2006/308 zfs list sort option
sjelinek
parents: 2082
diff changeset
    36
	struct zfs_sort_column	*sc_next;
0ff8239b1e93 PSARC 2006/308 zfs list sort option
sjelinek
parents: 2082
diff changeset
    37
	struct zfs_sort_column	*sc_last;
0ff8239b1e93 PSARC 2006/308 zfs list sort option
sjelinek
parents: 2082
diff changeset
    38
	zfs_prop_t		sc_prop;
2676
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents: 2379
diff changeset
    39
	char			*sc_user_prop;
2379
0ff8239b1e93 PSARC 2006/308 zfs list sort option
sjelinek
parents: 2082
diff changeset
    40
	boolean_t		sc_reverse;
0ff8239b1e93 PSARC 2006/308 zfs list sort option
sjelinek
parents: 2082
diff changeset
    41
} zfs_sort_column_t;
0ff8239b1e93 PSARC 2006/308 zfs list sort option
sjelinek
parents: 2082
diff changeset
    42
0ff8239b1e93 PSARC 2006/308 zfs list sort option
sjelinek
parents: 2082
diff changeset
    43
int zfs_for_each(int, char **, boolean_t, zfs_type_t, zfs_sort_column_t *,
3635
63e2169c1249 PSARC 2007/050 zfs list -d
ck153898
parents: 2676
diff changeset
    44
    zfs_proplist_t **, zfs_iter_f, void *, boolean_t);
2676
5cee47eddab6 PSARC 2006/486 ZFS canmount property
eschrock
parents: 2379
diff changeset
    45
int zfs_add_sort_column(zfs_sort_column_t **, const char *, boolean_t);
2379
0ff8239b1e93 PSARC 2006/308 zfs list sort option
sjelinek
parents: 2082
diff changeset
    46
void zfs_free_sort_columns(zfs_sort_column_t *);
789
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    47
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    48
#ifdef	__cplusplus
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    49
}
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    50
#endif
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    51
b348f31ed315 PSARC 2002/240 ZFS
ahrens
parents:
diff changeset
    52
#endif	/* ZFS_ITER_H */