self._print(resp)
return True
- def connect(self):
- self._greeting = qmp.QEMUMonitorProtocol.connect(self)
+ def connect(self, negotiate):
+ self._greeting = qmp.QEMUMonitorProtocol.connect(self, negotiate)
self.__completer_setup()
def show_banner(self, msg='Welcome to the QMP low-level shell!'):
def fail_cmdline(option=None):
if option:
sys.stderr.write('ERROR: bad command-line option \'%s\'\n' % option)
- sys.stderr.write('qemu-shell [ -v ] [ -p ] [ -H ] < UNIX socket path> | < TCP address:port >\n')
+ sys.stderr.write('qemu-shell [ -v ] [ -p ] [ -H ] [ -N ] < UNIX socket path> | < TCP address:port >\n')
sys.exit(1)
def main():
hmp = False
pretty = False
verbose = False
+ negotiate = True
try:
for arg in sys.argv[1:]:
hmp = True
elif arg == "-p":
pretty = True
+ elif arg == "-N":
+ negotiate = False
elif arg == "-v":
verbose = True
else:
die('bad port number in command-line')
try:
- qemu.connect()
+ qemu.connect(negotiate)
except qmp.QMPConnectError:
die('Didn\'t get QMP greeting message')
except qmp.QMPCapabilitiesError: