Change in vdsm[master]: [WIP]Add text-based console support

zhshzhou at linux.vnet.ibm.com zhshzhou at linux.vnet.ibm.com
Fri Aug 17 06:36:43 UTC 2012


Zhou Zheng Sheng has posted comments on this change.

Change subject: [WIP]Add text-based console support
......................................................................


Patch Set 1: (1 inline comment)

....................................................
File vdsm/consoleServer.py
Line 237:                         if len(buf) == 0:
Line 238:                             self._logger.info("ssh channel closed")
Line 239:                             break
Line 240: 
Line 241:                         os.write(self._input.fileno(), buf)
In "__main__", sys.stdin is given as "inputf" in "__init__", then "inputf" is assigned to "self._input". So write to "self._input" here is actually write to "sys.stdin". Why we write to "sys.stdin"?

After reading the code, I find that "sys.stdin" and "sys.stdout" are both redirected to the console pty, so they are interchangeable, but I still think the naming is a bit confused to me.
Line 242:                     elif self._output in rd:
Line 243:                         buf = os.read(self._output.fileno(), 1)
Line 244: 
Line 245:                         if chan.send(buf) == 0:


--
To view, visit http://gerrit.ovirt.org/7165
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I69904bf7aafd4f764a256d4075c9bf71d988e7c5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Xu He Jie <xuhj at linux.vnet.ibm.com>
Gerrit-Reviewer: Adam Litke <agl at us.ibm.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Royce Lv <lvroyce at linux.vnet.ibm.com>
Gerrit-Reviewer: Ryan Harper <ryanh at us.ibm.com>
Gerrit-Reviewer: Xu He Jie <xuhj at linux.vnet.ibm.com>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list