xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andres Lagar-Cavilla <andres@lagarcavilla.org>
To: xen-devel@lists.xensource.com
Cc: ian.jackson@citrix.com, andres@gridcentric.ca,
	ian.campbell@citrix.com, adin@gridcentric.ca
Subject: [PATCH 2 of 2] Add correct const-ness to memshr tool functions
Date: Mon, 09 Jan 2012 16:43:21 -0500	[thread overview]
Message-ID: <ee6a41ae9dcb0a14c95e.1326145401@xdev.gridcentric.ca> (raw)
In-Reply-To: <patchbomb.1326145399@xdev.gridcentric.ca>

 tools/blktap2/drivers/Makefile  |  2 +-
 tools/blktap2/drivers/tapdisk.h |  4 ++++
 tools/memshr/interface.c        |  2 +-
 tools/memshr/memshr.h           |  2 +-
 tools/memshr/shm.c              |  2 +-
 tools/memshr/shm.h              |  2 +-
 6 files changed, 9 insertions(+), 5 deletions(-)


This patch addresses some of the compile and link issues with the memshr
module.

Signed-off-by: Adin Scannell <adin@scannell.ca>
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>

diff -r 2d3804d81c3c -r ee6a41ae9dcb tools/blktap2/drivers/Makefile
--- a/tools/blktap2/drivers/Makefile
+++ b/tools/blktap2/drivers/Makefile
@@ -43,7 +43,7 @@ MEMSHR_DIR = $(XEN_ROOT)/tools/memshr
 MEMSHRLIBS :=
 ifeq ($(CONFIG_Linux), __fixme__)
 CFLAGS += -DMEMSHR
-MEMSHRLIBS += $(MEMSHR_DIR)/libmemshr.a
+MEMSHRLIBS += -L$(XEN_ROOT)/tools/libxc -lxenctrl $(MEMSHR_DIR)/libmemshr.a
 endif
 
 ifeq ($(VHD_STATIC),y)
diff -r 2d3804d81c3c -r ee6a41ae9dcb tools/blktap2/drivers/tapdisk.h
--- a/tools/blktap2/drivers/tapdisk.h
+++ b/tools/blktap2/drivers/tapdisk.h
@@ -64,6 +64,10 @@
 #include "tapdisk-log.h"
 #include "tapdisk-utils.h"
 
+#ifdef MEMSHR
+#include "memshr.h"
+#endif
+
 #define DPRINTF(_f, _a...)           syslog(LOG_INFO, _f, ##_a)
 #define EPRINTF(_f, _a...)           syslog(LOG_ERR, "tap-err:%s: " _f, __func__, ##_a)
 #define PERROR(_f, _a...)            EPRINTF(_f ": %s", ##_a, strerror(errno))
diff -r 2d3804d81c3c -r ee6a41ae9dcb tools/memshr/interface.c
--- a/tools/memshr/interface.c
+++ b/tools/memshr/interface.c
@@ -123,7 +123,7 @@ void memshr_vbd_initialize(void)
     vbd_info.enabled = 1;
 }
 
-uint16_t memshr_vbd_image_get(char* file)
+uint16_t memshr_vbd_image_get(const char* file)
 {
     uint16_t id;
 
diff -r 2d3804d81c3c -r ee6a41ae9dcb tools/memshr/memshr.h
--- a/tools/memshr/memshr.h
+++ b/tools/memshr/memshr.h
@@ -28,7 +28,7 @@ typedef uint64_t xen_mfn_t;
 extern void memshr_set_domid(int domid);
 extern void memshr_daemon_initialize(void);
 extern void memshr_vbd_initialize(void);
-extern uint16_t memshr_vbd_image_get(char* file);
+extern uint16_t memshr_vbd_image_get(const char* file);
 extern void memshr_vbd_image_put(uint16_t memshr_id);
 extern int memshr_vbd_issue_ro_request(char *buf,
                                        grant_ref_t gref,
diff -r 2d3804d81c3c -r ee6a41ae9dcb tools/memshr/shm.c
--- a/tools/memshr/shm.c
+++ b/tools/memshr/shm.c
@@ -187,7 +187,7 @@ struct blockshr_hash * shm_blockshr_hash
     return h;
 } 
 
-uint16_t shm_vbd_image_get(char* file, vbd_image_info_t *vbd_imgs)
+uint16_t shm_vbd_image_get(const char* file, vbd_image_info_t *vbd_imgs)
 {
     vbd_image_info_t *img, *next_img;
     int i, img_id;
diff -r 2d3804d81c3c -r ee6a41ae9dcb tools/memshr/shm.h
--- a/tools/memshr/shm.h
+++ b/tools/memshr/shm.h
@@ -44,7 +44,7 @@ typedef struct shared_memshr_info {
 shared_memshr_info_t * shm_shared_info_open(int unlink);
 struct fgprtshr_hash * shm_fgprtshr_hash_open(int unlink);
 struct blockshr_hash * shm_blockshr_hash_open(int unlink);
-uint16_t shm_vbd_image_get(char* file, vbd_image_info_t *vbd_imgs);
+uint16_t shm_vbd_image_get(const char* file, vbd_image_info_t *vbd_imgs);
 void     shm_vbd_image_put(uint16_t memshr_id, vbd_image_info_t *vbd_imgs);
 
 #endif /* __SHM_H__ */

  parent reply	other threads:[~2012-01-09 21:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-09 21:43 [PATCH 0 of 2] Tools: memshr cleanups Andres Lagar-Cavilla
2012-01-09 21:43 ` [PATCH 1 of 2] Fix types used in xc_memshr_* functions Andres Lagar-Cavilla
2012-01-09 21:43 ` Andres Lagar-Cavilla [this message]
2012-01-10 15:39 ` [PATCH 0 of 2] Tools: memshr cleanups Ian Jackson

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=ee6a41ae9dcb0a14c95e.1326145401@xdev.gridcentric.ca \
    --to=andres@lagarcavilla.org \
    --cc=adin@gridcentric.ca \
    --cc=andres@gridcentric.ca \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).