]> xenbits.xensource.com Git - qemu-xen-4.4-testing.git/commitdiff
Battery management - compilation fixes
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 23 Oct 2008 09:21:41 +0000 (10:21 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 23 Oct 2008 09:21:41 +0000 (10:21 +0100)
 * xenstore_refresh_battery_status declaration and definition
   was missing void (interpreted in C as K&R syntax)
 * a couple of functions returning int returned NULL on failure

qemu-xen.h
xenstore.c

index 8704774b2ecca2e77baf156cb02fc14d290857cd..c9df5bda7d441408bd797c60e98a41015737af88 100644 (file)
@@ -87,7 +87,7 @@ int xenstore_vm_write(int domid, char *key, char *val);
 char *xenstore_vm_read(int domid, char *key, unsigned int *len);
 char *xenstore_device_model_read(int domid, char *key, unsigned int *len);
 char *xenstore_read_battery_data(int battery_status);
-int xenstore_refresh_battery_status();
+int xenstore_refresh_battery_status(void);
 
 /* xenfbfront.c */
 int xenfb_pv_display_init(DisplayState *ds);
index 3b3883765f85b96d5f0c0e317c6dea653d201a70..d064df100fc16da914c397721bb96cce8d4a4f1d 100644 (file)
@@ -1190,7 +1190,7 @@ int xenstore_extended_power_mgmt_write(char * key, char * value)
     char *path = NULL;
     
     if (pasprintf(&path, "/pm/%s", key) == -1)
-        return NULL;
+        return -1;
 
     ret = xs_write(xsh, XBT_NULL, path, value, strlen(value));
     free(path);
@@ -1203,7 +1203,7 @@ int xenstore_extended_power_mgmt_event_trigger(char *key, char * value)
     char *path = NULL;
     
     if (pasprintf(&path, "events/%s", key) == -1)
-        return NULL;
+        return -1;
 
     ret = xenstore_extended_power_mgmt_write(path, value);
     free(path);
@@ -1230,7 +1230,7 @@ char *xenstore_read_battery_data(int battery_status)
  * Xen power management daemon watches for changes to this
  * entry and triggers a refresh.   
  */
-int xenstore_refresh_battery_status()
+int xenstore_refresh_battery_status(void)
 {
     return xenstore_extended_power_mgmt_event_trigger("refreshbatterystatus", "1");
 }