WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] xend: Discard error messages of lsscsi

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: Discard error messages of lsscsi
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 11 Mar 2009 03:30:34 -0700
Delivery-date: Wed, 11 Mar 2009 03:31:41 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1236766473 0
# Node ID 57a67b02e44835d751d99e18470678f28cf01016
# Parent  20a2e3f724d55446c22f5166bf89a6589a3f08f7
xend: Discard error messages of lsscsi

In the case of a host OS without lsscsi command, the following
error message is recorded into xend-debug.log when xend is started.
The error message is recorded once certainly.  If SCSI devices are
connected to the host OS, it is recorded to the number of SCSI
devices.

  sh: lsscsi: command not found

This patch discards the error message to /dev/null.

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/xen/util/vscsi_util.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -r 20a2e3f724d5 -r 57a67b02e448 tools/python/xen/util/vscsi_util.py
--- a/tools/python/xen/util/vscsi_util.py       Wed Mar 11 10:13:46 2009 +0000
+++ b/tools/python/xen/util/vscsi_util.py       Wed Mar 11 10:14:33 2009 +0000
@@ -90,7 +90,7 @@ def _vscsi_get_scsidevices_by_lsscsi(opt
 
     devices = []
 
-    for scsiinfo in os.popen('lsscsi -g %s' % option).readlines():
+    for scsiinfo in os.popen('lsscsi -g %s 2>/dev/null' % option).readlines():
         s = scsiinfo.split()
         hctl = s[0][1:-1]
         try:
@@ -248,7 +248,7 @@ def get_all_scsi_devices():
             get_scsi_scsilevel(scsi_dev['physical_HCTL'])
 
         try:
-            lsscsi_info = os.popen('lsscsi ' + 
scsi_dev['physical_HCTL']).read().split()
+            lsscsi_info = os.popen('lsscsi %s 2>/dev/null' % 
scsi_dev['physical_HCTL']).read().split()
             scsi_dev['type'] = lsscsi_info[1]
         except:
             scsi_dev['type'] = None

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xend: Discard error messages of lsscsi, Xen patchbot-unstable <=