All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] xs.h and xs_lib.h
  2005-06-10  8:32 [PATCH] xs.h and xs_lib.h aq
@ 2005-06-10  8:31 ` Keir Fraser
  2005-06-12  6:36 ` Rusty Russell
  1 sibling, 0 replies; 7+ messages in thread
From: Keir Fraser @ 2005-06-10  8:31 UTC (permalink / raw)
  To: aq; +Cc: Xen Dev


On 10 Jun 2005, at 09:32, aq wrote:

> This patch moves declaration of xs_handle from xs.c to xs.h. Besides,
> it installs xs.h and xs_lib.h to /usr/include, and gets top Makefile
> uninstalled them when cleaning up.

The handle is deliberately opaque. We'll take the Makefile patches 
though.

  Thanks,
  Keir

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

* [PATCH] xs.h and xs_lib.h
@ 2005-06-10  8:32 aq
  2005-06-10  8:31 ` Keir Fraser
  2005-06-12  6:36 ` Rusty Russell
  0 siblings, 2 replies; 7+ messages in thread
From: aq @ 2005-06-10  8:32 UTC (permalink / raw)
  To: Xen Dev

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

This patch moves declaration of xs_handle from xs.c to xs.h. Besides,
it installs xs.h and xs_lib.h to /usr/include, and gets top Makefile
uninstalled them when cleaning up.

Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>

# diffstat xenstore2.patch 
 Makefile                |    1 +
 tools/xenstore/Makefile |    2 ++
 tools/xenstore/xs.c     |    5 -----
 tools/xenstore/xs.h     |    5 ++++-
 4 files changed, 7 insertions(+), 6 deletions(-)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: xenstore2.patch --]
[-- Type: text/x-patch; name="xenstore2.patch", Size: 1692 bytes --]

===== Makefile 1.96 vs edited =====
--- 1.96/Makefile	2005-06-10 01:56:35 -05:00
+++ edited/Makefile	2005-06-10 03:24:17 -05:00
@@ -166,6 +166,7 @@
 	rm -rf $(D)/usr/$(LIBDIR)/share/xen $(D)/usr/$(LIBDIR)/libxenstore*
 	rm -rf $(D)/var/run/xen* $(D)/var/lib/xen*
 	rm -rf $(D)/usr/include/xcs_proto.h $(D)/usr/include/xc.h
+	rm -rf $(D)/usr/include/xs.h $(D)/usr/include/xs_lib.h
 	rm -rf $(D)/usr/sbin/xcs $(D)/usr/sbin/xcsdump $(D)/usr/sbin/xen*
 	rm -rf $(D)/usr/sbin/netfix
 	rm -rf $(D)/usr/sbin/xfrd $(D)/usr/sbin/xm
===== tools/xenstore/Makefile 1.3 vs edited =====
--- 1.3/tools/xenstore/Makefile	2005-06-09 15:07:32 -05:00
+++ edited/tools/xenstore/Makefile	2005-06-10 03:06:55 -05:00
@@ -95,5 +95,7 @@
 	$(INSTALL_PROG) xenstored $(DESTDIR)/usr/sbin
 	$(INSTALL_DIR) -p $(DESTDIR)/usr/$(LIBDIR)
 	$(INSTALL_DATA) libxenstore.a $(DESTDIR)/usr/$(LIBDIR)
+	$(INSTALL_DATA) xs.h $(DESTDIR)/usr/include
+	$(INSTALL_DATA) xs_lib.h $(DESTDIR)/usr/include
 
 -include $(PROG_DEP)
===== tools/xenstore/xs.c 1.1 vs edited =====
--- 1.1/tools/xenstore/xs.c	2005-06-07 05:57:29 -05:00
+++ edited/tools/xenstore/xs.c	2005-06-10 03:06:55 -05:00
@@ -36,11 +36,6 @@
 #include "xs_lib.h"
 #include "utils.h"
 
