Re: [PATCH] util: escapes special characters in VIR_LOG_REGEX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2013年03月09日 22:49, Guannan Ren wrote:
In debug mode, the bug failed to start vm
error: Failed to start domain rhel5u9
error: internal error Out of space while reading console log output:

It's hard to known why the old regex cause error like this, as they
looks quite unrelated. Can you explain more?

...
---
  src/util/virlog.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/virlog.c b/src/util/virlog.c
index 130bdff..957d993 100644
--- a/src/util/virlog.c
+++ b/src/util/virlog.c
@@ -80,7 +80,7 @@ static regex_t *virLogRegex = NULL;


  #define VIR_LOG_DATE_REGEX "[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]"
-#define VIR_LOG_TIME_REGEX "[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9]+[0-9][0-9][0-9][0-9]"
+#define VIR_LOG_TIME_REGEX "[0-9][0-9]:[0-9][0-9]:[0-9][0-9]\\.[0-9][0-9][0-9]\\+[0-9][0-9][0-9][0-9]"
  #define VIR_LOG_PID_REGEX "[0-9]+"
  #define VIR_LOG_LEVEL_REGEX "debug|info|warning|error"


--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]