[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: Dan Smith <danms@xxxxxxxxxx>
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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);
+#ifdef CONFIG_MAGIC_SYSRQ
+    err2 = register_xenbus_watch(&sysrq_watch);
+#endif
+    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.

regards,
aq

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.