diff options
author | Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> | 2006-02-24 16:03:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-24 17:31:37 -0500 |
commit | fe1db50c7222c67466e41241bc7ef17b469bcf1d (patch) | |
tree | 1956b61473d8e9cc8a1a0849e75a728b1395f902 /arch/um/drivers/cow_user.c | |
parent | f462e8f913bdc7a28ce55508d0c045a0c445b157 (diff) |
[PATCH] uml: tidying COW code
Improve (especially for coherence) some prototypes, and return code of
init_cow_file in error case - for a short write return -EINVAL, otherwise
return the error we got!
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/drivers/cow_user.c')
-rw-r--r-- | arch/um/drivers/cow_user.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/um/drivers/cow_user.c b/arch/um/drivers/cow_user.c index d1c86bc377bd..61951b721268 100644 --- a/arch/um/drivers/cow_user.c +++ b/arch/um/drivers/cow_user.c | |||
@@ -362,7 +362,8 @@ int init_cow_file(int fd, char *cow_file, char *backing_file, int sectorsize, | |||
362 | if(err != sizeof(zero)){ | 362 | if(err != sizeof(zero)){ |
363 | cow_printf("Write of bitmap to new COW file '%s' failed, " | 363 | cow_printf("Write of bitmap to new COW file '%s' failed, " |
364 | "err = %d\n", cow_file, -err); | 364 | "err = %d\n", cow_file, -err); |
365 | err = -EINVAL; | 365 | if (err >= 0) |
366 | err = -EINVAL; | ||
366 | goto out; | 367 | goto out; |
367 | } | 368 | } |
368 | 369 | ||