Blame SOURCES/0003-xen-Don-t-emit-warning-message-if-proc-xen-capabilit.patch

45b90b
From 8709c0e87dc3124b1a64d85654d6d4904702d767 Mon Sep 17 00:00:00 2001
45b90b
From: "Richard W.M. Jones" <rjones@redhat.com>
45b90b
Date: Mon, 28 Oct 2013 11:09:24 +0000
f83e65
Subject: [PATCH 03/26] xen: Don't emit warning message if
f83e65
 /proc/xen/capabilities file does not exist.
45b90b
45b90b
On Amazon EC2:
45b90b
45b90b
xen
45b90b
grep: /proc/xen/capabilities: No such file or directory
45b90b
xen-domU
45b90b
45b90b
The warning is harmless but should not be printed.
45b90b
45b90b
Thanks: Can Zhang for testing.
45b90b
---
45b90b
 virt-what.in | 2 +-
45b90b
 1 file changed, 1 insertion(+), 1 deletion(-)
45b90b
45b90b
diff --git a/virt-what.in b/virt-what.in
45b90b
index bf663aa..4b6d3b8 100644
45b90b
--- a/virt-what.in
45b90b
+++ b/virt-what.in
45b90b
@@ -199,7 +199,7 @@ if [ "$cpuid" = "XenVMMXenVMM" ]; then
45b90b
     skip_qemu_kvm=true
45b90b
 elif [ -d "${root}/proc/xen" ]; then
45b90b
     echo xen
45b90b
-    if grep -q "control_d" "${root}/proc/xen/capabilities"; then
45b90b
+    if grep -q "control_d" "${root}/proc/xen/capabilities" 2>/dev/null; then
45b90b
         echo xen-dom0
45b90b
     else
45b90b
         echo xen-domU
45b90b
-- 
45b90b
1.8.3.1
45b90b