Home | History | Annotate | Download | only in zfs
      1    789    ahrens /*
      2    789    ahrens  * CDDL HEADER START
      3    789    ahrens  *
      4    789    ahrens  * The contents of this file are subject to the terms of the
      5   2082  eschrock  * Common Development and Distribution License (the "License").
      6   2082  eschrock  * You may not use this file except in compliance with the License.
      7    789    ahrens  *
      8    789    ahrens  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
      9    789    ahrens  * or http://www.opensolaris.org/os/licensing.
     10    789    ahrens  * See the License for the specific language governing permissions
     11    789    ahrens  * and limitations under the License.
     12    789    ahrens  *
     13    789    ahrens  * When distributing Covered Code, include this CDDL HEADER in each
     14    789    ahrens  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     15    789    ahrens  * If applicable, add the following below this CDDL HEADER, with the
     16    789    ahrens  * fields enclosed by brackets "[]" replaced with your own identifying
     17    789    ahrens  * information: Portions Copyright [yyyy] [name of copyright owner]
     18    789    ahrens  *
     19    789    ahrens  * CDDL HEADER END
     20    789    ahrens  */
     21    789    ahrens /*
     22   9365     Chris  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
     23    789    ahrens  * Use is subject to license terms.
     24    789    ahrens  */
     25    789    ahrens 
     26    789    ahrens #ifndef	ZFS_ITER_H
     27    789    ahrens #define	ZFS_ITER_H
     28    789    ahrens 
     29    789    ahrens #ifdef	__cplusplus
     30    789    ahrens extern "C" {
     31    789    ahrens #endif
     32    789    ahrens 
     33   2379  sjelinek typedef struct zfs_sort_column {
     34   2379  sjelinek 	struct zfs_sort_column	*sc_next;
     35   2379  sjelinek 	struct zfs_sort_column	*sc_last;
     36   2379  sjelinek 	zfs_prop_t		sc_prop;
     37   2676  eschrock 	char			*sc_user_prop;
     38   2379  sjelinek 	boolean_t		sc_reverse;
     39   2379  sjelinek } zfs_sort_column_t;
     40   2379  sjelinek 
     41   7538   Richard #define	ZFS_ITER_RECURSE	   (1 << 0)
     42   7538   Richard #define	ZFS_ITER_ARGS_CAN_BE_PATHS (1 << 1)
     43   7538   Richard #define	ZFS_ITER_PROP_LISTSNAPS    (1 << 2)
     44   9365     Chris #define	ZFS_ITER_DEPTH_LIMIT	   (1 << 3)
     45  11022       Tom #define	ZFS_ITER_RECVD_PROPS	   (1 << 4)
     46   7538   Richard 
     47   7538   Richard int zfs_for_each(int, char **, int options, zfs_type_t,
     48   9365     Chris     zfs_sort_column_t *, zprop_list_t **, int, zfs_iter_f, void *);
     49   2676  eschrock int zfs_add_sort_column(zfs_sort_column_t **, const char *, boolean_t);
     50   2379  sjelinek void zfs_free_sort_columns(zfs_sort_column_t *);
     51    789    ahrens 
     52    789    ahrens #ifdef	__cplusplus
     53    789    ahrens }
     54    789    ahrens #endif
     55    789    ahrens 
     56    789    ahrens #endif	/* ZFS_ITER_H */
     57