Update for proplib(3) API changes.

This commit is contained in:
thorpej 2020-06-07 00:51:48 +00:00
parent bcd1eb151d
commit bba3c68329
6 changed files with 85 additions and 84 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: config.c,v 1.5 2009/04/15 00:37:05 lukem Exp $ */
/* $NetBSD: config.c,v 1.6 2020/06/07 00:54:22 thorpej Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: config.c,v 1.5 2009/04/15 00:37:05 lukem Exp $");
__RCSID("$NetBSD: config.c,v 1.6 2020/06/07 00:54:22 thorpej Exp $");
#include <sys/time.h>
#include <prop/proplib.h>
@ -114,7 +114,7 @@ lookup_key(bdaddr_t *laddr, bdaddr_t *raddr)
return NULL;
}
memcpy(key, prop_data_data_nocopy(obj), sizeof(key));
memcpy(key, prop_data_value(obj), sizeof(key));
prop_object_release(cfg);
return key;
}
@ -156,7 +156,7 @@ save_key(bdaddr_t *laddr, bdaddr_t *raddr, uint8_t *key)
prop_object_release(dev);
}
dat = prop_data_create_data_nocopy(key, HCI_KEY_SIZE);
dat = prop_data_create_nocopy(key, HCI_KEY_SIZE);
if (dat == NULL) {
syslog(LOG_ERR, "Cannot create data object: %m");
prop_object_release(cfg);

View File

@ -1,4 +1,4 @@
/* $NetBSD: config.c,v 1.12 2011/08/31 13:32:36 joerg Exp $ */
/* $NetBSD: config.c,v 1.13 2020/06/07 00:51:48 thorpej Exp $ */
/*-
* Copyright (c) 2007 Juan Romero Pardines.
@ -27,7 +27,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: config.c,v 1.12 2011/08/31 13:32:36 joerg Exp $");
__RCSID("$NetBSD: config.c,v 1.13 2020/06/07 00:51:48 thorpej Exp $");
#endif /* not lint */
#include <stdio.h>
@ -107,8 +107,8 @@ config_dict_add_prop(const char *key, char *value)
err(EXIT_FAILURE, "sensordict");
}
if (!prop_dictionary_set_cstring(sensordict, key, value))
err(EXIT_FAILURE, "prop_dict_set_cstring");
if (!prop_dictionary_set_string(sensordict, key, value))
err(EXIT_FAILURE, "prop_dict_set_string");
}
/*
@ -258,7 +258,7 @@ config_dict_destroy(prop_dictionary_t d)
while ((obj = prop_object_iterator_next(iter)) != NULL) {
prop_dictionary_remove(d,
prop_dictionary_keysym_cstring_nocopy(obj));
prop_dictionary_keysym_value(obj));
prop_object_iterator_reset(iter);
}
@ -292,7 +292,7 @@ config_devblock_add(const char *key, prop_dictionary_t kdict)
SLIST_FOREACH(sb, &sensor_block_list, sb_head) {
/* get the index object value from configuration */
lindex = prop_dictionary_get(sb->dict, "index");
sensor = prop_string_cstring_nocopy(lindex);
sensor = prop_string_value(lindex);
iter = prop_array_iterator(array);
if (!iter)
@ -407,7 +407,7 @@ config_devblock_getdict(const char *dvname, const char *sensor_key)
while ((obj = prop_object_iterator_next(iter)) != NULL) {
obj2 = prop_dictionary_get(obj, "index");
if (prop_string_equals_cstring(obj2, sensor_key))
if (prop_string_equals_string(obj2, sensor_key))
break;
}
@ -425,7 +425,8 @@ config_devblock_check_sensorprops(prop_dictionary_t ksdict,
const char *sensor)
{
prop_object_t obj, obj2, obj3;
char *strval, *endptr;
const char *strval;
char *endptr;
double val;
/*
@ -435,7 +436,7 @@ config_devblock_check_sensorprops(prop_dictionary_t ksdict,
if (obj) {
obj2 = prop_dictionary_get(ksdict, "allow-rfact");
if (prop_bool_true(obj2)) {
strval = prop_string_cstring(obj);
strval = prop_string_value(obj);
val = strtod(strval, &endptr);
if (*endptr != '\0')
config_errmsg(VALUE_ERR, "rfact", sensor);
@ -454,7 +455,7 @@ config_devblock_check_sensorprops(prop_dictionary_t ksdict,
obj2 = prop_dictionary_get(ksdict, "want-percentage");
obj3 = prop_dictionary_get(ksdict, "monitoring-supported");
if (prop_bool_true(obj2) && prop_bool_true(obj3)) {
strval = prop_string_cstring(obj);
strval = prop_string_value(obj);
val = strtod(strval, &endptr);
if ((*endptr != '\0') || (val < 0 || val > 100))
config_errmsg(VALUE_ERR,
@ -464,7 +465,7 @@ config_devblock_check_sensorprops(prop_dictionary_t ksdict,
* Convert the value to a valid percentage.
*/
obj = prop_dictionary_get(ksdict, "max-value");
val = (val / 100) * prop_number_integer_value(obj);
val = (val / 100) * prop_number_signed_value(obj);
if (!prop_dictionary_set_uint32(csdict,
"critical-capacity",
@ -482,7 +483,7 @@ config_devblock_check_sensorprops(prop_dictionary_t ksdict,
obj2 = prop_dictionary_get(ksdict, "want-percentage");
obj3 = prop_dictionary_get(ksdict, "monitoring-supported");
if (prop_bool_true(obj2) && prop_bool_true(obj3)) {
strval = prop_string_cstring(obj);
strval = prop_string_value(obj);
val = strtod(strval, &endptr);
if ((*endptr != '\0') || (val < 0 || val > 100))
config_errmsg(VALUE_ERR,
@ -492,7 +493,7 @@ config_devblock_check_sensorprops(prop_dictionary_t ksdict,
* Convert the value to a valid percentage.
*/
obj = prop_dictionary_get(ksdict, "max-value");
val = (val / 100) * prop_number_integer_value(obj);
val = (val / 100) * prop_number_signed_value(obj);
if (!prop_dictionary_set_uint32(csdict,
"warning-capacity",
@ -510,7 +511,7 @@ config_devblock_check_sensorprops(prop_dictionary_t ksdict,
obj2 = prop_dictionary_get(ksdict, "want-percentage");
obj3 = prop_dictionary_get(ksdict, "monitoring-supported");
if (prop_bool_true(obj2) && prop_bool_true(obj3)) {
strval = prop_string_cstring(obj);
strval = prop_string_value(obj);
val = strtod(strval, &endptr);
if ((*endptr != '\0') || (val < 0 || val > 100))
config_errmsg(VALUE_ERR,
@ -520,7 +521,7 @@ config_devblock_check_sensorprops(prop_dictionary_t ksdict,
* Convert the value to a valid percentage.
*/
obj = prop_dictionary_get(ksdict, "max-value");
val = (val / 100) * prop_number_integer_value(obj);
val = (val / 100) * prop_number_signed_value(obj);
if (!prop_dictionary_set_uint32(csdict,
"high-capacity",
@ -538,7 +539,7 @@ config_devblock_check_sensorprops(prop_dictionary_t ksdict,
obj2 = prop_dictionary_get(ksdict, "want-percentage");
obj3 = prop_dictionary_get(ksdict, "monitoring-supported");
if (prop_bool_true(obj2) && prop_bool_true(obj3)) {
strval = prop_string_cstring(obj);
strval = prop_string_value(obj);
val = strtod(strval, &endptr);
if ((*endptr != '\0') || (val < 0 || val > 100))
config_errmsg(VALUE_ERR,
@ -548,7 +549,7 @@ config_devblock_check_sensorprops(prop_dictionary_t ksdict,
* Convert the value to a valid percentage.
*/
obj = prop_dictionary_get(ksdict, "max-value");
val = (val / 100) * prop_number_integer_value(obj);
val = (val / 100) * prop_number_signed_value(obj);
if (!prop_dictionary_set_uint32(csdict,
"maximum-capacity",
@ -567,7 +568,7 @@ config_devblock_check_sensorprops(prop_dictionary_t ksdict,
if (!prop_bool_true(obj2))
config_errmsg(PROP_ERR, "critical-max", sensor);
strval = prop_string_cstring(obj);
strval = prop_string_value(obj);
obj = convert_val_to_pnumber(ksdict, "critical-max",
sensor, strval);
if (!prop_dictionary_set(csdict, "critical-max", obj))
@ -583,7 +584,7 @@ config_devblock_check_sensorprops(prop_dictionary_t ksdict,
if (!prop_bool_true(obj2))
config_errmsg(PROP_ERR, "critical-min", sensor);
strval = prop_string_cstring(obj);
strval = prop_string_value(obj);
obj = convert_val_to_pnumber(ksdict, "critical-min",
sensor, strval);
if (!prop_dictionary_set(csdict, "critical-min", obj))
@ -599,7 +600,7 @@ config_devblock_check_sensorprops(prop_dictionary_t ksdict,
if (!prop_bool_true(obj2))
config_errmsg(PROP_ERR, "warning-max", sensor);
strval = prop_string_cstring(obj);
strval = prop_string_value(obj);
obj = convert_val_to_pnumber(ksdict, "warning-max",
sensor, strval);
if (!prop_dictionary_set(csdict, "warning-max", obj))
@ -614,7 +615,7 @@ config_devblock_check_sensorprops(prop_dictionary_t ksdict,
if (!prop_bool_true(obj2))
config_errmsg(PROP_ERR, "warning-min", sensor);
strval = prop_string_cstring(obj);
strval = prop_string_value(obj);
obj = convert_val_to_pnumber(ksdict, "warning-min",
sensor, strval);
if (!prop_dictionary_set(csdict, "warning-min", obj))
@ -627,7 +628,7 @@ config_devblock_check_sensorprops(prop_dictionary_t ksdict,
*/
prop_number_t
convert_val_to_pnumber(prop_dictionary_t kdict, const char *prop,
const char *sensor, char *value)
const char *sensor, const char *value)
{
prop_object_t obj;
prop_number_t num;
@ -642,13 +643,13 @@ convert_val_to_pnumber(prop_dictionary_t kdict, const char *prop,
* Not allowed in battery sensors.
*/
obj = prop_dictionary_get(kdict, "type");
if (prop_string_equals_cstring(obj, "Battery capacity"))
if (prop_string_equals_string(obj, "Battery capacity"))
config_errmsg(PROP_ERR, prop, sensor);
/*
* Make the conversion for sensor's type.
*/
if (prop_string_equals_cstring(obj, "Temperature")) {
if (prop_string_equals_string(obj, "Temperature")) {
tmp = strchr(value, 'C');
if (tmp)
celsius = true;
@ -678,26 +679,26 @@ convert_val_to_pnumber(prop_dictionary_t kdict, const char *prop,
/* convert to microKelvin */
val = val * 1000000 + 273150000;
num = prop_number_create_unsigned_integer(val);
num = prop_number_create_unsigned(val);
free(strval);
} else if (prop_string_equals_cstring(obj, "Fan") ||
prop_string_equals_cstring(obj, "Integer")) {
} else if (prop_string_equals_string(obj, "Fan") ||
prop_string_equals_string(obj, "Integer")) {
/* no conversion */
val = strtod(value, &endptr);
if (*endptr != '\0')
config_errmsg(VALUE_ERR, prop, sensor);
num = prop_number_create_unsigned_integer(val);
num = prop_number_create_unsigned(val);
} else {
obj = prop_dictionary_get(kdict, "max-value");
if (obj)
max = prop_number_integer_value(obj);
max = prop_number_signed_value(obj);
obj = prop_dictionary_get(kdict, "min-value");
if (obj)
min = prop_number_integer_value(obj);
min = prop_number_signed_value(obj);
val = strtod(value, &endptr);
if (*endptr != '\0')
@ -720,7 +721,7 @@ convert_val_to_pnumber(prop_dictionary_t kdict, const char *prop,
if (min && val < min)
config_errmsg(VALUE_ERR, prop, sensor);
num = prop_number_create_integer(val);
num = prop_number_create_signed(val);
}
return num;

View File

@ -1,4 +1,4 @@
/* $NetBSD: envstat.c,v 1.96 2018/05/27 01:39:00 thorpej Exp $ */
/* $NetBSD: envstat.c,v 1.97 2020/06/07 00:51:48 thorpej Exp $ */
/*-
* Copyright (c) 2007, 2008 Juan Romero Pardines.
@ -27,7 +27,7 @@
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: envstat.c,v 1.96 2018/05/27 01:39:00 thorpej Exp $");
__RCSID("$NetBSD: envstat.c,v 1.97 2020/06/07 00:51:48 thorpej Exp $");
#endif /* not lint */
#include <stdio.h>
@ -404,7 +404,7 @@ parse_dictionary(int fd)
goto out;
}
dnp = prop_dictionary_keysym_cstring_nocopy(obj);
dnp = prop_dictionary_keysym_value(obj);
rval = find_sensors(array, dnp, edp);
if (rval)
goto out;
@ -486,7 +486,7 @@ find_sensors(prop_array_t array, const char *dvname, dvprops_t edp)
if (desc) {
/* copy description */
(void)strlcpy(sensor->desc,
prop_string_cstring_nocopy(desc),
prop_string_value(desc),
sizeof(sensor->desc));
} else {
free(sensor);
@ -498,7 +498,7 @@ find_sensors(prop_array_t array, const char *dvname, dvprops_t edp)
if (obj1) {
/* copy type */
(void)strlcpy(sensor->type,
prop_string_cstring_nocopy(obj1),
prop_string_value(obj1),
sizeof(sensor->type));
} else {
free(sensor);
@ -509,15 +509,15 @@ find_sensors(prop_array_t array, const char *dvname, dvprops_t edp)
state = prop_dictionary_get(obj, "state");
/* mark sensors with invalid/unknown state */
if ((prop_string_equals_cstring(state, "invalid") ||
prop_string_equals_cstring(state, "unknown")))
if ((prop_string_equals_string(state, "invalid") ||
prop_string_equals_string(state, "unknown")))
sensor->invalid = true;
/* get current drive state string */
obj1 = prop_dictionary_get(obj, "drive-state");
if (obj1) {
(void)strlcpy(sensor->drvstate,
prop_string_cstring_nocopy(obj1),
prop_string_value(obj1),
sizeof(sensor->drvstate));
}
@ -525,24 +525,24 @@ find_sensors(prop_array_t array, const char *dvname, dvprops_t edp)
obj1 = prop_dictionary_get(obj, "battery-capacity");
if (obj1) {
(void)strlcpy(sensor->battcap,
prop_string_cstring_nocopy(obj1),
prop_string_value(obj1),
sizeof(sensor->battcap));
}
/* get current value */
obj1 = prop_dictionary_get(obj, "cur-value");
if (obj1)
sensor->cur_value = prop_number_integer_value(obj1);
sensor->cur_value = prop_number_signed_value(obj1);
/* get max value */
obj1 = prop_dictionary_get(obj, "max-value");
if (obj1)
sensor->max_value = prop_number_integer_value(obj1);
sensor->max_value = prop_number_signed_value(obj1);
/* get min value */
obj1 = prop_dictionary_get(obj, "min-value");
if (obj1)
sensor->min_value = prop_number_integer_value(obj1);
sensor->min_value = prop_number_signed_value(obj1);
/* get percentage flag */
obj1 = prop_dictionary_get(obj, "want-percentage");
@ -552,51 +552,51 @@ find_sensors(prop_array_t array, const char *dvname, dvprops_t edp)
/* get critical max value if available */
obj1 = prop_dictionary_get(obj, "critical-max");
if (obj1)
sensor->critmax_value = prop_number_integer_value(obj1);
sensor->critmax_value = prop_number_signed_value(obj1);
/* get maximum capacity value if available */
obj1 = prop_dictionary_get(obj, "maximum-capacity");
if (obj1)
sensor->critmax_value = prop_number_integer_value(obj1);
sensor->critmax_value = prop_number_signed_value(obj1);
/* get critical min value if available */
obj1 = prop_dictionary_get(obj, "critical-min");
if (obj1)
sensor->critmin_value = prop_number_integer_value(obj1);
sensor->critmin_value = prop_number_signed_value(obj1);
/* get critical capacity value if available */
obj1 = prop_dictionary_get(obj, "critical-capacity");
if (obj1)
sensor->critmin_value = prop_number_integer_value(obj1);
sensor->critmin_value = prop_number_signed_value(obj1);
/* get warning max value if available */
obj1 = prop_dictionary_get(obj, "warning-max");
if (obj1)
sensor->warnmax_value = prop_number_integer_value(obj1);
sensor->warnmax_value = prop_number_signed_value(obj1);
/* get high capacity value if available */
obj1 = prop_dictionary_get(obj, "high-capacity");
if (obj1)
sensor->warnmax_value = prop_number_integer_value(obj1);
sensor->warnmax_value = prop_number_signed_value(obj1);
/* get warning min value if available */
obj1 = prop_dictionary_get(obj, "warning-min");
if (obj1)
sensor->warnmin_value = prop_number_integer_value(obj1);
sensor->warnmin_value = prop_number_signed_value(obj1);
/* get warning capacity value if available */
obj1 = prop_dictionary_get(obj, "warning-capacity");
if (obj1)
sensor->warnmin_value = prop_number_integer_value(obj1);
sensor->warnmin_value = prop_number_signed_value(obj1);
/* print sensor names if -l was given */
if (flags & ENVSYS_LFLAG) {
if (width)
(void)printf("%*s\n", width,
prop_string_cstring_nocopy(desc));
prop_string_value(desc));
else
(void)printf("%s\n",
prop_string_cstring_nocopy(desc));
prop_string_value(desc));
}
/* Add the sensor into the list */

View File

@ -1,4 +1,4 @@
/* $NetBSD: envstat.h,v 1.2 2007/11/16 08:01:38 xtraeme Exp $ */
/* $NetBSD: envstat.h,v 1.3 2020/06/07 00:51:48 thorpej Exp $ */
/*-
* Copyright (c) 2007 Juan Romero Pardines.
@ -52,7 +52,7 @@ void config_dict_mark(void);
prop_dictionary_t config_dict_parsed(void);
prop_number_t convert_val_to_pnumber(prop_dictionary_t, const char *,
const char *, char *);
const char *, const char *);
void config_devblock_add(const char *, prop_dictionary_t);
void config_devblock_check_sensorprops(prop_dictionary_t,

View File

@ -1,4 +1,4 @@
/* $NetBSD: graph.c,v 1.3 2015/03/28 14:09:59 jmcneill Exp $ */
/* $NetBSD: graph.c,v 1.4 2020/06/07 00:56:05 thorpej Exp $ */
/*
* Copyright (c) 2009 Precedence Technologies Ltd <support@precedence.co.uk>
@ -165,7 +165,7 @@ hdaudioctl_graph(int fd, int argc, char *argv[])
iter = prop_array_iterator(connlist);
prop_object_iterator_reset(iter);
while ((nnid = prop_object_iterator_next(iter)) != NULL) {
nid = prop_number_unsigned_integer_value(nnid);
nid = prop_number_unsigned_value(nnid);
printf(" widget%02Xh -> %s [sametail=widget%02Xh];\n",
nid, buf, nid);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: evboards.c,v 1.4 2020/05/14 08:34:18 msaitoh Exp $ */
/* $NetBSD: evboards.c,v 1.5 2020/06/07 00:58:58 thorpej Exp $ */
/*-
* Copyright (c) 2019 The NetBSD Foundation, Inc.
@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#if !defined(__lint)
__RCSID("$NetBSD: evboards.c,v 1.4 2020/05/14 08:34:18 msaitoh Exp $");
__RCSID("$NetBSD: evboards.c,v 1.5 2020/06/07 00:58:58 thorpej Exp $");
#endif /* !__lint */
#include <sys/types.h>
@ -654,7 +654,7 @@ validate_ubinstall_object(evb_board board, evb_ubinstall obj)
if (prop_object_type(obj) == PROP_TYPE_STRING) {
evb_ubinstall tobj = prop_dictionary_get(board,
prop_string_cstring_nocopy((prop_string_t)obj));
prop_string_value((prop_string_t)obj));
/*
* The target evb_ubinstall object must exist
@ -738,7 +738,7 @@ validate_board_object(evb_board obj, bool is_overlay)
prop_object_iterator_t iter = prop_dictionary_iterator(obj);
prop_dictionary_keysym_t key;
while ((key = prop_object_iterator_next(iter)) != NULL) {
const char *cp = prop_dictionary_keysym_cstring_nocopy(key);
const char *cp = prop_dictionary_keysym_value(key);
if (strcmp(cp, board_u_boot_install_key) == 0) {
has_default_install = true;
} else if (strncmp(cp, board_u_boot_install_key,
@ -807,13 +807,13 @@ evb_db_load_overlay(ib_params *params, const char *path,
assert(board != NULL);
if (!validate_board_object(board, true)) {
warnx("invalid board object in '%s': '%s'", path,
prop_dictionary_keysym_cstring_nocopy(key));
prop_dictionary_keysym_value(key));
continue;
}
/* Add "runtime-u-boot-path". */
prop_string_t string =
prop_string_create_cstring(runtime_uboot_path);
prop_string_create_copy(runtime_uboot_path);
assert(string != NULL);
prop_dictionary_set(board, board_u_boot_path_key, string);
prop_object_release(string);
@ -942,7 +942,7 @@ evb_db_load_base(ib_params *params)
assert(board != NULL);
if (!validate_board_object(board, false)) {
warnx("invalid board object in '%s': '%s'", path,
prop_dictionary_keysym_cstring_nocopy(key));
prop_dictionary_keysym_value(key));
prop_dictionary_remove_keysym(board_db, key);
}
}
@ -1339,7 +1339,7 @@ evb_db_list_boards(ib_params *params, FILE *out)
continue;
fprintf(out, "%-30s %s\n",
prop_dictionary_keysym_cstring_nocopy(key),
prop_dictionary_keysym_value(key),
evb_board_get_description(params, board));
if ((params->flags & IB_VERBOSE) && uboot_path) {
@ -1364,7 +1364,7 @@ evb_board_get_description(ib_params *params, evb_board board)
prop_string_t string;
string = prop_dictionary_get(board, board_description_key);
return prop_string_cstring_nocopy(string);
return prop_string_value(string);
}
/*
@ -1379,7 +1379,7 @@ evb_board_get_uboot_pkg(ib_params *params, evb_board board)
string = prop_dictionary_get(board, board_u_boot_pkg_key);
if (string == NULL)
return NULL;
return prop_string_cstring_nocopy(string);
return prop_string_value(string);
}
/*
@ -1394,7 +1394,7 @@ evb_board_get_uboot_path(ib_params *params, evb_board board)
string = prop_dictionary_get(board, board_u_boot_path_key);
if (string == NULL)
return NULL;
return prop_string_cstring_nocopy(string);
return prop_string_value(string);
}
/*
@ -1440,7 +1440,7 @@ evb_board_get_uboot_install(ib_params *params, evb_board board)
* exists.
*/
install = prop_dictionary_get(board,
prop_string_cstring_nocopy((prop_string_t)install));
prop_string_value((prop_string_t)install));
}
return install;
}
@ -1453,7 +1453,7 @@ evb_board_get_uboot_install(ib_params *params, evb_board board)
prop_object_iterator_t iter = prop_array_iterator(array);
prop_string_t string;
while ((string = prop_object_iterator_next(iter)) != NULL)
fprintf(stderr, " %s", prop_string_cstring_nocopy(string));
fprintf(stderr, " %s", prop_string_value(string));
fprintf(stderr, "\n");
prop_object_iterator_release(iter);
prop_object_release(array);
@ -1482,12 +1482,12 @@ evb_board_copy_uboot_media(ib_params *params, evb_board board)
assert(iter != NULL);
while ((key = prop_object_iterator_next(iter)) != NULL) {
cp = prop_dictionary_keysym_cstring_nocopy(key);
cp = prop_dictionary_keysym_value(key);
if (strcmp(cp, board_u_boot_install_key) == 0 ||
strncmp(cp, board_u_boot_install_key,
sizeof(board_u_boot_install_key) - 1) != 0)
continue;
string = prop_string_create_cstring(strrchr(cp, '-')+1);
string = prop_string_create_copy(strrchr(cp, '-')+1);
assert(string != NULL);
prop_array_add(array, string);
prop_object_release(string);
@ -1532,7 +1532,7 @@ const char *
evb_ubstep_get_file_name(ib_params *params, evb_ubstep step)
{
prop_string_t string = prop_dictionary_get(step, step_file_name_key);
return prop_string_cstring_nocopy(string);
return prop_string_value(string);
}
/*
@ -1544,7 +1544,7 @@ evb_ubstep_get_file_offset(ib_params *params, evb_ubstep step)
{
prop_number_t number = prop_dictionary_get(step, step_file_offset_key);
if (number != NULL)
return prop_number_unsigned_integer_value(number);
return prop_number_unsigned_value(number);
return 0;
}
@ -1558,7 +1558,7 @@ evb_ubstep_get_file_size(ib_params *params, evb_ubstep step)
{
prop_number_t number = prop_dictionary_get(step, step_file_size_key);
if (number != NULL)
return prop_number_unsigned_integer_value(number);
return prop_number_unsigned_value(number);
return 0;
}
@ -1572,7 +1572,7 @@ evb_ubstep_get_image_offset(ib_params *params, evb_ubstep step)
{
prop_number_t number = prop_dictionary_get(step, step_image_offset_key);
if (number != NULL)
return prop_number_unsigned_integer_value(number);
return prop_number_unsigned_value(number);
return 0;
}
@ -1587,7 +1587,7 @@ evb_ubstep_get_input_block_size(ib_params *params, evb_ubstep step)
prop_number_t number = prop_dictionary_get(step,
step_input_block_size_key);
if (number != NULL)
return prop_number_unsigned_integer_value(number);
return prop_number_unsigned_value(number);
return 0;
}
@ -1602,7 +1602,7 @@ evb_ubstep_get_input_pad_size(ib_params *params, evb_ubstep step)
prop_number_t number = prop_dictionary_get(step,
step_input_pad_size_key);
if (number != NULL)
return prop_number_unsigned_integer_value(number);
return prop_number_unsigned_value(number);
return 0;
}
@ -1616,7 +1616,7 @@ evb_ubstep_get_output_size(ib_params *params, evb_ubstep step)
{
prop_number_t number = prop_dictionary_get(step, step_output_size_key);
if (number != NULL)
return prop_number_unsigned_integer_value(number);
return prop_number_unsigned_value(number);
return 0;
}
@ -1630,7 +1630,7 @@ evb_ubstep_get_output_block_size(ib_params *params, evb_ubstep step)
prop_number_t number = prop_dictionary_get(step,
step_output_block_size_key);
if (number != NULL)
return prop_number_unsigned_integer_value(number);
return prop_number_unsigned_value(number);
return 0;
}