All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix ioemu compile
@ 2007-12-06 19:31 john.levon
  2007-12-06 19:35 ` John Levon
  0 siblings, 1 reply; 8+ messages in thread
From: john.levon @ 2007-12-06 19:31 UTC (permalink / raw)
  To: xen-devel

# HG changeset patch
# User john.levon@sun.com
# Date 1196969481 28800
# Node ID 2c28ac4db1f7542220b1472821e8631b79b6a23a
# Parent  4a98d4b6e4daccd610175e3c0f8cab49b056c649
Fix ioemu compile

serial.c was including another Linux-specific header.

Signed-off-by: John Levon <john.levon@sun.com>

diff --git a/tools/ioemu/hw/serial.c b/tools/ioemu/hw/serial.c
--- a/tools/ioemu/hw/serial.c
+++ b/tools/ioemu/hw/serial.c
@@ -26,9 +26,15 @@
 #include <sys/time.h>
 #include <time.h>
 #include <assert.h>
-#include <asm/termios.h>
 
 //#define DEBUG_SERIAL
+
+#define TIOCM_DTR	0x002
+#define TIOCM_RTS	0x004
+#define TIOCM_CTS	0x020
+#define TIOCM_CAR	0x040
+#define TIOCM_RI	0x080
+#define TIOCM_DSR	0x100
 
 #define UART_LCR_DLAB	0x80	/* Divisor latch access bit */

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

* Re: [PATCH] Fix ioemu compile
  2007-12-06 19:31 [PATCH] Fix ioemu compile john.levon
@ 2007-12-06 19:35 ` John Levon
  2007-12-06 19:41   ` Daniel P. Berrange
  0 siblings, 1 reply; 8+ messages in thread
From: John Levon @ 2007-12-06 19:35 UTC (permalink / raw)
  Cc: xen-devel

On Thu, Dec 06, 2007 at 11:31:35AM -0800, john.levon@sun.com wrote:

> serial.c was including another Linux-specific header.
> 
> Signed-off-by: John Levon <john.levon@sun.com>
> 
> diff --git a/tools/ioemu/hw/serial.c b/tools/ioemu/hw/serial.c
> --- a/tools/ioemu/hw/serial.c
> +++ b/tools/ioemu/hw/serial.c
> @@ -26,9 +26,15 @@
>  #include <sys/time.h>
>  #include <time.h>
>  #include <assert.h>
> -#include <asm/termios.h>

Erm, or it looks like just making this be <sys/termios.h> will work too

regards
john

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

* Re: [PATCH] Fix ioemu compile
  2007-12-06 19:35 ` John Levon
@ 2007-12-06 19:41   ` Daniel P. Berrange
  2007-12-07  9:27     ` Trolle Selander
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel P. Berrange @ 2007-12-06 19:41 UTC (permalink / raw)
  To: John Levon; +Cc: xen-devel

On Thu, Dec 06, 2007 at 07:35:20PM +0000, John Levon wrote:
> On Thu, Dec 06, 2007 at 11:31:35AM -0800, john.levon@sun.com wrote:
> 
> > serial.c was including another Linux-specific header.
> > 
> > Signed-off-by: John Levon <john.levon@sun.com>
> > 
> > diff --git a/tools/ioemu/hw/serial.c b/tools/ioemu/hw/serial.c
> > --- a/tools/ioemu/hw/serial.c
> > +++ b/tools/ioemu/hw/serial.c
> > @@ -26,9 +26,15 @@
> >  #include <sys/time.h>
> >  #include <time.h>
> >  #include <assert.h>
> > -#include <asm/termios.h>
> 
> Erm, or it looks like just making this be <sys/termios.h> will work too

Definitely. Including asm/ headers directly on Linux is frowned upon.

Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

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

