Hi,
may be you solved it in the meantime ..
saHpiGetIdByEntityPath doesn't require a pointer to entity path. So try 
saHpiGetIdByEntityPath (sessionid, ep, type, &i, .....
But there are more errors and warnings ...
Cheers,
Uli

  -----Ursprüngliche Nachricht-----
  Von: Preeti Sharma [mailto:[email protected]]
  Gesendet: Mittwoch, 23. Februar 2011 15:46
  An: Anton Pak
  Cc: [email protected]
  Betreff: Re: [Openhpi-devel] How to get rpt resourceId from Entity Path?


  Hi Anton,

  Entres implementation has been useful to me, thanks for pointing this out. 
Based on this implementation I wrote sample program attached with this mail. 
Though I am getting compilation error at line 151 which is pasted below: (I am 
not able to figure out why compilation should complain here, passed type seems 
correct to me)

   

   

  [root@rmtestvm1 clients]# ./rmComp.sh

  rmClient.c:43: warning: no previous prototype for âget_string_paramâ

  rmClient.c:56: warning: no previous prototype for âask_entityâ

  rmClient.c: In function âmainâ:

  rmClient.c:151: error: invalid type argument of âunary *â

  rmClient.c:159: warning: implicit declaration of function âprocâ

  rmClient.c:88: warning: unused variable ârptentryidâ

  libtool: link: gcc -pthread -I/usr/include/glib-2.0 
-I/usr/lib64/glib-2.0/include -O0 -ggdb3 -Wall -Wmissing-prototypes 
-Wmissing-declarations -Wstrict-prototypes -Wpointer-arith -Wformat=2 
-Wformat-security -Wformat-nonliteral -Wno-format-y2k -Wcast-qual -Wcast-align 
-Wno-strict-aliasing -fno-strict-aliasing -Wno-unused-value -D_GNU_SOURCE 
-D_REENTRANT -fexceptions -o .libs/rmClient rmClient.o clients.o -pthread  
../baselib/.libs/libopenhpi.so -L/lib64 
/root/preeti/openhpi-2.15.1/transport/.libs/libopenhpitransport.so 
/root/preeti/openhpi-2.15.1/marshal/.libs/libopenhpimarshal.so 
/root/preeti/openhpi-2.15.1/utils/.libs/libopenhpiutils.so -lltdl -lssl 
-lgthread-2.0 -lglib-2.0 -lm -lpthread -pthread

  gcc: rmClient.o: No such file or directory

  gcc -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -O0 -ggdb3 
-Wall -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes 
-Wpointer-arith -Wformat=2 -Wformat-security -Wformat-nonliteral 
-Wno-format-y2k -Wcast-qual -Wcast-align -Wno-strict-aliasing 
-fno-strict-aliasing -Wno-unused-value -D_GNU_SOURCE -D_REENTRANT -fexceptions 
-o .libs/rmClient rmClient.o clients.o -pthread ../baselib/.libs/libopenhpi.so 
/root/preeti/openhpi-2.15.1/transport/.libs/libopenhpitransport.so 
/root/preeti/openhpi-2.15.1/marshal/.libs/libopenhpimarshal.so 
/root/preeti/openhpi-2.15.1/utils/.libs/libopenhpiutils.so -pthread  -L/lib64 
-lltdl -lssl -lgthread-2.0 -lglib-2.0 -lm -lpthread

  gcc: rmClient.o: No such file or directory

   

  Regards,

  Preeti

   

  -----Original Message-----
  From: Anton Pak [mailto:[email protected]] 
  Sent: Monday, February 21, 2011 6:53 PM
  To: [email protected]; Preeti Sharma
  Subject: Re: [Openhpi-devel] How to get rpt resourceId from Entity Path?

   

  Preeti,

   

  Could you try "lsent", "entres" and "entinstr" commands in hpi_shell?

   

        Anton Pak

   

  On Tue, 22 Feb 2011 02:42:53 +0300, Preeti Sharma  

  <[email protected]> wrote:

   

  > Hi,

  > I want to extract RDRs using Entity Path. I tried to do this by calling  

  > method saHpiGetIdByEntityPath to get Rpt resourceId and then use this  

  > resource Id in method saHpiRdrGet to get RDRs. My sample program is  

  > calling saHpiGetIdByEntityPath though it is failing with error  

  > INVALID_PARAMS . Sample program and shell script (I used to compile this  

  > client in client directory of openhpi source code) is attached with this  

  > mail. Please let me know what correction is required in this program or  

  > any other way if I am not calling right method.

  > 

  > Regards,

  > Preeti

  > 
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Openhpi-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openhpi-devel

Reply via email to