void table_name ## _init(struct afs_table *t); \
int cmd_prefix ## _get_name_by_id(uint32_t id, char **name); \
int cmd_prefix ## _get_def_by_id(uint32_t id, struct osl_object *def); \
- int cmd_prefix ## _get_def_by_name(char *name, struct osl_object *def); \
+ int cmd_prefix ## _get_def_by_name(const char *name, struct osl_object *def); \
int cmd_prefix ## _get_name_and_def_by_row(const struct osl_row *row, \
char **name, struct osl_object *def); \
int table_name ##_event_handler(enum afs_events event, \
return blob_get_name_by_id(table_name ## _table, id, name); \
}
-static int blob_get_def_by_name(struct osl_table *table, char *name,
+static int blob_get_def_by_name(struct osl_table *table, const char *name,
struct osl_object *def)
{
struct osl_row *row;
- struct osl_object obj = {.data = name, .size = strlen(name) + 1};
+ struct osl_object obj = {.data = (void *)name, .size = strlen(name) + 1};
int ret;
def->data = NULL;
/** Define the \p get_def_by_id function for this blob type. */
#define DEFINE_GET_DEF_BY_NAME(table_name, cmd_prefix) \
- int cmd_prefix ## _get_def_by_name(char *name, struct osl_object *def) \
+ int cmd_prefix ## _get_def_by_name(const char *name, struct osl_object *def) \
{ \
return blob_get_def_by_name(table_name ## _table, name, def); \
}