Remove no longer needed xenstore-watch
and close-window
This commit is contained in:
parent
686673e1fd
commit
ec7ae0bf40
3
Makefile
3
Makefile
@ -200,7 +200,6 @@ install-common: install-doc
|
||||
|
||||
install -d $(DESTDIR)/var/lib/qubes
|
||||
|
||||
install -D misc/xenstore-watch $(DESTDIR)$(BINDIR)/xenstore-watch-qubes
|
||||
install -d $(DESTDIR)/etc/udev/rules.d
|
||||
install -m 0644 misc/udev-qubes-misc.rules $(DESTDIR)/etc/udev/rules.d/50-qubes-misc.rules
|
||||
install -d $(DESTDIR)$(LIBDIR)/qubes/
|
||||
@ -221,8 +220,6 @@ install-common: install-doc
|
||||
install -D -m 0644 misc/qubes-master-key.asc $(DESTDIR)/usr/share/qubes/qubes-master-key.asc
|
||||
install misc/resize-rootfs $(DESTDIR)$(LIBDIR)/qubes/
|
||||
|
||||
install misc/close-window $(DESTDIR)$(LIBDIR)/qubes/close-window
|
||||
|
||||
install misc/upgrades-installed-check $(DESTDIR)$(LIBDIR)/qubes/upgrades-installed-check
|
||||
install misc/upgrades-status-notify $(DESTDIR)$(LIBDIR)/qubes/upgrades-status-notify
|
||||
|
||||
|
2
debian/qubes-core-agent.install
vendored
2
debian/qubes-core-agent.install
vendored
@ -111,11 +111,9 @@ usr/bin/qvm-run-vm
|
||||
usr/bin/qvm-connect-tcp
|
||||
usr/bin/qvm-console
|
||||
usr/bin/qvm-sync-clock
|
||||
usr/bin/xenstore-watch-qubes
|
||||
usr/lib/python3/dist-packages/qubesagent-*.egg-info/*
|
||||
usr/lib/python3/dist-packages/qubesagent/*
|
||||
usr/lib/qubes-bind-dirs.d/30_cron.conf
|
||||
usr/lib/qubes/close-window
|
||||
usr/lib/qubes/init/bind-dirs.sh
|
||||
usr/lib/qubes/init/control-printer-icon.sh
|
||||
usr/lib/qubes/init/functions
|
||||
|
2
misc/.gitignore
vendored
2
misc/.gitignore
vendored
@ -1,3 +1 @@
|
||||
meminfo-writer
|
||||
xenstore-watch
|
||||
close-window
|
||||
|
@ -1,16 +1,4 @@
|
||||
CC=gcc
|
||||
CFLAGS=-Wall -Wextra -Werror -g -O3
|
||||
|
||||
_XENSTORE_H=$(wildcard /usr/include/xenstore.h)
|
||||
ifneq "$(_XENSTORE_H)" ""
|
||||
CFLAGS+= -DUSE_XENSTORE_H
|
||||
endif
|
||||
|
||||
all: xenstore-watch python close-window
|
||||
xenstore-watch: xenstore-watch.o
|
||||
$(CC) -o xenstore-watch xenstore-watch.o -lxenstore
|
||||
close-window: close-window.c
|
||||
$(CC) -o $@ $< -lX11
|
||||
all: python
|
||||
python: python2 python3
|
||||
python2:
|
||||
rm -rf py2
|
||||
@ -28,4 +16,4 @@ python3:
|
||||
python3 -O -m compileall py3
|
||||
|
||||
clean:
|
||||
rm -f xenstore-watch *.o *~ *.pyc *.pyo
|
||||
rm -f *~ *.pyc *.pyo
|
||||
|
@ -1,42 +0,0 @@
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int close_window(Display *d, XID window) {
|
||||
XClientMessageEvent ev;
|
||||
memset(&ev, 0, sizeof(ev));
|
||||
ev.type = ClientMessage;
|
||||
ev.display = d;
|
||||
ev.window = window;
|
||||
ev.format = 32;
|
||||
ev.message_type = XInternAtom(d, "WM_PROTOCOLS", False);
|
||||
ev.data.l[0] = XInternAtom(d, "WM_DELETE_WINDOW", False);;
|
||||
return XSendEvent(ev.display, ev.window, True, 0, (XEvent *) & ev);
|
||||
}
|
||||
|
||||
int is_window_visible(Display *d, XID window) {
|
||||
XWindowAttributes xwa;
|
||||
|
||||
if (!XGetWindowAttributes(d, window, &xwa))
|
||||
return 0;
|
||||
return xwa.map_state == IsViewable;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
int i;
|
||||
Display *d;
|
||||
XID w;
|
||||
|
||||
d = XOpenDisplay(NULL);
|
||||
if (!d)
|
||||
exit(1);
|
||||
for (i=1; i<argc; i++) {
|
||||
w = strtoul(argv[i], NULL, 0);
|
||||
if (is_window_visible(d, w))
|
||||
close_window(d, w);
|
||||
}
|
||||
XSync(d, False);
|
||||
XCloseDisplay(d);
|
||||
return 0;
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
#include <sys/types.h>
|
||||
#include <xenstore.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
struct xs_handle *xs;
|
||||
unsigned int count;
|
||||
char **vec;
|
||||
char dummy;
|
||||
if (argc != 2) {
|
||||
fprintf(stderr, "usage: %s xenstore_path\n", argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
xs = xs_domain_open();
|
||||
if (!xs) {
|
||||
perror("xs_domain_open");
|
||||
exit(1);
|
||||
}
|
||||
if (!xs_watch(xs, argv[1], &dummy)) {
|
||||
perror("xs_watch");
|
||||
exit(1);
|
||||
}
|
||||
vec = xs_read_watch(xs, &count);
|
||||
free(vec);
|
||||
vec = xs_read_watch(xs, &count);
|
||||
free(vec);
|
||||
return 0;
|
||||
}
|
@ -615,7 +615,6 @@ rm -f %{name}-%{version}
|
||||
/usr/bin/qvm-run-vm
|
||||
/usr/bin/qvm-features-request
|
||||
/usr/bin/qvm-sync-clock
|
||||
/usr/bin/xenstore-watch-qubes
|
||||
/usr/bin/qubes-desktop-run
|
||||
/usr/bin/qubes-run-terminal
|
||||
/usr/bin/qubes-run-gnome-terminal
|
||||
@ -635,7 +634,6 @@ rm -f %{name}-%{version}
|
||||
/usr/lib/qubes/qvm-move-to-vm.kde
|
||||
/usr/lib/qubes/tar2qfile
|
||||
/usr/lib/qubes/vm-file-editor
|
||||
/usr/lib/qubes/close-window
|
||||
/usr/lib/qubes/xdg-icon
|
||||
/usr/lib/qubes/update-proxy-configs
|
||||
/usr/lib/qubes/upgrades-installed-check
|
||||
|
Loading…
Reference in New Issue
Block a user