All of lore.kernel.org
 help / color / mirror / Atom feed
From: Samuel Thibault <samuel.thibault@eu.citrix.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] mini-os: make xenbus_read_integer and xenbus_printf take const strings
Date: Tue, 26 Aug 2008 17:17:02 +0100	[thread overview]
Message-ID: <20080826161702.GB4555@implementation.uk.xensource.com> (raw)

mini-os: make xenbus_read_integer and xenbus_printf take const strings

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>

diff -r c2472ded5c7c extras/mini-os/include/xenbus.h
--- a/extras/mini-os/include/xenbus.h	Tue Aug 26 15:16:57 2008 +0100
+++ b/extras/mini-os/include/xenbus.h	Tue Aug 26 17:06:09 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 c2472ded5c7c extras/mini-os/xenbus/xenbus.c
--- a/extras/mini-os/xenbus/xenbus.c	Tue Aug 26 15:16:57 2008 +0100
+++ b/extras/mini-os/xenbus/xenbus.c	Tue Aug 26 17:06:09 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];

             reply	other threads:[~2008-08-26 16:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-26 16:17 Samuel Thibault [this message]
2008-08-26 16:34 ` [PATCH] mini-os: make xenbus_read_integer and xenbus_printf take const strings Daniel P. Berrange
2008-08-26 16:42   ` Samuel Thibault

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080826161702.GB4555@implementation.uk.xensource.com \
    --to=samuel.thibault@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.