All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] current qemu cvs broken for mingw hosts
@ 2007-01-30 19:12 Christian MICHON
  2007-01-30 19:28 ` Johannes Schindelin
  0 siblings, 1 reply; 7+ messages in thread
From: Christian MICHON @ 2007-01-30 19:12 UTC (permalink / raw)
  To: qemu-devel

in vl.c (change introduced 2 days ago by Paul):

In file included from c:/qemu/qemu-30jan07/vl.c:24:
c:/qemu/qemu-30jan07/vl.h:57:1: warning: "ENOMEDIUM" redefined
c:/qemu/qemu-30jan07/vl.h:49:1: warning: this is the location of the
previous definition
c:/qemu/qemu-30jan07/vl.c: In function `win_chr_read_poll':
c:/qemu/qemu-30jan07/vl.c:2021: error: structure has no member named `chr'
c:/qemu/qemu-30jan07/vl.c: In function `win_chr_readfile':
c:/qemu/qemu-30jan07/vl.c:2042: error: structure has no member named `chr'

I cannot figure out what "chr"'s type is supposed to be in the struct.
Any clue ?

This should break other hosts builds too.

-- 
Christian

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] current qemu cvs broken for mingw hosts
  2007-01-30 19:12 [Qemu-devel] current qemu cvs broken for mingw hosts Christian MICHON
@ 2007-01-30 19:28 ` Johannes Schindelin
  2007-01-30 20:09   ` Christian MICHON
  0 siblings, 1 reply; 7+ messages in thread
From: Johannes Schindelin @ 2007-01-30 19:28 UTC (permalink / raw)
  To: Christian MICHON; +Cc: qemu-devel

Hi,

On Tue, 30 Jan 2007, Christian MICHON wrote:

> In file included from c:/qemu/qemu-30jan07/vl.c:24:
> c:/qemu/qemu-30jan07/vl.h:57:1: warning: "ENOMEDIUM" redefined

just guard it with an #ifndef ENOMEDIUM

> c:/qemu/qemu-30jan07/vl.c: In function `win_chr_read_poll':
> c:/qemu/qemu-30jan07/vl.c:2021: error: structure has no member named `chr'
> [...]
> 
> I cannot figure out what "chr"'s type is supposed to be in the struct.

How about CharDriverState? I deduce this from

origin:vl.h:318:int qemu_chr_can_read(CharDriverState *s);

Hth,
Dscho

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] current qemu cvs broken for mingw hosts
  2007-01-30 19:28 ` Johannes Schindelin
@ 2007-01-30 20:09   ` Christian MICHON
  2007-01-30 22:55     ` Paul Brook
  0 siblings, 1 reply; 7+ messages in thread
From: Christian MICHON @ 2007-01-30 20:09 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 640 bytes --]

On 1/30/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> just guard it with an #ifndef ENOMEDIUM

this one was not bothering so much, but it's true it's cleaner with this.

> > c:/qemu/qemu-30jan07/vl.c: In function `win_chr_read_poll':
> > c:/qemu/qemu-30jan07/vl.c:2021: error: structure has no member named `chr'
> > [...]
> >
> > I cannot figure out what "chr"'s type is supposed to be in the struct.
>
> How about CharDriverState? I deduce this from
>
> origin:vl.h:318:int qemu_chr_can_read(CharDriverState *s);

I guess I'm tired (banged too much my head on git recently :) )
The fix is attached: thanks.

-- 
Christian

[-- Attachment #2: chr.patch --]
[-- Type: application/octet-stream, Size: 229 bytes --]

--- vl.c	2007-01-30 20:07:38 +0000
+++ vl.c_xian	2007-01-30 20:07:15 +0000
@@ -1880,6 +1880,7 @@
     OVERLAPPED orecv, osend;
     BOOL fpipe;
     DWORD len;
+    CharDriverState *chr;
 } WinCharState;
 
 #define NSENDBUF 2048

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] current qemu cvs broken for mingw hosts
  2007-01-30 20:09   ` Christian MICHON
@ 2007-01-30 22:55     ` Paul Brook
  2007-01-30 23:09       ` Johannes Schindelin
  2007-01-30 23:13       ` Christian MICHON
  0 siblings, 2 replies; 7+ messages in thread
From: Paul Brook @ 2007-01-30 22:55 UTC (permalink / raw)
  To: qemu-devel

On Tuesday 30 January 2007 20:09, Christian MICHON wrote:
> On 1/30/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> > just guard it with an #ifndef ENOMEDIUM
>
> this one was not bothering so much, but it's true it's cleaner with this.
>
> > > c:/qemu/qemu-30jan07/vl.c: In function `win_chr_read_poll':
> > > c:/qemu/qemu-30jan07/vl.c:2021: error: structure has no member named
> > > `chr' [...]
> > >
> > > I cannot figure out what "chr"'s type is supposed to be in the struct.
> >
> > How about CharDriverState? I deduce this from
> >
> > origin:vl.h:318:int qemu_chr_can_read(CharDriverState *s);
>
> I guess I'm tired (banged too much my head on git recently :) )
> The fix is attached: thanks.

Did you test it? I'm fairly certain it still won't work. AFAICS You're not 
setting the field anywhere.

