mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
If more than one instance of xenconsole is run against the same DOMID then each instance will only get some data. This change ensures exclusive access to the console by obtaining an exclusive lock on <XEN_LOCK_DIR>/xenconsole.<DOMID>. The locking strategy used is based on tools/libxl/libxl_internal.c:libxl__lock_domain_userdata(). Signed-off-by: Martin Lucina <martin@lucina.net> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Cc: Ian Campbell <ian.campbell@citrix.com> Cc: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
46 lines
1.1 KiB
Makefile
46 lines
1.1 KiB
Makefile
XEN_ROOT=$(CURDIR)/../..
|
|
include $(XEN_ROOT)/tools/Rules.mk
|
|
|
|
CFLAGS += -Werror
|
|
|
|
CFLAGS += $(CFLAGS_libxenctrl)
|
|
CFLAGS += $(CFLAGS_libxenstore)
|
|
LDLIBS += $(LDLIBS_libxenctrl)
|
|
LDLIBS += $(LDLIBS_libxenstore)
|
|
LDLIBS += $(SOCKET_LIBS)
|
|
|
|
LDLIBS_xenconsoled += $(UTIL_LIBS)
|
|
LDLIBS_xenconsoled += -lrt
|
|
|
|
BIN = xenconsoled xenconsole
|
|
|
|
.PHONY: all
|
|
all: $(BIN)
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
$(RM) *.a *.so *.o *.rpm $(BIN) $(DEPS)
|
|
$(RM) client/*.o daemon/*.o
|
|
$(RM) client/_paths.h
|
|
|
|
.PHONY: distclean
|
|
distclean: clean
|
|
|
|
xenconsoled: $(patsubst %.c,%.o,$(wildcard daemon/*.c))
|
|
$(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS) $(LDLIBS_xenconsoled) $(APPEND_LDFLAGS)
|
|
|
|
xenconsole: client/_paths.h $(patsubst %.c,%.o,$(wildcard client/*.c))
|
|
$(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS) $(LDLIBS_xenconsole) $(APPEND_LDFLAGS)
|
|
|
|
genpath-target = $(call buildmakevars2header,client/_paths.h)
|
|
$(eval $(genpath-target))
|
|
|
|
.PHONY: install
|
|
install: $(BIN)
|
|
$(INSTALL_DIR) $(DESTDIR)/$(sbindir)
|
|
$(INSTALL_PROG) xenconsoled $(DESTDIR)/$(sbindir)
|
|
$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
|
|
$(INSTALL_PROG) xenconsole $(DESTDIR)$(LIBEXEC_BIN)
|
|
|
|
-include $(DEPS)
|