From 84901438e69bafe102552e0011fdf9427da05488 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 27 Aug 2008 09:46:22 +0100 Subject: [PATCH] mini-os: make xenbus_read_integer and xenbus_printf take const strings Signed-off-by: Samuel Thibault --- extras/mini-os/include/xenbus.h | 6 +++--- extras/mini-os/xenbus/xenbus.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/extras/mini-os/include/xenbus.h b/extras/mini-os/include/xenbus.h index f1585c9f70..b386592950 100644 --- a/extras/mini-os/include/xenbus.h +++ b/extras/mini-os/include/xenbus.h @@ -83,12 +83,12 @@ char *xenbus_transaction_end(xenbus_transaction_t, int abort, int *retry); /* Read path and parse it as an integer. Returns -1 on error. */ -int xenbus_read_integer(char *path); +int xenbus_read_integer(const char *path); /* Contraction of snprintf and xenbus_write(path/node). */ char* xenbus_printf(xenbus_transaction_t xbt, - char* node, char* path, - char* fmt, ...); + const char* node, const char* path, + const char* fmt, ...); /* Reset the XenBus system. */ void fini_xenbus(void); diff --git a/extras/mini-os/xenbus/xenbus.c b/extras/mini-os/xenbus/xenbus.c index dc9c47e8d5..7b9c35a1dc 100644 --- a/extras/mini-os/xenbus/xenbus.c +++ b/extras/mini-os/xenbus/xenbus.c @@ -633,7 +633,7 @@ xenbus_transaction_end(xenbus_transaction_t t, int abort, int *retry) return NULL; } -int xenbus_read_integer(char *path) +int xenbus_read_integer(const char *path) { char *res, *buf; int t; @@ -650,8 +650,8 @@ int xenbus_read_integer(char *path) } char* xenbus_printf(xenbus_transaction_t xbt, - char* node, char* path, - char* fmt, ...) + const char* node, const char* path, + const char* fmt, ...) { #define BUFFER_SIZE 256 char fullpath[BUFFER_SIZE]; -- 2.30.2