direct-io.hg
changeset 5670:47295d6ca1d7
Cleanup whitespace.
author | cl349@firebug.cl.cam.ac.uk |
---|---|
date | Tue Jul 05 09:01:37 2005 +0000 (2005-07-05) |
parents | ff5d7ccd8d69 |
children | ec3b7c87b577 |
files | linux-2.6.11-xen-sparse/drivers/xen/xenbus/xenbus_xs.c |
line diff
1.1 --- a/linux-2.6.11-xen-sparse/drivers/xen/xenbus/xenbus_xs.c Tue Jul 05 08:47:55 2005 +0000 1.2 +++ b/linux-2.6.11-xen-sparse/drivers/xen/xenbus/xenbus_xs.c Tue Jul 05 09:01:37 2005 +0000 1.3 @@ -54,7 +54,8 @@ static int get_error(const char *errorst 1.4 1.5 for (i = 0; !streq(errorstring, xsd_errors[i].errstring); i++) { 1.6 if (i == ARRAY_SIZE(xsd_errors) - 1) { 1.7 - printk(KERN_WARNING "XENBUS xen store gave: unknown error %s", 1.8 + printk(KERN_WARNING 1.9 + "XENBUS xen store gave: unknown error %s", 1.10 errorstring); 1.11 return EINVAL; 1.12 } 1.13 @@ -197,14 +198,14 @@ char **xs_directory(const char *path, un 1.14 /* Check if a path exists. Return 1 if it does. */ 1.15 int xs_exists(const char *path) 1.16 { 1.17 - char **dir; 1.18 - int dir_n; 1.19 + char **dir; 1.20 + int dir_n; 1.21 1.22 - dir = xs_directory(path, &dir_n); 1.23 - if(IS_ERR(dir)) 1.24 - return 0; 1.25 - kfree(dir); 1.26 - return 1; 1.27 + dir = xs_directory(path, &dir_n); 1.28 + if (IS_ERR(dir)) 1.29 + return 0; 1.30 + kfree(dir); 1.31 + return 1; 1.32 } 1.33 1.34 /* Make a directory, creating dirs on the path to it if necessary. 1.35 @@ -212,30 +213,29 @@ int xs_exists(const char *path) 1.36 */ 1.37 int xs_mkdirs(const char *path) 1.38 { 1.39 - int err = 0; 1.40 - char s[strlen(path) + 1], *p = s; 1.41 + int err = 0; 1.42 + char s[strlen(path) + 1], *p = s; 1.43 1.44 - if(xs_exists(path)) 1.45 - goto out; 1.46 - strcpy(p, path); 1.47 - if(*p == '/') 1.48 - p++; 1.49 - for( ; ; ){ 1.50 - p = strchr(p, '/'); 1.51 - if(p) 1.52 - *p = '\0'; 1.53 - if(!xs_exists(s)){ 1.54 - err = xs_mkdir(s); 1.55 - if(err) 1.56 - goto out; 1.57 - 1.58 - } 1.59 - if(!p) 1.60 - break; 1.61 - *p++ = '/'; 1.62 + if (xs_exists(path)) 1.63 + goto out; 1.64 + strcpy(p, path); 1.65 + if (*p == '/') 1.66 + p++; 1.67 + for (;;) { 1.68 + p = strchr(p, '/'); 1.69 + if (p) 1.70 + *p = '\0'; 1.71 + if (!xs_exists(s)) { 1.72 + err = xs_mkdir(s); 1.73 + if (err) 1.74 + goto out; 1.75 + } 1.76 + if (!p) 1.77 + break; 1.78 + *p++ = '/'; 1.79 } 1.80 - out: 1.81 - return err; 1.82 + out: 1.83 + return err; 1.84 } 1.85 1.86