[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Add correct const-ness to memshr tool functions



# HG changeset patch
# User Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
# Date 1326209888 0
# Node ID 9be0e68ae45fcc21e32585d9f0596554a0fff27a
# Parent  cfbab2c7c3cc864fcc8a3f78d9745b54fe0d624a
Add correct const-ness to memshr tool functions

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

Signed-off-by: Adin Scannell <adin@xxxxxxxxxxx>
Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
---


diff -r cfbab2c7c3cc -r 9be0e68ae45f tools/blktap2/drivers/Makefile
--- a/tools/blktap2/drivers/Makefile    Tue Jan 10 15:38:08 2012 +0000
+++ b/tools/blktap2/drivers/Makefile    Tue Jan 10 15:38:08 2012 +0000
@@ -43,7 +43,7 @@
 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 cfbab2c7c3cc -r 9be0e68ae45f tools/blktap2/drivers/tapdisk.h
--- a/tools/blktap2/drivers/tapdisk.h   Tue Jan 10 15:38:08 2012 +0000
+++ b/tools/blktap2/drivers/tapdisk.h   Tue Jan 10 15:38:08 2012 +0000
@@ -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 cfbab2c7c3cc -r 9be0e68ae45f tools/memshr/interface.c
--- a/tools/memshr/interface.c  Tue Jan 10 15:38:08 2012 +0000
+++ b/tools/memshr/interface.c  Tue Jan 10 15:38:08 2012 +0000
@@ -123,7 +123,7 @@
     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 cfbab2c7c3cc -r 9be0e68ae45f tools/memshr/memshr.h
--- a/tools/memshr/memshr.h     Tue Jan 10 15:38:08 2012 +0000
+++ b/tools/memshr/memshr.h     Tue Jan 10 15:38:08 2012 +0000
@@ -28,7 +28,7 @@
 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 cfbab2c7c3cc -r 9be0e68ae45f tools/memshr/shm.c
--- a/tools/memshr/shm.c        Tue Jan 10 15:38:08 2012 +0000
+++ b/tools/memshr/shm.c        Tue Jan 10 15:38:08 2012 +0000
@@ -187,7 +187,7 @@
     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 cfbab2c7c3cc -r 9be0e68ae45f tools/memshr/shm.h
--- a/tools/memshr/shm.h        Tue Jan 10 15:38:08 2012 +0000
+++ b/tools/memshr/shm.h        Tue Jan 10 15:38:08 2012 +0000
@@ -44,7 +44,7 @@
 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__ */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.