zfs_iter.h revision 230438
1178431Sscf/* 2178431Sscf * CDDL HEADER START 3178431Sscf * 4178431Sscf * The contents of this file are subject to the terms of the 5178431Sscf * Common Development and Distribution License (the "License"). 6178431Sscf * You may not use this file except in compliance with the License. 7178431Sscf * 8178431Sscf * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9178431Sscf * or http://www.opensolaris.org/os/licensing. 10178431Sscf * See the License for the specific language governing permissions 11178431Sscf * and limitations under the License. 12178431Sscf * 13178431Sscf * When distributing Covered Code, include this CDDL HEADER in each 14178431Sscf * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15178431Sscf * If applicable, add the following below this CDDL HEADER, with the 16178431Sscf * fields enclosed by brackets "[]" replaced with your own identifying 17178431Sscf * information: Portions Copyright [yyyy] [name of copyright owner] 18178431Sscf * 19178431Sscf * CDDL HEADER END 20178431Sscf */ 21178431Sscf/* 22178431Sscf * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 23178431Sscf * Use is subject to license terms. 24178431Sscf */ 25178431Sscf 26178431Sscf#ifndef ZFS_ITER_H 27178431Sscf#define ZFS_ITER_H 28178431Sscf 29178431Sscf#ifdef __cplusplus 30178431Sscfextern "C" { 31228545Sbapt#endif 32228545Sbapt 33184831Sscftypedef struct zfs_sort_column { 34228545Sbapt struct zfs_sort_column *sc_next; 35228545Sbapt struct zfs_sort_column *sc_last; 36228545Sbapt zfs_prop_t sc_prop; 37178431Sscf char *sc_user_prop; 38178431Sscf boolean_t sc_reverse; 39184831Sscf} zfs_sort_column_t; 40228545Sbapt 41178431Sscf#define ZFS_ITER_RECURSE (1 << 0) 42178431Sscf#define ZFS_ITER_ARGS_CAN_BE_PATHS (1 << 1) 43178431Sscf#define ZFS_ITER_PROP_LISTSNAPS (1 << 2) 44178431Sscf#define ZFS_ITER_DEPTH_LIMIT (1 << 3) 45228545Sbapt#define ZFS_ITER_RECVD_PROPS (1 << 4) 46178431Sscf#define ZFS_ITER_SIMPLE (1 << 5) 47228545Sbapt 48228545Sbaptint zfs_for_each(int, char **, int options, zfs_type_t, 49228545Sbapt zfs_sort_column_t *, zprop_list_t **, int, zfs_iter_f, void *); 50228545Sbaptint zfs_add_sort_column(zfs_sort_column_t **, const char *, boolean_t); 51228545Sbaptvoid zfs_free_sort_columns(zfs_sort_column_t *); 52228545Sbaptboolean_t zfs_sort_only_by_name(const zfs_sort_column_t *); 53178431Sscf 54228545Sbapt#ifdef __cplusplus 55228545Sbapt} 56228545Sbapt#endif 57228545Sbapt 58228545Sbapt#endif /* ZFS_ITER_H */ 59242319Sbapt