Paul

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] current qemu cvs broken for mingw hosts
  2007-01-30 22:55     ` Paul Brook
@ 2007-01-30 23:09       ` Johannes Schindelin
  2007-01-30 23:13       ` Christian MICHON
  1 sibling, 0 replies; 7+ messages in thread
From: Johannes Schindelin @ 2007-01-30 23:09 UTC (permalink / raw)
  To: Paul Brook; +Cc: qemu-devel

Hi,

On Tue, 30 Jan 2007, Paul Brook wrote:

> On Tuesday 30 January 2007 20:09, Christian MICHON wrote:
> > On 1/30/07, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> > > just guard it with an #ifndef ENOMEDIUM
> >
> > this one was not bothering so much, but it's true it's cleaner with this.
> >
> > > > c:/qemu/qemu-30jan07/vl.c: In function `win_chr_read_poll':
> > > > c:/qemu/qemu-30jan07/vl.c:2021: error: structure has no member named
> > > > `chr' [...]
> > > >
> > > > I cannot figure out what "chr"'s type is supposed to be in the struct.
> > >
> > > How about CharDriverState? I deduce this from
> > >
> > > origin:vl.h:318:int qemu_chr_can_read(CharDriverState *s);
> >
> > I guess I'm tired (banged too much my head on git recently :) )
> > The fix is attached: thanks.
> 
> Did you test it? I'm fairly certain it still won't work. AFAICS You're not 
> setting the field anywhere.

Indeed. Somehow I assumed that text_console_init() would set this. Sorry.

Ciao,
Dscho

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] current qemu cvs broken for mingw hosts
  2007-01-30 22:55     ` Paul Brook
  2007-01-30 23:09       ` Johannes Schindelin
@ 2007-01-30 23:13       ` Christian MICHON
  2007-01-31 16:24         ` Johannes Schindelin
  1 sibling, 1 reply; 7+ messages in thread
From: Christian MICHON @ 2007-01-30 23:13 UTC (permalink / raw)
  To: Paul Brook; +Cc: qemu-devel

On 1/30/07, Paul Brook <paul@codesourcery.com> wrote:
> Did you test it? I'm fairly certain it still won't work. AFAICS You're not
> setting the field anywhere.
>

it solved the compilation, which was broken, which was my primary
concern. Your patches normally don't break the build :)
so in a sense, with regards to the current cvs state, it helps fixing
the compilation, without segfault for example.

the binary works. The struct statement was missing the "chr".
Now, in term of functionality, I do not know how you test it,
if this was your question.

-- 
Christian

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] current qemu cvs broken for mingw hosts
  2007-01-30 23:13       ` Christian MICHON
@ 2007-01-31 16:24         ` Johannes Schindelin
  0 siblings, 0 replies; 7+ messages in thread
From: Johannes Schindelin @ 2007-01-31 16:24 UTC (permalink / raw)
  To: Christian MICHON; +Cc: Paul Brook, qemu-devel

Hi,

On Wed, 31 Jan 2007, Christian MICHON wrote:

> On 1/30/07, Paul Brook <paul@codesourcery.com> wrote:
> > Did you test it? I'm fairly certain it still won't work. AFAICS You're not
> > setting the field anywhere.
> 
> the binary works. The struct statement was missing the "chr". Now, in 
> term of functionality, I do not know how you test it, if this was your 
> question.

You'd have to attach a serial device with "-serial COM". Unfortunately, I 
don't even have "COM" anymore, let alone on a machine which runs Windows, 
so I cannot test either.

But this patch looks sane to me (since WinCharState is initialized by 
win_chr_init(), IMHO it makes sense to pass the CharDriverState to that 
function):

 vl.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/vl.c b/vl.c
index 8ddd8ec..7af7d02 100644
--- a/vl.c
+++ b/vl.c
@@ -1875,6 +1875,7 @@ static CharDriverState *qemu_chr_open_pty(void)
 
 #ifdef _WIN32
 typedef struct {
+    CharDriverState *chr;
     int max_size;
     HANDLE hcom, hrecv, hsend;
     OVERLAPPED orecv, osend;
@@ -1916,7 +1917,7 @@ static void win_chr_close(CharDriverState *chr)
     win_chr_close2(s);
 }
 
-static int win_chr_init(WinCharState *s, const char *filename)
+static int win_chr_init(WinCharState *s, CharDriverState *chr, const char *filename)
 {
     COMMCONFIG comcfg;
     COMMTIMEOUTS cto = { 0, 0, 0, 0, 0};
@@ -1974,6 +1975,7 @@ static int win_chr_init(WinCharState *s, const char *filename)
         fprintf(stderr, "Failed ClearCommError\n");
         goto fail;
     }
+    s->chr = chr;
     qemu_add_polling_cb(win_chr_poll, s);
     return 0;
 
@@ -2086,7 +2088,7 @@ static CharDriverState *qemu_chr_open_win(const char *filename)
     chr->chr_write = win_chr_write;
     chr->chr_close = win_chr_close;
 
-    if (win_chr_init(s, filename) < 0) {
+    if (win_chr_init(s, chr, filename) < 0) {
         free(s);
         free(chr);
         return NULL;

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-01-31 16:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-30 19:12 [Qemu-devel] current qemu cvs broken for mingw hosts Christian MICHON
2007-01-30 19:28 ` Johannes Schindelin
2007-01-30 20:09   ` Christian MICHON
2007-01-30 22:55     ` Paul Brook
2007-01-30 23:09       ` Johannes Schindelin
2007-01-30 23:13       ` Christian MICHON
2007-01-31 16:24         ` Johannes Schindelin

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.