* Re: [PATCH] Fix ioemu compile
  2007-12-06 19:41   ` Daniel P. Berrange
@ 2007-12-07  9:27     ` Trolle Selander
  2007-12-07 11:07       ` Keir Fraser
  0 siblings, 1 reply; 8+ messages in thread
From: Trolle Selander @ 2007-12-07  9:27 UTC (permalink / raw)
  To: Daniel P. Berrange; +Cc: xen-devel, John Levon


[-- Attachment #1.1: Type: text/plain, Size: 1740 bytes --]

Unfortunately, sys/termios.h doesn't work on linux, at least on RHEL/Fedora.
I knew it wasn't quite kosher to include asm/termios.h when I did it, but it
was the only way I could get the termbit defines included. I was going to
look for a clean solution, but forgot. It would seem bits/termios.h needs to
be extended with the necessary stuff from asm/termios.h, but I'm not sure
where/who to suggest that change.

On Dec 6, 2007 8:41 PM, Daniel P. Berrange <berrange@redhat.com> wrote:

> On Thu, Dec 06, 2007 at 07:35:20PM +0000, John Levon wrote:
> > On Thu, Dec 06, 2007 at 11:31:35AM -0800, john.levon@sun.com wrote:
> >
> > > serial.c was including another Linux-specific header.
> > >
> > > Signed-off-by: John Levon <john.levon@sun.com>
> > >
> > > diff --git a/tools/ioemu/hw/serial.c b/tools/ioemu/hw/serial.c
> > > --- a/tools/ioemu/hw/serial.c
> > > +++ b/tools/ioemu/hw/serial.c
> > > @@ -26,9 +26,15 @@
> > >  #include <sys/time.h>
> > >  #include <time.h>
> > >  #include <assert.h>
> > > -#include <asm/termios.h>
> >
> > Erm, or it looks like just making this be <sys/termios.h> will work too
>
> Definitely. Including asm/ headers directly on Linux is frowned upon.
>
> Dan.
> --
> |=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496
> -=|
> |=-           Perl modules: http://search.cpan.org/~danberr/<http://search.cpan.org/%7Edanberr/>             -=|
> |=-               Projects: http://freshmeat.net/~danielpb/<http://freshmeat.net/%7Edanielpb/>              -=|
> |=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505
>  -=|
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>

[-- Attachment #1.2: Type: text/html, Size: 2668 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

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

* Re: [PATCH] Fix ioemu compile
  2007-12-07  9:27     ` Trolle Selander
@ 2007-12-07 11:07       ` Keir Fraser
  2007-12-07 11:17         ` Keir Fraser
  0 siblings, 1 reply; 8+ messages in thread
From: Keir Fraser @ 2007-12-07 11:07 UTC (permalink / raw)
  To: Trolle Selander, Daniel P. Berrange; +Cc: xen-devel, John Levon


