mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-25 19:21:35 +01:00
24 lines
559 B
Python
Executable File
24 lines
559 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import common
|
|
from shell_helpers import LF
|
|
|
|
class Main(common.LkmcCliFunction):
|
|
def __init__(self):
|
|
super().__init__(
|
|
defaults={
|
|
'emulators': ['gem5'],
|
|
},
|
|
description='Connect a terminal to a running gem5 instance',
|
|
)
|
|
def timed_main(self):
|
|
return self.sh.run_cmd([
|
|
self.env['gem5_m5term'],
|
|
'localhost',
|
|
str(self.env['gem5_telnet_port']),
|
|
LF,
|
|
])
|
|
|
|
if __name__ == '__main__':
|
|
Main().cli_exit()
|