Actually, the patch doesn't apply for me.
Running a "patch -p1 < uml-fix-back-types-no-warning" from the
linux-2.6.16 directory gives me this error:
Hunk #1 FAILED at 46.
1 out of 1 hunk FAILED -- saving rejects to file arch/um/drivers/cow.h.rej
patching file arch/um/drivers/cow_sys.h
Hunk #1 succeeded at 28 with fuzz 2.
Here is cow.h.rej
***************
*** 46,52 ****
extern int read_cow_header(int (*reader)(__u64, char *, int, void *),
void *arg, __u32 *version_out,
char **backing_file_out, time_t *mtime_out,
- __u64 *size_out, int *sectorsize_out,
__u32 *align_out, int *bitmap_offset_out);
extern int write_cow_header(char *cow_file, int fd, char *backing_file,
--- 46,52 ----
extern int read_cow_header(int (*reader)(__u64, char *, int, void *),
void *arg, __u32 *version_out,
char **backing_file_out, time_t *mtime_out,
+ unsigned long long *size_out, int
*sectorsize_out,
__u32 *align_out, int *bitmap_offset_out);
extern int write_cow_header(char *cow_file, int fd, char *backing_file,
I thought this was weird, so I did my own patch:
diff -Naur linux-2.6.16/arch/um/drivers/cow.h
linux-2.6.16.new/arch/um/drivers/cow.h
--- linux-2.6.16/arch/um/drivers/cow.h 2006-04-07 09:14:20.000000000 -0700
+++ linux-2.6.16.new/arch/um/drivers/cow.h 2006-04-07
08:59:41.000000000 -0700
@@ -46,7 +46,7 @@
extern int read_cow_header(int (*reader)(__u64, char *, int, void *),
void *arg, __u32 *version_out,
char **backing_file_out, time_t *mtime_out,
- __u64 *size_out, int *sectorsize_out,
+ unsigned long long *size_out, int
*sectorsize_out,
__u32 *align_out, int *bitmap_offset_out);
extern int write_cow_header(char *cow_file, int fd, char *backing_file,
diff -Naur linux-2.6.16/arch/um/drivers/cow_sys.h
linux-2.6.16.new/arch/um/drivers/cow_sys.h
--- linux-2.6.16/arch/um/drivers/cow_sys.h 2006-04-07
09:14:20.000000000 -0700
+++ linux-2.6.16.new/arch/um/drivers/cow_sys.h 2006-04-07
08:59:57.000000000 -0700
@@ -28,7 +28,7 @@
return(os_seek_file(fd, offset));
}
-static inline int cow_file_size(char *file, __u64 *size_out)
+static inline int cow_file_size(char *file, unsigned long long *size_out)
{
return(os_file_size(file, size_out));
}
Now, running a "patch -p1 < my_diff" in the linux-2.6.16 directory works.
I can't tell a difference between the two patches.
Aside from that, the patch compiles and gives me a working binary.
Thanks.
Blaisorblade wrote:
On Saturday 01 April 2006 02:45, Blaisorblade wrote:
On Friday 31 March 2006 18:47, Wesley Emeneker wrote:
On Friday 31 March 2006 02:52, Wesley Emeneker wrote:
I just downloaded the 2.6.16-bb1 patch and tried to compile against
2.6.16. I encountered a problem in arch/um/drivers/cow_sys.h,cow.h,
and cow_user.c
[...]
The simple and obvious fix is to change "__u64" in cow_sys.h and cow.h
to be "unsigned long long",
Ok, can you verify that the attached patch is exactly the correct one to fix
this problem? I'll include it in next -bb and upstream release. Thanks for
the report.
------------------------------------------------------------------------
uml: avoid warnings for diffent names for an unsigned quadword
From: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]>
Since on some 64-bit systems __u64 is rightfully defined to unsigned long and
GCC recognizes anyway unsigned long and unsigned long long as different, fix
some types back to being unsigned long long to avoid warnings and errors (for
prototype mismatch) on those systems.
Thanks to the report by Wesley Emeneker wesleyemeneker (at) google (dot) com
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <[EMAIL PROTECTED]>
Index: linux-2.6.16/arch/um/drivers/cow.h
===================================================================
--- linux-2.6.16.orig/arch/um/drivers/cow.h
+++ linux-2.6.16/arch/um/drivers/cow.h
@@ -46,7 +46,7 @@ extern int file_reader(__u64 offset, cha
extern int read_cow_header(int (*reader)(__u64, char *, int, void *),
void *arg, __u32 *version_out,
char **backing_file_out, time_t *mtime_out,
- __u64 *size_out, int *sectorsize_out,
+ unsigned long long *size_out, int *sectorsize_out,
__u32 *align_out, int *bitmap_offset_out);
extern int write_cow_header(char *cow_file, int fd, char *backing_file,
Index: linux-2.6.16/arch/um/drivers/cow_sys.h
===================================================================
--- linux-2.6.16.orig/arch/um/drivers/cow_sys.h
+++ linux-2.6.16/arch/um/drivers/cow_sys.h
@@ -28,7 +28,7 @@ static inline int cow_seek_file(int fd,
return(os_seek_file(fd, offset));
}
-static inline int cow_file_size(char *file, __u64 *size_out)
+static inline int cow_file_size(char *file, unsigned long long *size_out)
{
return(os_file_size(file, size_out));
}
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user