From: Blaisorblade <blaisorblade@yahoo.it>
To: user-mode-linux-devel@lists.sourceforge.net,
Jeff Dike <jdike@addtoit.com>
Cc: stian@nixia.no, Gigie Lertriniva <gigie_lertriniva@yahoo.com>
Subject: Re: [uml-devel] uml_moo
Date: Sun, 6 Mar 2005 20:16:17 +0100 [thread overview]
Message-ID: <200503062016.17186.blaisorblade@yahoo.it> (raw)
In-Reply-To: <3809.83.109.31.19.1105785957.squirrel@83.109.31.19>
[-- Attachment #1: Type: text/plain, Size: 1100 bytes --]
On Saturday 15 January 2005 11:45, stian@nixia.no wrote:
> I have one issue with uml_moo.
>
> uml_moo and the kernel cow drivers doesn't seem to use the same method
> when calculating the size of the backing file.
>
> I used /dev/hdc1 which was an block device (147 GB partition)
>
> uml kernel perfectely finds the correct size. uml_moo uses stat on the
> device which gives size 0, og uml_moo fails.
Try the patch.
> Also I see that it is
> compiled with 64bit file support, but shouldn't you define _GNU_SOURCE as
> well?
Well, it works, and no idea. Did you notice _XOPEN_SOURCE defined in
moo/uml_moo.c? I'm in a hurry so I'm not checking the exact various
situations.
> Since off_t didn't need %lld in the printf, but %ld as the
> source-code now uses which is 32bit on i386 atleast. The last thingy was
> just a question.
Where?
>
> Stian
Somebody also complained about wrong text messages (no version 3 support is
declared in the help). So I'm working also on the above.
--
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade
[-- Attachment #2: moo-little-fixes.patch --]
[-- Type: text/x-diff, Size: 1786 bytes --]
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
---
tools-paolo/moo/cow.c | 2 +-
tools-paolo/moo/cow_sys.h | 4 ++--
tools-paolo/moo/uml_moo.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff -puN moo/cow.c~moo-little-fixes moo/cow.c
--- tools/moo/cow.c~moo-little-fixes 2005-03-06 19:42:38.580011064 +0100
+++ tools-paolo/moo/cow.c 2005-03-06 19:43:41.456452392 +0100
@@ -298,7 +298,7 @@ int read_cow_header(int (*reader)(__u64,
}
else if(version == 3){
if(n < sizeof(header->v3)){
- cow_printf("read_cow_header - failed to read V2 "
+ cow_printf("read_cow_header - failed to read V3 "
"header\n");
goto out;
}
diff -puN moo/uml_moo.c~moo-little-fixes moo/uml_moo.c
--- tools/moo/uml_moo.c~moo-little-fixes 2005-03-06 19:44:34.553380432 +0100
+++ tools-paolo/moo/uml_moo.c 2005-03-06 19:44:45.431726672 +0100
@@ -203,7 +203,7 @@ static char *usage_string =
"its current backing file\n"
"Specifying -b overrides the backing_file specified in the COW file. This is\n"
"needed when dealing with a COW file that was created inside a chroot jail.\n"
-"%s supports version 1 and 2 COW files.\n"
+"%s supports version 1,2 and 3 COW files.\n"
"";
static int Usage(char *prog) {
diff -puN moo/cow_sys.h~moo-little-fixes moo/cow_sys.h
--- tools/moo/cow_sys.h~moo-little-fixes 2005-03-06 20:08:18.120965264 +0100
+++ tools-paolo/moo/cow_sys.h 2005-03-06 20:08:20.556594992 +0100
@@ -48,9 +48,9 @@ static inline int cow_seek_file(int fd,
static inline int cow_file_size(char *file, long long *size_out)
{
- struct stat buf;
+ struct stat64 buf;
- if(stat(file, &buf) == -1){
+ if (stat64(file, &buf) == -1) {
cow_printf("Couldn't stat \"%s\" : errno = %d\n", file, errno);
return(-errno);
}
_
next prev parent reply other threads:[~2005-03-07 19:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-15 10:45 [uml-devel] uml_moo stian
2005-03-06 19:16 ` Blaisorblade [this message]
2005-03-12 3:08 ` Jeff Dike
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200503062016.17186.blaisorblade@yahoo.it \
--to=blaisorblade@yahoo.it \
--cc=gigie_lertriniva@yahoo.com \
--cc=jdike@addtoit.com \
--cc=stian@nixia.no \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox