ia64/xen-unstable

changeset 18380:2708ad934551

mini-os: make xenbus_read_integer and xenbus_printf take const strings

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Aug 27 09:46:22 2008 +0100 (2008-08-27)
parents 1c1404a0d435
children 9e276d5f3c58
files extras/mini-os/include/xenbus.h extras/mini-os/xenbus/xenbus.c
line diff
     1.1 --- a/extras/mini-os/include/xenbus.h	Wed Aug 27 09:46:09 2008 +0100
     1.2 +++ b/extras/mini-os/include/xenbus.h	Wed Aug 27 09:46:22 2008 +0100
     1.3 @@ -83,12 +83,12 @@ char *xenbus_transaction_end(xenbus_tran
     1.4  			     int *retry);
     1.5  
     1.6  /* Read path and parse it as an integer.  Returns -1 on error. */
     1.7 -int xenbus_read_integer(char *path);
     1.8 +int xenbus_read_integer(const char *path);
     1.9  
    1.10  /* Contraction of snprintf and xenbus_write(path/node). */
    1.11  char* xenbus_printf(xenbus_transaction_t xbt,
    1.12 -                                  char* node, char* path,
    1.13 -                                  char* fmt, ...);
    1.14 +                                  const char* node, const char* path,
    1.15 +                                  const char* fmt, ...);
    1.16  
    1.17  /* Reset the XenBus system. */
    1.18  void fini_xenbus(void);
     2.1 --- a/extras/mini-os/xenbus/xenbus.c	Wed Aug 27 09:46:09 2008 +0100
     2.2 +++ b/extras/mini-os/xenbus/xenbus.c	Wed Aug 27 09:46:22 2008 +0100
     2.3 @@ -633,7 +633,7 @@ xenbus_transaction_end(xenbus_transactio
     2.4      return NULL;
     2.5  }
     2.6  
     2.7 -int xenbus_read_integer(char *path)
     2.8 +int xenbus_read_integer(const char *path)
     2.9  {
    2.10      char *res, *buf;
    2.11      int t;
    2.12 @@ -650,8 +650,8 @@ int xenbus_read_integer(char *path)
    2.13  }
    2.14  
    2.15  char* xenbus_printf(xenbus_transaction_t xbt,
    2.16 -                                  char* node, char* path,
    2.17 -                                  char* fmt, ...)
    2.18 +                                  const char* node, const char* path,
    2.19 +                                  const char* fmt, ...)
    2.20  {
    2.21  #define BUFFER_SIZE 256
    2.22      char fullpath[BUFFER_SIZE];