|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH] Convert shutdown to use xenstore
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
|
|
|
|
|