equal
deleted
inserted
replaced
84 klog.argtypes = [ctypes.c_int, ctypes.c_char_p, ctypes.c_int] |
84 klog.argtypes = [ctypes.c_int, ctypes.c_char_p, ctypes.c_int] |
85 klog.restype = ctypes.c_int |
85 klog.restype = ctypes.c_int |
86 s = ctypes.create_string_buffer(4*1024) |
86 s = ctypes.create_string_buffer(4*1024) |
87 last = None |
87 last = None |
88 while not StopKMSGThread: |
88 while not StopKMSGThread: |
89 l = klog(3, s, len(s)-1) |
89 bytes_to_read = klog(3, s, len(s)-1) |
90 log = s.value[:l-1] |
90 log = s.value[:bytes_to_read-1] |
91 if last : |
91 if last : |
92 log = log.rpartition(last)[2] |
92 log = log.rpartition(last)[2] |
93 if log : |
93 if log : |
94 last = log.rpartition('\n')[2] |
94 last = log.rpartition('\n')[2] |
95 for lvl, msg in re.findall( |
95 for lvl, msg in re.findall( |