* [uml-devel] [PATCH 2/6] UML - Use 64-bits for block size on x86_64
@ 2007-08-17 19:43 ` Jeff Dike
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Dike @ 2007-08-17 19:43 UTC (permalink / raw)
To: Andrew Morton; +Cc: Nicolas George, LKML, uml-devel
The BLKGETSIZE ioctl expects a pointer to a long, os_file_size was providing
an int. Therefore, ubd access to host block devices caused a segmentation
fault on 64 bits systems.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
--
arch/um/os-Linux/file.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: linux-2.6.22/arch/um/os-Linux/file.c
===================================================================
--- linux-2.6.22.orig/arch/um/os-Linux/file.c 2007-08-17 13:36:35.000000000 -0400
+++ linux-2.6.22/arch/um/os-Linux/file.c 2007-08-17 13:37:55.000000000 -0400
@@ -296,7 +296,8 @@ int os_file_size(char *file, unsigned lo
}
if(S_ISBLK(buf.ust_mode)){
- int fd, blocks;
+ int fd;
+ long blocks;
fd = os_open_file(file, of_read(OPENFLAGS()), 0);
if(fd < 0){
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/6] UML - Use 64-bits for block size on x86_64
@ 2007-08-17 19:43 ` Jeff Dike
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Dike @ 2007-08-17 19:43 UTC (permalink / raw)
To: Andrew Morton; +Cc: LKML, uml-devel, Nicolas George
The BLKGETSIZE ioctl expects a pointer to a long, os_file_size was providing
an int. Therefore, ubd access to host block devices caused a segmentation
fault on 64 bits systems.
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
--
arch/um/os-Linux/file.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: linux-2.6.22/arch/um/os-Linux/file.c
===================================================================
--- linux-2.6.22.orig/arch/um/os-Linux/file.c 2007-08-17 13:36:35.000000000 -0400
+++ linux-2.6.22/arch/um/os-Linux/file.c 2007-08-17 13:37:55.000000000 -0400
@@ -296,7 +296,8 @@ int os_file_size(char *file, unsigned lo
}
if(S_ISBLK(buf.ust_mode)){
- int fd, blocks;
+ int fd;
+ long blocks;
fd = os_open_file(file, of_read(OPENFLAGS()), 0);
if(fd < 0){
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-08-18 0:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-17 19:43 [uml-devel] [PATCH 2/6] UML - Use 64-bits for block size on x86_64 Jeff Dike
2007-08-17 19:43 ` Jeff Dike
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.