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@scannell.ca>
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Ian Jackson <ian.jackson.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
This commit is contained in:
Andres Lagar-Cavilla committed 2012-01-10 15:38:08 +00:00
1 parent b4ec697c64
commit 2b82a7ad97
6 files changed
+9 -5

No files matched your search

+1 -1
View File
@@ -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)
+4
View File
@@ -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))
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -187,7 +187,7 @@ struct blockshr_hash * shm_blockshr_hash_open(int unlink)
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;
+1 -1
View File
@@ -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__ */
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.