2120 USFIELD_QUOTA
2121 };
2122 static char *us_field_hdr[] = { "TYPE", "NAME", "USED", "QUOTA" };
2123 static char *us_field_names[] = { "type", "name", "used", "quota" };
2124 #define USFIELD_LAST (sizeof (us_field_names) / sizeof (char *))
2125
2126 #define USTYPE_PSX_GRP (1 << 0)
2127 #define USTYPE_PSX_USR (1 << 1)
2128 #define USTYPE_SMB_GRP (1 << 2)
2129 #define USTYPE_SMB_USR (1 << 3)
2130 #define USTYPE_ALL \
2131 (USTYPE_PSX_GRP | USTYPE_PSX_USR | USTYPE_SMB_GRP | USTYPE_SMB_USR)
2132
2133 static int us_type_bits[] = {
2134 USTYPE_PSX_GRP,
2135 USTYPE_PSX_USR,
2136 USTYPE_SMB_GRP,
2137 USTYPE_SMB_USR,
2138 USTYPE_ALL
2139 };
2140 static char *us_type_names[] = { "posixgroup", "posxiuser", "smbgroup",
2141 "smbuser", "all" };
2142
2143 typedef struct us_node {
2144 nvlist_t *usn_nvl;
2145 uu_avl_node_t usn_avlnode;
2146 uu_list_node_t usn_listnode;
2147 } us_node_t;
2148
2149 typedef struct us_cbdata {
2150 nvlist_t **cb_nvlp;
2151 uu_avl_pool_t *cb_avl_pool;
2152 uu_avl_t *cb_avl;
2153 boolean_t cb_numname;
2154 boolean_t cb_nicenum;
2155 boolean_t cb_sid2posix;
2156 zfs_userquota_prop_t cb_prop;
2157 zfs_sort_column_t *cb_sortcol;
2158 size_t cb_width[USFIELD_LAST];
2159 } us_cbdata_t;
2160
|
2120 USFIELD_QUOTA
2121 };
2122 static char *us_field_hdr[] = { "TYPE", "NAME", "USED", "QUOTA" };
2123 static char *us_field_names[] = { "type", "name", "used", "quota" };
2124 #define USFIELD_LAST (sizeof (us_field_names) / sizeof (char *))
2125
2126 #define USTYPE_PSX_GRP (1 << 0)
2127 #define USTYPE_PSX_USR (1 << 1)
2128 #define USTYPE_SMB_GRP (1 << 2)
2129 #define USTYPE_SMB_USR (1 << 3)
2130 #define USTYPE_ALL \
2131 (USTYPE_PSX_GRP | USTYPE_PSX_USR | USTYPE_SMB_GRP | USTYPE_SMB_USR)
2132
2133 static int us_type_bits[] = {
2134 USTYPE_PSX_GRP,
2135 USTYPE_PSX_USR,
2136 USTYPE_SMB_GRP,
2137 USTYPE_SMB_USR,
2138 USTYPE_ALL
2139 };
2140 static char *us_type_names[] = { "posixgroup", "posixuser", "smbgroup",
2141 "smbuser", "all" };
2142
2143 typedef struct us_node {
2144 nvlist_t *usn_nvl;
2145 uu_avl_node_t usn_avlnode;
2146 uu_list_node_t usn_listnode;
2147 } us_node_t;
2148
2149 typedef struct us_cbdata {
2150 nvlist_t **cb_nvlp;
2151 uu_avl_pool_t *cb_avl_pool;
2152 uu_avl_t *cb_avl;
2153 boolean_t cb_numname;
2154 boolean_t cb_nicenum;
2155 boolean_t cb_sid2posix;
2156 zfs_userquota_prop_t cb_prop;
2157 zfs_sort_column_t *cb_sortcol;
2158 size_t cb_width[USFIELD_LAST];
2159 } us_cbdata_t;
2160
|