]> xenbits.xensource.com Git - people/royger/linux-2.6.18-xen.git/commitdiff
xenbus: add __attribute__((format(printf... where appropriate
authorJan Beulcih <jbeulich@novell.com>
Thu, 23 Jun 2011 10:12:32 +0000 (11:12 +0100)
committerJan Beulcih <jbeulich@novell.com>
Thu, 23 Jun 2011 10:12:32 +0000 (11:12 +0100)
From: Joe Perches <joe@perches.com>

Use the compiler to verify printf formats and arguments.

Fix fallout.

Signed-off-by: Joe Perches <joe@perches.com>
Make apply, slightly re-format, and fix more fallout (in blktap).

Signed-off-by: Jan Beulcih <jbeulich@novell.com>
drivers/xen/blkback/xenbus.c
drivers/xen/blktap/xenbus.c
include/xen/xenbus.h

index cbbb8fc8f858289fa16a4986d36f29b358f8c468..4f2c0dd0b46515fb604a25dea8b0f4f62680fb17 100644 (file)
@@ -473,7 +473,7 @@ again:
 
        err = xenbus_switch_state(dev, XenbusStateConnected);
        if (err)
-               xenbus_dev_fatal(dev, err, "switching to Connected state",
+               xenbus_dev_fatal(dev, err, "%s: switching to Connected state",
                                 dev->nodename);
 
        return;
index cbdc24d1bfb29b73cb46e1e3e4934c548b602c3c..922ace747894e4c3e6a01a4e649efc601c55660b 100644 (file)
@@ -426,7 +426,7 @@ static void connect(struct backend_info *be)
 
        err = xenbus_switch_state(dev, XenbusStateConnected);
        if (err)
-               xenbus_dev_fatal(dev, err, "switching to Connected state",
+               xenbus_dev_fatal(dev, err, "%s: switching to Connected state",
                                 dev->nodename);
 
        return;
index 06e9145f3b2096a20ee4d43211ae000586371ab1..f1e798192d8af0e44ae8cb451843261bf4e3f7c4 100644 (file)
@@ -276,7 +276,7 @@ enum xenbus_state xenbus_read_driver_state(const char *path);
  * formatted message.
  */
 void xenbus_dev_error(struct xenbus_device *dev, int err, const char *fmt,
-                     ...);
+                     ...) __attribute__((__format__(__printf__, 3, 4)));
 
 
 /***
@@ -285,7 +285,7 @@ void xenbus_dev_error(struct xenbus_device *dev, int err, const char *fmt,
  * closedown of this driver and its peer.
  */
 void xenbus_dev_fatal(struct xenbus_device *dev, int err, const char *fmt,
-                     ...);
+                     ...) __attribute__((__format__(__printf__, 3, 4)));
 
 int xenbus_dev_init(void);