-struct xs_handle
-{
-	int fd;
-};
-
 /* Get the socket from the store daemon handle.
  */
 int xs_fileno(struct xs_handle *h)
===== tools/xenstore/xs.h 1.1 vs edited =====
--- 1.1/tools/xenstore/xs.h	2005-06-07 05:57:29 -05:00
+++ edited/tools/xenstore/xs.h	2005-06-10 03:08:20 -05:00
@@ -22,7 +22,10 @@
 /* On failure, these routines set errno. */
 #include "xs_lib.h"
 
-struct xs_handle;
+struct xs_handle
+{
+	int fd;
+};
 
 /* Connect to the xs daemon.
  * Returns a handle or NULL.

[-- Attachment #3: 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] 7+ messages in thread

* Re: [PATCH] xs.h and xs_lib.h
  2005-06-10  8:32 [PATCH] xs.h and xs_lib.h aq
  2005-06-10  8:31 ` Keir Fraser
@ 2005-06-12  6:36 ` Rusty Russell
  2005-06-12 15:14   ` aq
  1 sibling, 1 reply; 7+ messages in thread
From: Rusty Russell @ 2005-06-12  6:36 UTC (permalink / raw)
  To: aq; +Cc: Xen Dev

On Fri, 2005-06-10 at 03:32 -0500, aq wrote:
> This patch moves declaration of xs_handle from xs.c to xs.h.

No; why do this?  It's opaque for a reason.  Originally it was just an
int, but Keir insisted it be an opaque structure.  Exposing it binds us
to the current structure again.

> Besides,
> it installs xs.h and xs_lib.h to /usr/include, and gets top Makefile
> uninstalled them when cleaning up.

xs_lib.h should not be installed in /usr/include!

Rusty.
-- 
A bad analogy is like a leaky screwdriver -- Richard Braakman

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

* Re: [PATCH] xs.h and xs_lib.h
  2005-06-12  6:36 ` Rusty Russell
@ 2005-06-12 15:14   ` aq
  2005-06-14  0:32     ` Rusty Russell
  0 siblings, 1 reply; 7+ messages in thread
From: aq @ 2005-06-12 15:14 UTC (permalink / raw)
  To: Rusty Russell; +Cc: Xen Dev

On 6/12/05, Rusty Russell <rusty@rustcorp.com.au> wrote:
> On Fri, 2005-06-10 at 03:32 -0500, aq wrote:
> > This patch moves declaration of xs_handle from xs.c to xs.h.
> 
> No; why do this?  It's opaque for a reason.  Originally it was just an
> int, but Keir insisted it be an opaque structure.  Exposing it binds us
> to the current structure again.
> 
> > Besides,
> > it installs xs.h and xs_lib.h to /usr/include, and gets top Makefile
> > uninstalled them when cleaning up.
> 
> xs_lib.h should not be installed in /usr/include!

i see that, but where should we put this header?

regards,
aq

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

* Re: [PATCH] xs.h and xs_lib.h
  2005-06-12 15:14   ` aq
@ 2005-06-14  0:32     ` Rusty Russell
  2005-06-14  4:46       ` aq
  0 siblings, 1 reply; 7+ messages in thread
From: Rusty Russell @ 2005-06-14  0:32 UTC (permalink / raw)
  To: aq; +Cc: Xen Dev

On Mon, 2005-06-13 at 00:14 +0900, aq wrote:
> On 6/12/05, Rusty Russell <rusty@rustcorp.com.au> wrote:
> > On Fri, 2005-06-10 at 03:32 -0500, aq wrote:
> > > This patch moves declaration of xs_handle from xs.c to xs.h.
> > 
> > No; why do this?  It's opaque for a reason.  Originally it was just an
> > int, but Keir insisted it be an opaque structure.  Exposing it binds us
> > to the current structure again.
> > 
> > > Besides,
> > > it installs xs.h and xs_lib.h to /usr/include, and gets top Makefile
> > > uninstalled them when cleaning up.
> > 
> > xs_lib.h should not be installed in /usr/include!
> 
> i see that, but where should we put this header?

Once the daemon and library are built, it's not necessary for anything.

Rusty.
-- 
A bad analogy is like a leaky screwdriver -- Richard Braakman

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

* Re: [PATCH] xs.h and xs_lib.h
  2005-06-14  0:32     ` Rusty Russell
@ 2005-06-14  4:46       ` aq
  2005-06-14 22:49         ` Rusty Russell
  0 siblings, 1 reply; 7+ messages in thread
From: aq @ 2005-06-14  4:46 UTC (permalink / raw)
  To: Rusty Russell; +Cc: Xen Dev

On 6/14/05, Rusty Russell <rusty@rustcorp.com.au> wrote:
> On Mon, 2005-06-13 at 00:14 +0900, aq wrote:
> > On 6/12/05, Rusty Russell <rusty@rustcorp.com.au> wrote:
> > > On Fri, 2005-06-10 at 03:32 -0500, aq wrote:
> > > > This patch moves declaration of xs_handle from xs.c to xs.h.
> > >
> > > No; why do this?  It's opaque for a reason.  Originally it was just an
> > > int, but Keir insisted it be an opaque structure.  Exposing it binds us
> > > to the current structure again.
> > >
> > > > Besides,
> > > > it installs xs.h and xs_lib.h to /usr/include, and gets top Makefile
> > > > uninstalled them when cleaning up.
> > >
> > > xs_lib.h should not be installed in /usr/include!
> >
> > i see that, but where should we put this header?
> 
> Once the daemon and library are built, it's not necessary for anything.
> 

i installed xs_lib.h because xs.h includes it. now we need to remove
this and include xs_lib.h in other files as needed.

later i will send in another patch to fix this, and revert the problem
raised in last patch.

regards,
aq

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

* Re: [PATCH] xs.h and xs_lib.h
  2005-06-14  4:46       ` aq
@ 2005-06-14 22:49         ` Rusty Russell
  0 siblings, 0 replies; 7+ messages in thread
From: Rusty Russell @ 2005-06-14 22:49 UTC (permalink / raw)
  To: aq; +Cc: Xen Dev

On Tue, 2005-06-14 at 13:46 +0900, aq wrote:
> On 6/14/05, Rusty Russell <rusty@rustcorp.com.au> wrote:
> > On Mon, 2005-06-13 at 00:14 +0900, aq wrote:
> > > On 6/12/05, Rusty Russell <rusty@rustcorp.com.au> wrote:
> > > > On Fri, 2005-06-10 at 03:32 -0500, aq wrote:
> > > > > This patch moves declaration of xs_handle from xs.c to xs.h.
> > > >
> > > > No; why do this?  It's opaque for a reason.  Originally it was just an
> > > > int, but Keir insisted it be an opaque structure.  Exposing it binds us
> > > > to the current structure again.
> > > >
> > > > > Besides,
> > > > > it installs xs.h and xs_lib.h to /usr/include, and gets top Makefile
> > > > > uninstalled them when cleaning up.
> > > >
> > > > xs_lib.h should not be installed in /usr/include!
> > >
> > > i see that, but where should we put this header?
> > 
> > Once the daemon and library are built, it's not necessary for anything.
> > 
> 
> i installed xs_lib.h because xs.h includes it. now we need to remove
> this and include xs_lib.h in other files as needed.

True.  More logical to move the xs_permissions struct to xs.h, I think.

Rusty.
-- 
A bad analogy is like a leaky screwdriver -- Richard Braakman

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

end of thread, other threads:[~2005-06-14 22:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-10  8:32 [PATCH] xs.h and xs_lib.h aq
2005-06-10  8:31 ` Keir Fraser
2005-06-12  6:36 ` Rusty Russell
2005-06-12 15:14   ` aq
2005-06-14  0:32     ` Rusty Russell
2005-06-14  4:46       ` aq
2005-06-14 22:49         ` Rusty Russell

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.