diff options
-rw-r--r-- | includes/dt_util.h | 5 | ||||
-rw-r--r-- | modules/devices/devicetree/dt_util.c | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/includes/dt_util.h b/includes/dt_util.h index acc4ad16..b4506d19 100644 --- a/includes/dt_util.h +++ b/includes/dt_util.h @@ -40,7 +40,7 @@ typedef uint32_t dt_uint; /* big-endian */ typedef struct _dtr dtr; typedef struct _dtr_obj dtr_obj; -dtr *dtr_new(char *base_path); /* NULL for DTR_ROOT */ +dtr *dtr_new(const char *base_path); /* NULL for DTR_ROOT */ void dtr_free(dtr *); int dtr_was_found(dtr *); const char *dtr_base_path(dtr *); @@ -77,6 +77,9 @@ char *dtr_maps_info(dtr *); /* returns hardinfo shell section */ const char *dtr_find_device_tree_root(void); +/* write to the message log */ +void dtr_msg(dtr *s, char *fmt, ...); + #define sp_sep(STR) (strlen(STR) ? " " : "") /* appends an element to a string, adding a space if * the string is not empty. diff --git a/modules/devices/devicetree/dt_util.c b/modules/devices/devicetree/dt_util.c index 619e63be..5a67005a 100644 --- a/modules/devices/devicetree/dt_util.c +++ b/modules/devices/devicetree/dt_util.c @@ -224,7 +224,7 @@ const char *dtr_find_device_tree_root() { return NULL; } -dtr *dtr_new_x(char *base_path, int fast) { +dtr *dtr_new_x(const char *base_path, int fast) { dtr *dt = malloc(sizeof(dtr)); if (dt != NULL) { memset(dt, 0, sizeof(dtr)); @@ -253,7 +253,7 @@ dtr *dtr_new_x(char *base_path, int fast) { return dt; } -dtr *dtr_new(char *base_path) { +dtr *dtr_new(const char *base_path) { return dtr_new_x(base_path, 0); } |