This commit is contained in:
committed by
Git OBS Bridge
parent
b834258fb8
commit
71babd6d75
33
tapdisk-ioemu-logfile.patch
Normal file
33
tapdisk-ioemu-logfile.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
Index: xen-3.3.1-testing/tools/ioemu-remote/tapdisk-ioemu.c
|
||||
===================================================================
|
||||
--- xen-3.3.1-testing.orig/tools/ioemu-remote/tapdisk-ioemu.c
|
||||
+++ xen-3.3.1-testing/tools/ioemu-remote/tapdisk-ioemu.c
|
||||
@@ -100,16 +100,22 @@ int main(void)
|
||||
struct timeval tv;
|
||||
void *old_fd_start = NULL;
|
||||
|
||||
- logfile = stderr;
|
||||
-
|
||||
+ /* Daemonize */
|
||||
+ if (fork() != 0)
|
||||
+ exit(0);
|
||||
+
|
||||
bdrv_init();
|
||||
qemu_aio_init();
|
||||
init_blktap();
|
||||
|
||||
- /* Daemonize */
|
||||
- if (fork() != 0)
|
||||
- exit(0);
|
||||
-
|
||||
+ logfile = fopen("/var/log/xen/tapdisk-ioemu.log", "a");
|
||||
+ if (logfile) {
|
||||
+ fclose(stderr);
|
||||
+ stderr = logfile;
|
||||
+ } else {
|
||||
+ logfile = stderr;
|
||||
+ }
|
||||
+
|
||||
/*
|
||||
* Main loop: Pass events to the corrsponding handlers and check for
|
||||
* completed aio operations.
|
Reference in New Issue
Block a user