@@ -611,11 +611,11 @@ static unsigned int get_acc_domid(struct connection *conn, const char *name,
return (!conn || name[0] == '/' || name[0] == '@') ? domid : conn->id;
}
-int db_write(struct connection *conn, const char *db_name, void *data,
+int db_write(struct connection *conn, const char *db_name, const void *data,
size_t size, struct node_account_data *acc,
enum write_node_mode mode, bool no_quota_check)
{
- struct xs_tdb_record_hdr *hdr = data;
+ const struct xs_tdb_record_hdr *hdr = data;
struct node_account_data old_acc = {};
unsigned int old_domid, new_domid;
size_t name_len = strlen(db_name);
@@ -363,7 +363,7 @@ int remember_string(struct hashtable *hash, const char *str);
/* Data base access functions. */
struct xs_tdb_record_hdr *db_fetch(const char *db_name, size_t *size);
-int db_write(struct connection *conn, const char *db_name, void *data,
+int db_write(struct connection *conn, const char *db_name, const void *data,
size_t size, struct node_account_data *acc,
enum write_node_mode mode, bool no_quota_check);
void db_delete(struct connection *conn, const char *name,
db_write() doesn't change the data written to the data base, so the data parameter can be const. Signed-off-by: Juergen Gross <jgross@suse.com> --- V3: - new patch --- tools/xenstore/xenstored_core.c | 4 ++-- tools/xenstore/xenstored_core.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)