Skip to content

Commit a374a48

Browse files
Paolo 'Blaisorblade' GiarrussoLinus Torvalds
authored andcommitted
[PATCH] uml ubd code: fix a bit of whitespace
Correct a bit of whitespace problems while working here. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 4833aff commit a374a48

1 file changed

Lines changed: 17 additions & 14 deletions

File tree

‎arch/um/drivers/ubd_kern.c‎

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,15 +1194,16 @@ int open_ubd_file(char *file, struct openflags *openflags,
11941194
int fd, err, sectorsize, asked_switch, mode = 0644;
11951195

11961196
fd = os_open_file(file, *openflags, mode);
1197-
if(fd < 0){
1198-
if((fd == -ENOENT) && (create_cow_out != NULL))
1197+
if (fd < 0) {
1198+
if ((fd == -ENOENT) && (create_cow_out != NULL))
11991199
*create_cow_out = 1;
1200-
if(!openflags->w ||
1201-
((fd != -EROFS) && (fd != -EACCES))) return(fd);
1200+
if (!openflags->w ||
1201+
((fd != -EROFS) && (fd != -EACCES)))
1202+
return fd;
12021203
openflags->w = 0;
12031204
fd = os_open_file(file, *openflags, mode);
1204-
if(fd < 0)
1205-
return(fd);
1205+
if (fd < 0)
1206+
return fd;
12061207
}
12071208

12081209
err = os_lock_file(fd, openflags->w);
@@ -1212,7 +1213,8 @@ int open_ubd_file(char *file, struct openflags *openflags,
12121213
}
12131214

12141215
/* Succesful return case! */
1215-
if(backing_file_out == NULL) return(fd);
1216+
if(backing_file_out == NULL)
1217+
return(fd);
12161218

12171219
err = read_cow_header(file_reader, &fd, &version, &backing_file, &mtime,
12181220
&size, &sectorsize, &align, bitmap_offset_out);
@@ -1221,7 +1223,8 @@ int open_ubd_file(char *file, struct openflags *openflags,
12211223
"errno = %d\n", file, -err);
12221224
goto out_close;
12231225
}
1224-
if(err) return(fd);
1226+
if(err)
1227+
return(fd);
12251228

12261229
asked_switch = path_requires_switch(*backing_file_out, backing_file, file);
12271230

@@ -1230,24 +1233,24 @@ int open_ubd_file(char *file, struct openflags *openflags,
12301233
printk("Switching backing file to '%s'\n", *backing_file_out);
12311234
err = write_cow_header(file, fd, *backing_file_out,
12321235
sectorsize, align, &size);
1233-
if(err){
1236+
if (err) {
12341237
printk("Switch failed, errno = %d\n", -err);
12351238
goto out_close;
12361239
}
1237-
}
1238-
else {
1240+
} else {
12391241
*backing_file_out = backing_file;
12401242
err = backing_file_mismatch(*backing_file_out, size, mtime);
1241-
if(err) goto out_close;
1243+
if (err)
1244+
goto out_close;
12421245
}
12431246

12441247
cow_sizes(version, size, sectorsize, align, *bitmap_offset_out,
12451248
bitmap_len_out, data_offset_out);
12461249

1247-
return(fd);
1250+
return fd;
12481251
out_close:
12491252
os_close_file(fd);
1250-
return(err);
1253+
return err;
12511254
}
12521255

12531256
int create_cow_file(char *cow_file, char *backing_file, struct openflags flags,

0 commit comments

Comments
 (0)