[-- Attachment #1.1: Type: text/plain, Size: 2210 bytes --]

I checked in John Levon¹s original patch for now, but perhaps <sys/ioctl.h>
would work?

 -- Keir

On 7/12/07 09:27, "Trolle Selander" <trolle.selander@gmail.com> wrote:

> Unfortunately, sys/termios.h doesn't work on linux, at least on RHEL/Fedora. I
> knew it wasn't quite kosher to include asm/termios.h when I did it, but it was
> the only way I could get the termbit defines included. I was going to look for
> a clean solution, but forgot. It would seem bits/termios.h needs to be
> extended with the necessary stuff from asm/termios.h, but I'm not sure
> where/who to suggest that change.
> 
> On Dec 6, 2007 8:41 PM, Daniel P. Berrange <berrange@redhat.com> wrote:
>> On Thu, Dec 06, 2007 at 07:35:20PM +0000, John Levon wrote:
>>> > On Thu, Dec 06, 2007 at 11:31:35AM -0800, john.levon@sun.com wrote:
>>> >
>>>> > > serial.c was including another Linux-specific header.
>>>> > >
>>>> > > Signed-off-by: John Levon <john.levon@sun.com>
>>>> > >
>>>> > > diff --git a/tools/ioemu/hw/serial.c b/tools/ioemu/hw/serial.c
>>>> > > --- a/tools/ioemu/hw/serial.c
>>>> > > +++ b/tools/ioemu/hw/serial.c
>>>> > > @@ -26,9 +26,15 @@
>>>> > >  #include <sys/time.h>
>>>> > >  #include <time.h>
>>>> > >  #include < assert.h>
>>>> > > -#include <asm/termios.h>
>>> >
>>> > Erm, or it looks like just making this be <sys/termios.h> will work too
>> 
>> Definitely. Including asm/ headers directly on Linux is frowned upon.
>> 
>> Dan.
>> --
>> |=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
>> |=-           Perl modules: http://search.cpan.org/~danberr/
>> <http://search.cpan.org/%7Edanberr/>               -=|
>> |=-               Projects: http://freshmeat.net/~danielpb/
>> <http://freshmeat.net/%7Edanielpb/>                -=|
>> |=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=|
>> 
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
>> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel



[-- Attachment #1.2: Type: text/html, Size: 3772 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

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

* Re: [PATCH] Fix ioemu compile
  2007-12-07 11:07       ` Keir Fraser
@ 2007-12-07 11:17         ` Keir Fraser
  2007-12-07 12:48           ` John Levon
  2007-12-07 14:25           ` Daniel P. Berrange
  0 siblings, 2 replies; 8+ messages in thread
From: Keir Fraser @ 2007-12-07 11:17 UTC (permalink / raw)
  To: Keir Fraser, Trolle Selander, Daniel P. Berrange; +Cc: xen-devel, John Levon


[-- Attachment #1.1: Type: text/plain, Size: 2655 bytes --]

So I propose:
#include <termios.h>
#include <sys/ioctl.h>

I think that will cover all cases. Is everyone happy with that?

 -- Keir

On 7/12/07 11:07, "Keir Fraser" <Keir.Fraser@cl.cam.ac.uk> wrote:

> I checked in John Levon¹s original patch for now, but perhaps <sys/ioctl.h>
> would work?
> 
>  -- Keir
> 
> On 7/12/07 09:27, "Trolle Selander" <trolle.selander@gmail.com> wrote:
> 
>> Unfortunately, sys/termios.h doesn't work on linux, at least on RHEL/Fedora.
>> I knew it wasn't quite kosher to include asm/termios.h when I did it, but it
>> was the only way I could get the termbit defines included. I was going to
>> look for a clean solution, but forgot. It would seem bits/termios.h needs to
>> be extended with the necessary stuff from asm/termios.h, but I'm not sure
>> where/who to suggest that change.
>> 
>> On Dec 6, 2007 8:41 PM, Daniel P. Berrange <berrange@redhat.com> wrote:
>>> On Thu, Dec 06, 2007 at 07:35:20PM +0000, John Levon wrote:
>>>> > On Thu, Dec 06, 2007 at 11:31:35AM -0800, john.levon@sun.com wrote:
>>>> >
>>>>> > > serial.c was including another Linux-specific header.
>>>>> > >
>>>>> > > Signed-off-by: John Levon <john.levon@sun.com>
>>>>> > >
>>>>> > > diff --git a/tools/ioemu/hw/serial.c b/tools/ioemu/hw/serial.c
>>>>> > > --- a/tools/ioemu/hw/serial.c
>>>>> > > +++ b/tools/ioemu/hw/serial.c
>>>>> > > @@ -26,9 +26,15 @@
>>>>> > >  #include <sys/time.h>
>>>>> > >  #include <time.h>
>>>>> > >  #include < assert.h>
>>>>> > > -#include <asm/termios.h>
>>>> >
>>>> > Erm, or it looks like just making this be <sys/termios.h> will work too
>>> 
>>> Definitely. Including asm/ headers directly on Linux is frowned upon.
>>> 
>>> Dan.
>>> --
>>> |=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496
>>> -=|
>>> |=-           Perl modules: http://search.cpan.org/~danberr/
>>> <http://search.cpan.org/%7Edanberr/>               -=|
>>> |=-               Projects: http://freshmeat.net/~danielpb/
>>> <http://freshmeat.net/%7Edanielpb/>                -=|
>>> |=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505
>>> -=| 
>>> 
>>> _______________________________________________
>>> Xen-devel mailing list
>>> Xen-devel@lists.xensource.com
>>> http://lists.xensource.com/xen-devel
>>> 
>> 
>> 
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel



[-- Attachment #1.2: Type: text/html, Size: 4708 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

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

* Re: [PATCH] Fix ioemu compile
  2007-12-07 11:17         ` Keir Fraser
@ 2007-12-07 12:48           ` John Levon
  2007-12-07 14:25           ` Daniel P. Berrange
  1 sibling, 0 replies; 8+ messages in thread
From: John Levon @ 2007-12-07 12:48 UTC (permalink / raw)
  To: Keir Fraser; +Cc: Daniel P. Berrange, xen-devel, Trolle Selander

On Fri, Dec 07, 2007 at 11:17:30AM +0000, Keir Fraser wrote:

> So I propose:
> #include <termios.h>
> #include <sys/ioctl.h>
> 
> I think that will cover all cases. Is everyone happy with that?

Good for me

regards
john

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

* Re: [PATCH] Fix ioemu compile
  2007-12-07 11:17         ` Keir Fraser
  2007-12-07 12:48           ` John Levon
@ 2007-12-07 14:25           ` Daniel P. Berrange
  1 sibling, 0 replies; 8+ messages in thread
From: Daniel P. Berrange @ 2007-12-07 14:25 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel, Trolle Selander, John Levon

On Fri, Dec 07, 2007 at 11:17:30AM +0000, Keir Fraser wrote:
> So I propose:
> #include <termios.h>
> #include <sys/ioctl.h>
> 
> I think that will cover all cases. Is everyone happy with that?

Yes, that looks good.

Regards,
Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

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

end of thread, other threads:[~2007-12-07 14:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-06 19:31 [PATCH] Fix ioemu compile john.levon
2007-12-06 19:35 ` John Levon
2007-12-06 19:41   ` Daniel P. Berrange
2007-12-07  9:27     ` Trolle Selander
2007-12-07 11:07       ` Keir Fraser
2007-12-07 11:17         ` Keir Fraser
2007-12-07 12:48           ` John Levon
2007-12-07 14:25           ` Daniel P. Berrange

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.