[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>
This commit is contained in:
parent
4833aff757
commit
a374a48ffb
|
@ -1194,15 +1194,16 @@ int open_ubd_file(char *file, struct openflags *openflags,
|
||||||
int fd, err, sectorsize, asked_switch, mode = 0644;
|
int fd, err, sectorsize, asked_switch, mode = 0644;
|
||||||
|
|
||||||
fd = os_open_file(file, *openflags, mode);
|
fd = os_open_file(file, *openflags, mode);
|
||||||
if(fd < 0){
|
if (fd < 0) {
|
||||||
if((fd == -ENOENT) && (create_cow_out != NULL))
|
if ((fd == -ENOENT) && (create_cow_out != NULL))
|
||||||
*create_cow_out = 1;
|
*create_cow_out = 1;
|
||||||
if(!openflags->w ||
|
if (!openflags->w ||
|
||||||
((fd != -EROFS) && (fd != -EACCES))) return(fd);
|
((fd != -EROFS) && (fd != -EACCES)))
|
||||||
|
return fd;
|
||||||
openflags->w = 0;
|
openflags->w = 0;
|
||||||
fd = os_open_file(file, *openflags, mode);
|
fd = os_open_file(file, *openflags, mode);
|
||||||
if(fd < 0)
|
if (fd < 0)
|
||||||
return(fd);
|
return fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = os_lock_file(fd, openflags->w);
|
err = os_lock_file(fd, openflags->w);
|
||||||
|
@ -1212,7 +1213,8 @@ int open_ubd_file(char *file, struct openflags *openflags,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Succesful return case! */
|
/* Succesful return case! */
|
||||||
if(backing_file_out == NULL) return(fd);
|
if(backing_file_out == NULL)
|
||||||
|
return(fd);
|
||||||
|
|
||||||
err = read_cow_header(file_reader, &fd, &version, &backing_file, &mtime,
|
err = read_cow_header(file_reader, &fd, &version, &backing_file, &mtime,
|
||||||
&size, §orsize, &align, bitmap_offset_out);
|
&size, §orsize, &align, bitmap_offset_out);
|
||||||
|
@ -1221,7 +1223,8 @@ int open_ubd_file(char *file, struct openflags *openflags,
|
||||||
"errno = %d\n", file, -err);
|
"errno = %d\n", file, -err);
|
||||||
goto out_close;
|
goto out_close;
|
||||||
}
|
}
|
||||||
if(err) return(fd);
|
if(err)
|
||||||
|
return(fd);
|
||||||
|
|
||||||
asked_switch = path_requires_switch(*backing_file_out, backing_file, file);
|
asked_switch = path_requires_switch(*backing_file_out, backing_file, file);
|
||||||
|
|
||||||
|
@ -1230,24 +1233,24 @@ int open_ubd_file(char *file, struct openflags *openflags,
|
||||||
printk("Switching backing file to '%s'\n", *backing_file_out);
|
printk("Switching backing file to '%s'\n", *backing_file_out);
|
||||||
err = write_cow_header(file, fd, *backing_file_out,
|
err = write_cow_header(file, fd, *backing_file_out,
|
||||||
sectorsize, align, &size);
|
sectorsize, align, &size);
|
||||||
if(err){
|
if (err) {
|
||||||
printk("Switch failed, errno = %d\n", -err);
|
printk("Switch failed, errno = %d\n", -err);
|
||||||
goto out_close;
|
goto out_close;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
*backing_file_out = backing_file;
|
*backing_file_out = backing_file;
|
||||||
err = backing_file_mismatch(*backing_file_out, size, mtime);
|
err = backing_file_mismatch(*backing_file_out, size, mtime);
|
||||||
if(err) goto out_close;
|
if (err)
|
||||||
|
goto out_close;
|
||||||
}
|
}
|
||||||
|
|
||||||
cow_sizes(version, size, sectorsize, align, *bitmap_offset_out,
|
cow_sizes(version, size, sectorsize, align, *bitmap_offset_out,
|
||||||
bitmap_len_out, data_offset_out);
|
bitmap_len_out, data_offset_out);
|
||||||
|
|
||||||
return(fd);
|
return fd;
|
||||||
out_close:
|
out_close:
|
||||||
os_close_file(fd);
|
os_close_file(fd);
|
||||||
return(err);
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
int create_cow_file(char *cow_file, char *backing_file, struct openflags flags,
|
int create_cow_file(char *cow_file, char *backing_file, struct openflags flags,
|
||||||
|
|
Loading…
Reference in New Issue