Xen Store API in userspace
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
Quoted 4 lines · Artur Baruchi
Hi Guys,
Is possible to use functions like
xenbus_printfin user space? If yes.. which libraries do I should use ?
xen-unstable/tools/xenstore/xs.h
use this lib.
zhigang
Quoted 10 lines
Thanks in advance.
Att.
Artur Baruchi_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/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
Quoted 24 lines · Zhigang Wang
Quoted 4 lines · Artur Baruchi
Hi Guys,
Is possible to use functions like
xenbus_printfin user space? If yes.. which libraries do I should use ?
xen-unstable/tools/xenstore/xs.huse this lib.
zhigang
Quoted 10 lines
Thanks in advance.
Att.
Artur Baruchi_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/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
Quoted 60 lines · Artur Baruchi
Hi.
I used the
xs.hbut 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 toxs_write' get_info.c:(.text+0x63): undefined reference to `xs_daemon_close'
collect2: ld returned 1 exit statusThe command to compile is:
gcc -Wallget_info.c-o get_info.oPart of the code:
#include <xs.h>
...
structxs_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 BaruchiQuoted 24 lines · Zhigang Wang
Quoted 4 lines · Artur Baruchi
Hi Guys,
Is possible to use functions like
xenbus_printfin user space? If yes.. which libraries do I should use ?
xen-unstable/tools/xenstore/xs.huse this lib.
zhigang
Quoted 10 lines
Thanks in advance.
Att.
Artur Baruchi_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 4 lines · Artur Baruchi
Hi.
I used the
xs.hbut when tring to compile it, I got the follow error messages:
Quoted 8 lines
get_info.c:(.text+0x9): undefined reference to
xs_daemon_open' get_info.c:(.text+0x5a): undefined reference toxs_write' get_info.c:(.text+0x63): undefined reference to `xs_daemon_close'
collect2: ld returned 1 exit statusThe command to compile is:
gcc -Wallget_info.c-o get_info.o
try to add: -lxenstore
Quoted 49 lines
Part of the code:
#include <xs.h>
...
structxs_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 BaruchiQuoted 21 lines · Zhigang Wang
Quoted 4 lines · Artur Baruchi
Hi Guys,
Is possible to use functions like
xenbus_printfin user space? If yes.. which libraries do I should use ?
xen-unstable/tools/xenstore/xs.huse this lib.
zhigang
Quoted 9 lines
Thanks in advance.
Att.
Artur Baruchi_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel