All of lore.kernel.org
 help / color / mirror / Atom feed
* Xen Store API in userspace
@ 2009-03-16 22:47 Artur Baruchi
  2009-03-17  0:46 ` Zhigang Wang
  0 siblings, 1 reply; 5+ messages in thread
From: Artur Baruchi @ 2009-03-16 22:47 UTC (permalink / raw)
  To: xen-devel

Hi Guys,

Is possible to use functions like xenbus_printf in user space? If
yes.. which libraries do I should use ?

Thanks in advance.

Att.
Artur Baruchi

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

* Re: Xen Store API in userspace
  2009-03-16 22:47 Xen Store API in userspace Artur Baruchi
@ 2009-03-17  0:46 ` Zhigang Wang
  2009-03-17 19:04   ` Artur Baruchi
  0 siblings, 1 reply; 5+ messages in thread
From: Zhigang Wang @ 2009-03-17  0:46 UTC (permalink / raw)
  To: Artur Baruchi; +Cc: xen-devel

Artur Baruchi wrote:
> Hi Guys,
> 
> Is possible to use functions like xenbus_printf in user space? If
> yes.. which libraries do I should use ?

xen-unstable/tools/xenstore/xs.h

use this lib.

zhigang

> 
> Thanks in advance.
> 
> Att.
> Artur Baruchi
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

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

* Re: Xen Store API in userspace
  2009-03-17  0:46 ` Zhigang Wang
@ 2009-03-17 19:04   ` Artur Baruchi
  2009-03-17 19:12     ` Artur Baruchi
  2009-03-18  0:43     ` Zhigang Wang
  0 siblings, 2 replies; 5+ messages in thread
From: Artur Baruchi @ 2009-03-17 19:04 UTC (permalink / raw)
  To: Zhigang Wang; +Cc: xen-devel

Hi.

I used the xs.h but when tring to compile it, I got the follow error messages:

get_info.c:(.text+0x9): undefined reference to `xs_daemon_open'
get_info.c:(.text+0x5a): undefined reference to `xs_write'
get_info.c:(.text+0x63): undefined reference to `xs_daemon_close'
collect2: ld returned 1 exit status


The command to compile is:
gcc -Wall get_info.c -o get_info.o

Part of the code:
#include <xs.h>
...
struct xs_handle *xsh;
xsh = xs_daemon_open();
...
xs_write (xsh, XBT_NULL, "testing", mem, strlen(mem));
xs_daemon_close(xsh);


I dont think its a problem in my code, but it is in my libs or the way
that Im tring to compile it.


Thanks in advance.

Att.
Artur Baruchi



On Mon, Mar 16, 2009 at 9:46 PM, Zhigang Wang <zhigang.x.wang@oracle.com> wrote:
> Artur Baruchi wrote:
>> Hi Guys,
>>
>> Is possible to use functions like xenbus_printf in user space? If
>> yes.. which libraries do I should use ?
>
> xen-unstable/tools/xenstore/xs.h
>
> use this lib.
>
> zhigang
>
>>
>> Thanks in advance.
>>
>> Att.
>> Artur Baruchi
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xensource.com
>> http://lists.xensource.com/xen-devel
>
>

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

