Lines Matching refs:sys

27 import sys
79 sys.stderr.write('Unsupported btsnooz version: %s\n' % version)
85 sys.stdout.buffer.write(b'btsnoop\x00\x00\x00\x00\x01\x00\x00\x03\xea')
112 sys.stdout.buffer.write(struct.pack('>II', length, length))
113 sys.stdout.buffer.write(struct.pack('>II', type_to_direction(type), 0))
114sys.stdout.buffer.write(struct.pack('>II', (first_timestamp_ms >> 32), (first_timestamp_ms & 0xFFF…
115 sys.stdout.buffer.write(type_to_hci(type))
116 sys.stdout.buffer.write(decompressed[offset:offset + length - 1])
139 sys.stdout.buffer.write(struct.pack('>II', packet_length, length))
140 sys.stdout.buffer.write(struct.pack('>II', type_to_direction(snooz_type), 0))
141sys.stdout.buffer.write(struct.pack('>II', (first_timestamp_ms >> 32), (first_timestamp_ms & 0xFFF…
142 sys.stdout.buffer.write(type_to_hci(snooz_type))
143 sys.stdout.buffer.write(decompressed[offset:offset + length - 1])
148 if len(sys.argv) > 2:
149 sys.stderr.write('Usage: %s [bugreport]\n' % sys.argv[0])
150 sys.exit(1)
153 if not sys.stdin.isatty():
156 for line in sys.stdin.readlines():
159 sys.exit(0)
161 sys.stderr.write('Failed uudecoding...ensure input is a valid uuencoded stream.\n')
162 sys.stderr.write(e)
163 sys.exit(1)
174 sys.exit(0)
182 … p = subprocess.Popen(["egrep", "-a", "BTSNOOP_LOG_SUMMARY", sys.argv[1]], stdout=subprocess.PIPE)
186 sys.stderr.write('Failed to parse uuencoded btsnooz data from bugreport.\n')
187 sys.stderr.write(' Try:\n')
188sys.stderr.write('LC_CTYPE=C sed -n "/BEGIN:BTSNOOP_LOG_SUMMARY/,/END:BTSNOOP_LOG_SUMMARY/p " ' +
189sys.argv[1] + ' | egrep -av "BTSNOOP_LOG_SUMMARY" | ' + sys.argv[0] + ' > hci.log\n')
190 sys.exit(1)
193 sys.stderr.write('No btsnooz section found in bugreport.\n')
194 sys.exit(1)