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] Added do_without_error function, and squelch the error f

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Added do_without_error function, and squelch the error from mkdir when trying
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 09 Dec 2005 14:44:11 +0000
Delivery-date: Fri, 09 Dec 2005 14:47:38 +0000
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID a12bd9e8fdf8bb647c6834a441f81d88b6adccc5
# Parent  1aaa1abab953bddedaa5009e326fef7fceac56db
Added do_without_error function, and squelch the error from mkdir when trying
to create the lock directory.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r 1aaa1abab953 -r a12bd9e8fdf8 tools/examples/xen-hotplug-common.sh
--- a/tools/examples/xen-hotplug-common.sh      Fri Dec  9 10:49:29 2005
+++ b/tools/examples/xen-hotplug-common.sh      Fri Dec  9 10:50:26 2005
@@ -44,6 +44,10 @@
 
 do_or_die() {
   "$@" || fatal "$@ failed"
+}
+
+do_without_error() {
+  "$@" 2>/dev/null || log debug "$@ failed"
 }
 
 sigerr() {
@@ -121,7 +125,7 @@
 
   while [ $retries -lt $LOCK_RETRIES ]
   do
-    mkdir "$lockdir" && trap "release_lock $1; sigerr" ERR &&
+    mkdir "$lockdir" 2>/dev/null && trap "release_lock $1; sigerr" ERR &&
       _update_lock_info "$lockdir" && return
 
     local new_owner=$(_lock_owner "$lockdir")

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Added do_without_error function, and squelch the error from mkdir when trying, Xen patchbot -unstable <=