* Re: Xen Store API in userspace
  2009-03-17 19:04   ` Artur Baruchi
@ 2009-03-17 19:12     ` Artur Baruchi
  2009-03-18  0:43     ` Zhigang Wang
  1 sibling, 0 replies; 5+ messages in thread
From: Artur Baruchi @ 2009-03-17 19:12 UTC (permalink / raw)
  To: Zhigang Wang; +Cc: xen-devel

A verbose output:



[root@linuxprv03 daemon]# gcc -Wall -v get_info.c
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada
--enable-java-awt=gtk --disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --with-cpu=generic
--host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20070925 (Red Hat 4.1.2-33)
 /usr/libexec/gcc/x86_64-redhat-linux/4.1.2/cc1 -quiet -v get_info.c
-quiet -dumpbase get_info.c -mtune=generic -auxbase get_info -Wall
-version -o /tmp/ccVtYUxc.s
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../x86_64-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/lib/gcc/x86_64-redhat-linux/4.1.2/include
 /usr/include
End of search list.
GNU C version 4.1.2 20070925 (Red Hat 4.1.2-33) (x86_64-redhat-linux)
        compiled by GNU C version 4.1.2 20070925 (Red Hat 4.1.2-33).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 9f833c3d322ccff4b0d52ae42234eccc
get_info.c: In function âmainâ:
get_info.c:15: warning: implicit declaration of function âstrlenâ
get_info.c:15: warning: incompatible implicit declaration of built-in
function âstrlenâ
get_info.c:15: warning: passing argument 1 of âstrlenâ makes pointer
from integer without a cast
get_info.c:15: warning: passing argument 4 of âxs_writeâ makes pointer
from integer without a cast
 as -V -Qy -o /tmp/ccQEpxTj.o /tmp/ccVtYUxc.s
GNU assembler version 2.17.50.0.18 (x86_64-redhat-linux) using BFD
version version 2.17.50.0.18-1 20070731
 /usr/libexec/gcc/x86_64-redhat-linux/4.1.2/collect2 --eh-frame-hdr
--build-id -m elf_x86_64 --hash-style=gnu -dynamic-linker
/lib64/ld-linux-x86-64.so.2
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crt1.o
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crti.o
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtbegin.o
-L/usr/lib/gcc/x86_64-redhat-linux/4.1.2
-L/usr/lib/gcc/x86_64-redhat-linux/4.1.2
-L/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64
-L/lib/../lib64 -L/usr/lib/../lib64 /tmp/ccQEpxTj.o -lgcc --as-needed
-lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtend.o
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crtn.o
/tmp/ccQEpxTj.o: In function `main':
get_info.c:(.text+0x9): undefined reference to `xs_daemon_open'
get_info.c:(.text+0x5a): undefined reference to `xs_write'
get_info.c:(.text+0x63): undefined reference to `xs_daemon_close'
collect2: ld returned 1 exit status


Thanks.

Att.
Artur Baruchi





On Tue, Mar 17, 2009 at 4:04 PM, Artur Baruchi <mail.baruchi@gmail.com> wrote:
> Hi.
>
> I used the xs.h but when tring to compile it, I got the follow error messages:
>
> get_info.c:(.text+0x9): undefined reference to `xs_daemon_open'
> get_info.c:(.text+0x5a): undefined reference to `xs_write'
> get_info.c:(.text+0x63): undefined reference to `xs_daemon_close'
> collect2: ld returned 1 exit status
>
>
> The command to compile is:
> gcc -Wall get_info.c -o get_info.o
>
> Part of the code:
> #include <xs.h>
> ...
> struct xs_handle *xsh;
> xsh = xs_daemon_open();
> ...
> xs_write (xsh, XBT_NULL, "testing", mem, strlen(mem));
> xs_daemon_close(xsh);
>
>
> I dont think its a problem in my code, but it is in my libs or the way
> that Im tring to compile it.
>
>
> Thanks in advance.
>
> Att.
> Artur Baruchi
>
>
>
> On Mon, Mar 16, 2009 at 9:46 PM, Zhigang Wang <zhigang.x.wang@oracle.com> wrote:
>> Artur Baruchi wrote:
>>> Hi Guys,
>>>
>>> Is possible to use functions like xenbus_printf in user space? If
>>> yes.. which libraries do I should use ?
>>
>> xen-unstable/tools/xenstore/xs.h
>>
>> use this lib.
>>
>> zhigang
>>
>>>
>>> Thanks in advance.
>>>
>>> Att.
>>> Artur Baruchi
>>>
>>> _______________________________________________
>>> Xen-devel mailing list
>>> Xen-devel@lists.xensource.com
>>> http://lists.xensource.com/xen-devel
>>
>>
>

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

* Re: Xen Store API in userspace
  2009-03-17 19:04   ` Artur Baruchi
  2009-03-17 19:12     ` Artur Baruchi
@ 2009-03-18  0:43     ` Zhigang Wang
  1 sibling, 0 replies; 5+ messages in thread
From: Zhigang Wang @ 2009-03-18  0:43 UTC (permalink / raw)
  To: Artur Baruchi; +Cc: xen-devel

Artur Baruchi wrote:
> Hi.
> 
> I used the xs.h but when tring to compile it, I got the follow error messages:
> 
> get_info.c:(.text+0x9): undefined reference to `xs_daemon_open'
> get_info.c:(.text+0x5a): undefined reference to `xs_write'
> get_info.c:(.text+0x63): undefined reference to `xs_daemon_close'
> collect2: ld returned 1 exit status
> 
> 
> The command to compile is:
> gcc -Wall get_info.c -o get_info.o
try to add: -lxenstore
> 
> Part of the code:
> #include <xs.h>
> ...
> struct xs_handle *xsh;
> xsh = xs_daemon_open();
> ...
> xs_write (xsh, XBT_NULL, "testing", mem, strlen(mem));
> xs_daemon_close(xsh);
> 
> 
> I dont think its a problem in my code, but it is in my libs or the way
> that Im tring to compile it.
> 
> 
> Thanks in advance.
> 
> Att.
> Artur Baruchi
> 
> 
> 
> On Mon, Mar 16, 2009 at 9:46 PM, Zhigang Wang <zhigang.x.wang@oracle.com> wrote:
>> Artur Baruchi wrote:
>>> Hi Guys,
>>>
>>> Is possible to use functions like xenbus_printf in user space? If
>>> yes.. which libraries do I should use ?
>> xen-unstable/tools/xenstore/xs.h
>>
>> use this lib.
>>
>> zhigang
>>
>>> Thanks in advance.
>>>
>>> Att.
>>> Artur Baruchi
>>>
>>> _______________________________________________
>>> 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

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

end of thread, other threads:[~2009-03-18  0:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-16 22:47 Xen Store API in userspace Artur Baruchi
2009-03-17  0:46 ` Zhigang Wang
2009-03-17 19:04   ` Artur Baruchi
2009-03-17 19:12     ` Artur Baruchi
2009-03-18  0:43     ` Zhigang Wang

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.