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/
Home Products Support Community News


Re: [Xen-devel] [PATCH] Convert shutdown to use xenstore

To: Dan Smith <danms@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Convert shutdown to use xenstore
From: aq <aquynh@xxxxxxxxx>
Date: Fri, 5 Aug 2005 12:58:51 +0900
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 05 Aug 2005 03:57:16 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=TQ8Od0lyjOLxnGMcMzTYkYrP/2wTArtc5lEg/MuywhbayOhwH3S2QH12dNz4q9uvZOS4N2eEUizuN/HI435i0sQMnDY9MKH5ov1hW2fBa2LnIpZk3t3Nyi3hBW4OkB5+smJYdxyBjGYM8XV5EvaGWKyA5NyFcE/gT3VIB+IQiwI=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <m364ulzpde.fsf@xxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <m364ulzpde.fsf@xxxxxxxxxxxxxxxxxxxxxxxx>
Reply-to: aq <aquynh@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On 8/5/05, Dan Smith <danms@xxxxxxxxxx> wrote:
> The attached patch:
> 1. Converts the shutdown driver and xend to use the store instead of
>    control messages,
> 2. Includes Anthony's xenstore notification code, and
> 3. Changes xend so that sysrq's are no longer sent as "special case"
>    shutdown messages.  Store keys are cheap, so making the sysrq
>    delivery less obscure is good.

+static int setup_shutdown_watcher(struct notifier_block *notifier,
+                                  unsigned long event,
+                                  void *data)
+    int err1=0, err2=0;
+    down(&xenbus_lock);
+    err1 = register_xenbus_watch(&shutdown_watch);
+    err2 = register_xenbus_watch(&sysrq_watch);
+    up(&xenbus_lock);
+    if (err1) {
+        printk("Failed to set shutdown watcher\n");
+    }

How about putting declaration of err2 inside a "#ifdef CONFIG_MAGIC_SYSRQ" ?

Besides i think some printk should use KERN_ERR to report error properly.


Xen-devel mailing list