aboutsummaryrefslogtreecommitdiffstats
path: root/tools/misc
diff options
context:
space:
mode:
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2004-01-31 19:45:13 +0000
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2004-01-31 19:45:13 +0000
commitdea8eefd6214e3ad5b54795fa958ab721d58710c (patch)
treef210aa8b10d18345ea90980eef13ea0c6a2665ee /tools/misc
parentf21e4de207c89ca1f1d18122c43db30b2ff41e7b (diff)
downloadxen-dea8eefd6214e3ad5b54795fa958ab721d58710c.tar.gz
xen-dea8eefd6214e3ad5b54795fa958ab721d58710c.tar.bz2
xen-dea8eefd6214e3ad5b54795fa958ab721d58710c.zip
bitkeeper revision 1.699 (401c05c9TV2zsaZ_e3zpy-zaKxCetw)
timer.c, timer.h, sched.h: new file Many files: Rolf's new timer interface, plus various cleanups.
Diffstat (limited to 'tools/misc')
-rw-r--r--tools/misc/Makefile4
-rw-r--r--tools/misc/xen_read_console.c11
2 files changed, 10 insertions, 5 deletions
diff --git a/tools/misc/Makefile b/tools/misc/Makefile
index 19d25b4748..597e68da17 100644
--- a/tools/misc/Makefile
+++ b/tools/misc/Makefile
@@ -16,7 +16,7 @@ all: $(TARGETS)
install: all
mkdir -p /usr/bin
- cp -a $(INSTALL) /usr/bin
+ cp $(INSTALL) /usr/bin
chmod 755 /usr/bin/xen-mkdevnodes
chmod 755 /usr/bin/xen_nat_enable
chmod 755 /usr/bin/xen-clone
@@ -24,7 +24,7 @@ install: all
dist: all
mkdir -p ../../../install/bin
- cp -a $(INSTALL) ../../../install/bin
+ cp $(INSTALL) ../../../install/bin
chmod 755 ../../../install/bin/xen-mkdevnodes
chmod 755 ../../../install/bin/xen_nat_enable
chmod 755 ../../../install/bin/xen-clone
diff --git a/tools/misc/xen_read_console.c b/tools/misc/xen_read_console.c
index 766d24f6f3..1352de8a6f 100644
--- a/tools/misc/xen_read_console.c
+++ b/tools/misc/xen_read_console.c
@@ -11,9 +11,9 @@
int main(void)
{
- unsigned char buf[208];
+ unsigned char buf[208], filtered[208];
struct sockaddr_in addr, from;
- int fromlen = sizeof(from);
+ int fromlen = sizeof(from), i, j;
int len, fd = socket(PF_INET, SOCK_DGRAM, 0);
if ( fd < 0 )
@@ -46,7 +46,12 @@ int main(void)
if ( buf[len-1] != '\n' ) { buf[len] = '\n'; len++; }
buf[len] = '\0';
- printf("[%d] %s", ntohs(from.sin_port),buf);
+ for ( i = 0, j = 0; i < len; i++ )
+ if ( (buf[i] == '\n') || (buf[i] == '\0') ||
+ ((buf[i] >= 32) && (buf[i] <= 126)) )
+ filtered[j++] = buf[i];
+
+ printf("[%d] %s", ntohs(from.sin_port), filtered);
fromlen = sizeof(from);
}