* Re: [Qemu-devel] QEMU floppy problems (was: ecos and qemu)
2004-07-23 15:08 ` [Qemu-devel] QEMU floppy problems (was: ecos and qemu) Johannes Martin
@ 2004-07-23 15:12 ` Jani Monoses
2004-07-23 15:24 ` [Qemu-devel] Re: QEMU floppy problems Ben Pfaff
2004-07-30 10:01 ` [Qemu-devel] QEMU floppy problems (was: ecos and qemu) Johannes Martin
2004-07-23 15:14 ` [Qemu-devel] QEMU floppy problems (was: ecos and qemu) Jani Monoses
` (2 subsequent siblings)
3 siblings, 2 replies; 13+ messages in thread
From: Jani Monoses @ 2004-07-23 15:12 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 80 bytes --]
and this patch fixes it :)
it's ugly though...
does it work for you guys?
Jani
[-- Attachment #2: ,l.diff --]
[-- Type: text/x-diff, Size: 1045 bytes --]
Index: block.c
===================================================================
RCS file: /cvsroot/qemu/qemu/block.c,v
retrieving revision 1.10
diff -u -r1.10 block.c
--- block.c 14 Jul 2004 17:20:30 -0000 1.10
+++ block.c 23 Jul 2004 15:12:21 -0000
@@ -311,6 +311,7 @@
{
int ret, n, fd;
int64_t offset;
+ int bytes = 512;
if (!bs->inserted)
return -1;
@@ -320,7 +321,7 @@
fd = bs->cow_fd;
offset = bs->cow_sectors_offset;
} else if (sector_num == 0 && bs->boot_sector_enabled) {
- memcpy(buf, bs->boot_sector_data, 512);
+ memcpy(buf, bs->boot_sector_data, bytes);
n = 1;
goto next;
} else {
@@ -335,8 +336,11 @@
offset += sector_num * 512;
lseek64(fd, offset, SEEK_SET);
ret = read(fd, buf, n * 512);
+
if (ret != n * 512) {
- return -1;
+ if (ret == -1)
+ return -1;
+ bytes = ret;
}
}
next:
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Qemu-devel] Re: QEMU floppy problems
2004-07-23 15:12 ` Jani Monoses
@ 2004-07-23 15:24 ` Ben Pfaff
2004-07-30 10:01 ` [Qemu-devel] QEMU floppy problems (was: ecos and qemu) Johannes Martin
1 sibling, 0 replies; 13+ messages in thread
From: Ben Pfaff @ 2004-07-23 15:24 UTC (permalink / raw)
To: qemu-devel
Jani Monoses <jani@iv.ro> writes:
> and this patch fixes it :)
> it's ugly though...
>
> does it work for you guys?
I was working with 1440 kB files, not odd-sized files, so I think
it's an unrelated problem.
--
"Implementation details are beyond the scope of the Java virtual
machine specification. One should not assume that every virtual
machine implementation contains a giant squid."
--"Mr. Bunny's Big Cup o' Java"
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] QEMU floppy problems (was: ecos and qemu)
2004-07-23 15:12 ` Jani Monoses
2004-07-23 15:24 ` [Qemu-devel] Re: QEMU floppy problems Ben Pfaff
@ 2004-07-30 10:01 ` Johannes Martin
2004-07-30 10:06 ` Jani Monoses
2004-07-30 18:56 ` SPAM[RBL] Re: [Qemu-devel] QEMU floppy problems Leonardo Marques de Souza
1 sibling, 2 replies; 13+ messages in thread
From: Johannes Martin @ 2004-07-30 10:01 UTC (permalink / raw)
To: qemu-devel
On Fri, 23 Jul 2004, Jani Monoses wrote:
> and this patch fixes it :)
> it's ugly though...
>
> does it work for you guys?
No, I cannot read any floppies on Win98 SE or OS/2.
Johannes
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] QEMU floppy problems (was: ecos and qemu)
2004-07-30 10:01 ` [Qemu-devel] QEMU floppy problems (was: ecos and qemu) Johannes Martin
@ 2004-07-30 10:06 ` Jani Monoses
2004-07-30 18:56 ` SPAM[RBL] Re: [Qemu-devel] QEMU floppy problems Leonardo Marques de Souza
1 sibling, 0 replies; 13+ messages in thread
From: Jani Monoses @ 2004-07-30 10:06 UTC (permalink / raw)
To: qemu-devel
On Fri, 30 Jul 2004 12:01:25 +0200 (CEST)
Johannes Martin <jmartin@notamusica.com> wrote:
> On Fri, 23 Jul 2004, Jani Monoses wrote:
> > and this patch fixes it :)
> > it's ugly though...
> >
> > does it work for you guys?
>
> No, I cannot read any floppies on Win98 SE or OS/2.
I know, my fix is for a bug in handling incomplete sectors in the qemu block
layer and not in the emulation of the fdc itself.
Jani
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: SPAM[RBL] Re: [Qemu-devel] QEMU floppy problems
2004-07-30 10:01 ` [Qemu-devel] QEMU floppy problems (was: ecos and qemu) Johannes Martin
2004-07-30 10:06 ` Jani Monoses
@ 2004-07-30 18:56 ` Leonardo Marques de Souza
1 sibling, 0 replies; 13+ messages in thread
From: Leonardo Marques de Souza @ 2004-07-30 18:56 UTC (permalink / raw)
To: qemu-devel
For me, this patch works (Win98se + all Win patchs), for read only.
the only problem is when i try to format, crash every time;
or when i try to write, in this case qemu crash some times.
machine: athlon-xp
Debian distribution.
Johannes Martin wrote:
>On Fri, 23 Jul 2004, Jani Monoses wrote:
>
>
>>and this patch fixes it :)
>>it's ugly though...
>>
>>does it work for you guys?
>>
>>
>
>No, I cannot read any floppies on Win98 SE or OS/2.
>
>
> Johannes
>
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] QEMU floppy problems (was: ecos and qemu)
2004-07-23 15:08 ` [Qemu-devel] QEMU floppy problems (was: ecos and qemu) Johannes Martin
2004-07-23 15:12 ` Jani Monoses
@ 2004-07-23 15:14 ` Jani Monoses
2004-07-23 15:51 ` Johannes Martin
2004-07-23 15:27 ` [Qemu-devel] Re: QEMU floppy problems Ben Pfaff
2004-07-23 16:03 ` [Qemu-devel] QEMU floppy problems (was: ecos and qemu) Karel Gardas
3 siblings, 1 reply; 13+ messages in thread
From: Jani Monoses @ 2004-07-23 15:14 UTC (permalink / raw)
To: qemu-devel
>
> The difference: booting probably goes through int13 on all systems, i.e.
> through the bios, but once OS/2 and Win98 later access floppies by
but the bios int13 also runs over qemu doesn't it ?
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Qemu-devel] Re: QEMU floppy problems
2004-07-23 15:08 ` [Qemu-devel] QEMU floppy problems (was: ecos and qemu) Johannes Martin
2004-07-23 15:12 ` Jani Monoses
2004-07-23 15:14 ` [Qemu-devel] QEMU floppy problems (was: ecos and qemu) Jani Monoses
@ 2004-07-23 15:27 ` Ben Pfaff
2004-07-23 16:03 ` [Qemu-devel] QEMU floppy problems (was: ecos and qemu) Karel Gardas
3 siblings, 0 replies; 13+ messages in thread
From: Ben Pfaff @ 2004-07-23 15:27 UTC (permalink / raw)
To: qemu-devel
Johannes Martin <jmartin@notamusica.com> writes:
> The difference: booting probably goes through int13 on all systems, i.e.
> through the bios, but once OS/2 and Win98 later access floppies by
> programm the fdc directly. So maybe there's a bug in that part of the
> emulation.
That was my conclusion too when I tried to look into this. When
NT 3.51 boots, it reads the kernel via the BIOS, but then it
fails just after it starts the kernel and resets the floppy
controller. (It goes by quickly, but you can tell the ordering
by adding debug code to the VGA controller that outputs
characters to stdout/stderr as they're written to VGA memory and
then looking at how this output is interspersed with other debug
output.)
--
On Perl: "It's as if H.P. Lovecraft, returned from the dead and speaking by
seance to Larry Wall, designed a language both elegant and terrifying for his
Elder Things to write programs in, and forgot that the Shoggoths didn't turn
out quite so well in the long run." --Matt Olson
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] QEMU floppy problems (was: ecos and qemu)
2004-07-23 15:08 ` [Qemu-devel] QEMU floppy problems (was: ecos and qemu) Johannes Martin
` (2 preceding siblings ...)
2004-07-23 15:27 ` [Qemu-devel] Re: QEMU floppy problems Ben Pfaff
@ 2004-07-23 16:03 ` Karel Gardas
3 siblings, 0 replies; 13+ messages in thread
From: Karel Gardas @ 2004-07-23 16:03 UTC (permalink / raw)
To: qemu-devel
On Fri, 23 Jul 2004, Johannes Martin wrote:
> On Fri, 23 Jul 2004, Ben Pfaff wrote:
> > > For a while I thought it wasn't since not all apps worked. I think now
> > > it is a problem with the floppy code(either in qemu or in ecos). The
> > > apps are built as bootable floppy images and some of them were lacking
> > > sectors so parts of the image were NULLs leading to crashes. If I turn
> > > those same floppy images to bootable iso-s using mkisofs and run
> > > qemu-cdrom on them they work all the time.
> > That's very interesting. At least part of the problem I've had with
> > Windows NT 3.51 appears to be floppy-related. I'll have to see if I can
> > try anything similar.
>
> I've got floppy problems in OS/2 and Win98 as well. Booting the
> installation floppies and a win98 boot floppy both works fine, but from a
> fully installed version of OS/2 and Win98 installed on disk I cannot
> access the floppies at all.
>
> The difference: booting probably goes through int13 on all systems, i.e.
> through the bios, but once OS/2 and Win98 later access floppies by
> programm the fdc directly. So maybe there's a bug in that part of the
> emulation.
That's really interesting, since few weeks ago, when I was playing with
Solaris9/x86 in Qemu I've not been able to mount floppy into this OS by
volcheck command (as docs say that's for mounting floppy) and so I gave up
and used cdrom and manually created isos for transfering necessary tarbals
to my solaris9 installation...
Cheers,
Karel
--
Karel Gardas kgardas@objectsecurity.com
ObjectSecurity Ltd. http://www.objectsecurity.com
^ permalink raw reply [flat|nested] 13+ messages in thread