# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1219826782 -3600
# Node ID 2708ad934551d85c821b51ffd160e1f887b168d1
# Parent 1c1404a0d43530513c870e3e187959bd7cd85c27
mini-os: make xenbus_read_integer and xenbus_printf take const strings
Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
---
extras/mini-os/include/xenbus.h | 6 +++---
extras/mini-os/xenbus/xenbus.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff -r 1c1404a0d435 -r 2708ad934551 extras/mini-os/include/xenbus.h
--- a/extras/mini-os/include/xenbus.h Wed Aug 27 09:46:09 2008 +0100
+++ b/extras/mini-os/include/xenbus.h Wed Aug 27 09:46:22 2008 +0100
@@ -83,12 +83,12 @@ char *xenbus_transaction_end(xenbus_tran
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 -r 1c1404a0d435 -r 2708ad934551 extras/mini-os/xenbus/xenbus.c
--- a/extras/mini-os/xenbus/xenbus.c Wed Aug 27 09:46:09 2008 +0100
+++ b/extras/mini-os/xenbus/xenbus.c Wed Aug 27 09:46:22 2008 +0100
@@ -633,7 +633,7 @@ xenbus_transaction_end(xenbus_transactio
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];
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|