Lines Matching +full:int +full:- +full:property

47 static int
50 int error; in get_objset_type()
55 if (ds->ds_is_snapshot) { in get_objset_type()
58 switch (os->os_phys->os_type) { in get_objset_type()
76 static int
80 int error = get_objset_type(ds, &type); in get_objset_type_name()
100 * Determines the source of a property given its setpoint and
101 * property type. It pushes the source to the lua stack.
123 static int
125 const char *property_name, int error) in zcp_handle_error()
132 "property '%s' is not a valid property on dataset '%s'", in zcp_handle_error()
136 "I/O error while retrieving property '%s' on dataset '%s'", in zcp_handle_error()
140 "retrieving property '%s' on dataset '%s'", in zcp_handle_error()
146 * Look up a user defined property in the zap object. If it exists, push it
149 static int
153 int error; in zcp_get_user_prop()
182 * Check if the property we're looking for is stored in the ds_dir. If so,
184 * the property is not present.
186 static int
190 dsl_dir_t *dd = ds->ds_dir; in get_dsl_dir_prop()
191 mutex_enter(&dd->dd_lock); in get_dsl_dir_prop()
209 mutex_exit(&dd->dd_lock); in get_dsl_dir_prop()
212 mutex_exit(&dd->dd_lock); in get_dsl_dir_prop()
217 * Check if the property we're looking for is stored at the dsl_dataset or
218 * dsl_dir level. If so, push the property value and source onto the lua stack
220 * non-zero error value.
222 static int
226 int error = 0; in get_special_prop()
231 "Internal error - setpoint not determined"; in get_special_prop()
284 dsl_dir_get_origin(ds->ds_dir, strval); in get_special_prop()
323 error = dsl_dir_get_filesystem_count(ds->ds_dir, &numval); in get_special_prop()
327 error = dsl_dir_get_snapshot_count(ds->ds_dir, &numval); in get_special_prop()
338 error = zap_lookup(ds->ds_dir->dd_pool->dp_meta_objset, in get_special_prop()
339 ds->ds_object, DS_FIELD_IVSET_GUID, in get_special_prop()
407 numval = dsl_dir_snap_cmtime(ds->ds_dir).tv_sec; in get_special_prop()
447 * Look up a property and its source in the zap object. If the value is
449 * lua stack and return 0. On failure, return a non-zero error value.
451 static int
454 int error = 0; in get_zap_prop()
501 * Determine whether property is valid for a given dataset
514 if ((zfs_prop == ZFS_PROP_ORIGIN) && (!dsl_dir_is_clone(ds->ds_dir))) in prop_valid_for_ds()
517 int error = get_objset_type(ds, &zfs_type); in prop_valid_for_ds()
524 * Look up a given dataset property. On success return 2, the number of
525 * values pushed to the lua stack (property value and source). On a fatal
528 static int
532 int error; in zcp_get_system_prop()
542 /* Check that the property is valid for the given dataset */ in zcp_get_system_prop()
549 /* Check if the property can be accessed directly */ in zcp_get_system_prop()
578 /* Figure out the property type ({user|group}{quota|used}) */ in get_userquota_prop()
590 * following the '@' in the property name. On success, returns 0. On failure,
591 * returns a non-zero error.
594 static int
606 if (strncmp(cp, "S-1-", 4) == 0) { in parse_userquota_prop()
608 * It's a numeric SID (eg "S-1-234-567-89") and we want to in parse_userquota_prop()
611 int domain_len = strrchr(cp, '-') - cp; in parse_userquota_prop()
633 * Look up {user|group}{quota|used} property for given dataset. On success
637 static int
643 int error; in zcp_get_userquota_prop()
685 * Determines the name of the snapshot referenced in the written property
704 * Look up written@ property for given dataset. On success
708 static int
715 int error = 0; in zcp_get_written_prop()
743 static int zcp_get_prop(lua_State *state);
749 { .za_name = "property", .za_lua_type = LUA_TSTRING },
757 static int
762 dsl_pool_t *dp = zcp_run_info(state)->zri_pool; in zcp_get_prop()
765 zcp_parse_args(state, libinfo->name, libinfo->pargs, libinfo->kwargs); in zcp_get_prop()
770 /* User defined property */ in zcp_get_prop()
775 /* userspace property */ in zcp_get_prop()
786 /* written@ property */ in zcp_get_prop()
793 /* Valid system property */ in zcp_get_prop()
799 /* Invalid property name */ in zcp_get_prop()
801 "'%s' is not a valid property", property_name)); in zcp_get_prop()
804 int
808 lua_setfield(state, -2, zcp_get_prop_info.name); in zcp_load_get_lib()