Deleted Added
full compact
zpool_prop.c (236839) zpool_prop.c (243674)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 65 unchanged lines hidden (view full) ---

74 zprop_register_string(ZPOOL_PROP_COMMENT, "comment", NULL,
75 PROP_DEFAULT, ZFS_TYPE_POOL, "<comment-string>", "COMMENT");
76
77 /* readonly number properties */
78 zprop_register_number(ZPOOL_PROP_SIZE, "size", 0, PROP_READONLY,
79 ZFS_TYPE_POOL, "<size>", "SIZE");
80 zprop_register_number(ZPOOL_PROP_FREE, "free", 0, PROP_READONLY,
81 ZFS_TYPE_POOL, "<size>", "FREE");
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 65 unchanged lines hidden (view full) ---

74 zprop_register_string(ZPOOL_PROP_COMMENT, "comment", NULL,
75 PROP_DEFAULT, ZFS_TYPE_POOL, "<comment-string>", "COMMENT");
76
77 /* readonly number properties */
78 zprop_register_number(ZPOOL_PROP_SIZE, "size", 0, PROP_READONLY,
79 ZFS_TYPE_POOL, "<size>", "SIZE");
80 zprop_register_number(ZPOOL_PROP_FREE, "free", 0, PROP_READONLY,
81 ZFS_TYPE_POOL, "<size>", "FREE");
82 zprop_register_number(ZPOOL_PROP_FREEING, "freeing", 0, PROP_READONLY,
83 ZFS_TYPE_POOL, "<size>", "FREEING");
82 zprop_register_number(ZPOOL_PROP_ALLOCATED, "allocated", 0,
83 PROP_READONLY, ZFS_TYPE_POOL, "<size>", "ALLOC");
84 zprop_register_number(ZPOOL_PROP_EXPANDSZ, "expandsize", 0,
85 PROP_READONLY, ZFS_TYPE_POOL, "<size>", "EXPANDSZ");
86 zprop_register_number(ZPOOL_PROP_CAPACITY, "capacity", 0, PROP_READONLY,
87 ZFS_TYPE_POOL, "<size>", "CAP");
88 zprop_register_number(ZPOOL_PROP_GUID, "guid", 0, PROP_READONLY,
89 ZFS_TYPE_POOL, "<guid>", "GUID");

--- 71 unchanged lines hidden (view full) ---

161}
162
163uint64_t
164zpool_prop_default_numeric(zpool_prop_t prop)
165{
166 return (zpool_prop_table[prop].pd_numdefault);
167}
168
84 zprop_register_number(ZPOOL_PROP_ALLOCATED, "allocated", 0,
85 PROP_READONLY, ZFS_TYPE_POOL, "<size>", "ALLOC");
86 zprop_register_number(ZPOOL_PROP_EXPANDSZ, "expandsize", 0,
87 PROP_READONLY, ZFS_TYPE_POOL, "<size>", "EXPANDSZ");
88 zprop_register_number(ZPOOL_PROP_CAPACITY, "capacity", 0, PROP_READONLY,
89 ZFS_TYPE_POOL, "<size>", "CAP");
90 zprop_register_number(ZPOOL_PROP_GUID, "guid", 0, PROP_READONLY,
91 ZFS_TYPE_POOL, "<guid>", "GUID");

--- 71 unchanged lines hidden (view full) ---

163}
164
165uint64_t
166zpool_prop_default_numeric(zpool_prop_t prop)
167{
168 return (zpool_prop_table[prop].pd_numdefault);
169}
170
171/*
172 * Returns true if this is a valid feature@ property.
173 */
174boolean_t
175zpool_prop_feature(const char *name)
176{
177 static const char *prefix = "feature@";
178 return (strncmp(name, prefix, strlen(prefix)) == 0);
179}
180
181/*
182 * Returns true if this is a valid unsupported@ property.
183 */
184boolean_t
185zpool_prop_unsupported(const char *name)
186{
187 static const char *prefix = "unsupported@";
188 return (strncmp(name, prefix, strlen(prefix)) == 0);
189}
190
169int
170zpool_prop_string_to_index(zpool_prop_t prop, const char *string,
171 uint64_t *index)
172{
173 return (zprop_string_to_index(prop, string, index, ZFS_TYPE_POOL));
174}
175
176int

--- 32 unchanged lines hidden ---
191int
192zpool_prop_string_to_index(zpool_prop_t prop, const char *string,
193 uint64_t *index)
194{
195 return (zprop_string_to_index(prop, string, index, ZFS_TYPE_POOL));
196}
197
198int

--- 32 unchanged lines hidden ---