openhpi2 / Open-HPI

Open HPI is an open source implementation of the SA Forum's Hardware Platform Interface (HPI). HPI provides an abstracted interface to managing computer hardware, typically for chassis and rack based servers
Other
3 stars 1 forks source link

hpisettime exits prematurely with return code 1 #2582

Closed openhpi2 closed 8 years ago

openhpi2 commented 9 years ago

The hpisettime command exits prematurely with an exit code of 1 when valid parameters are provided.

---uname output--- Linux rhel7-server2 3.10.0-123.el7.ppc64 #1 SMP Mon May 5 11:18:37 EDT 2014 ppc64 ppc64 ppc64 GNU/Linux

---Steps to Reproduce--- === steps to reproduce === export G_MESSAGES_DEBUG=all hpisettime -t 12:00:00 -d 03/12/2015 -X

echo $?

The problem has been isolated to this line of code in clients/hpisettime.c

if (rv != SA_OK) EXIT1;

Brackets are required around the EXIT1 macro since it expands to multiple executable statements:

define EXIT1 g_free(findate);g_free(fintime);return 1;

hpisettime_premature_exit.patch.txt

Reported by: rdossant

openhpi2 commented 9 years ago

Hi ,

The patch attached on top of the bug looks great. Thanks for fixing the bug.

Thanks& Regards, Hemantha Reddy

From: Rafael Fonseca [mailto:rdossant@users.sf.net] Sent: Monday, June 22, 2015 9:58 AM To: Ticket 1881 Subject: [openhpi:bugs] #1881 hpisettime exits prematurely with return code 1


[bugs:#1881]http://sourceforge.net/p/openhpi/bugs/1881 hpisettime exits prematurely with return code 1

Status: open 3.6.0: 3.6.0 Created: Mon Jun 22, 2015 03:58 PM UTC by Rafael Fonseca Last Updated: Mon Jun 22, 2015 03:58 PM UTC Owner: nobody

The hpisettime command exits prematurely with an exit code of 1 when valid parameters are provided.

---uname output--- Linux rhel7-server2 3.10.0-123.el7.ppc64 #1 SMP Mon May 5 11:18:37 EDT 2014 ppc64 ppc64 ppc64 GNU/Linux

---Steps to Reproduce--- === steps to reproduce === export G_MESSAGES_DEBUG=all hpisettime -t 12:00:00 -d 03/12/2015 -X

echo $?

The problem has been isolated to this line of code in clients/hpisettime.c

if (rv != SA_OK) EXIT1;

Brackets are required around the EXIT1 macro since it expands to multiple executable statements:

define EXIT1 g_free(findate);g_free(fintime);return 1;


Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/openhpi/bugs/1881/https://sourceforge.net/p/openhpi/bugs/1881

To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/https://sourceforge.net/auth/subscriptions

Alternate.txt

Original comment by: hemanthreddy

openhpi2 commented 9 years ago

Original comment by: hemanthreddy

openhpi2 commented 9 years ago

Fixed in Trunk 3.6.0 with Revision 7633.

Original comment by: hemanthreddy

openhpi2 commented 9 years ago

Original comment by: dr_mohan

openhpi2 commented 9 years ago

Original comment by: dr_mohan

openhpi2 commented 9 years ago

Original comment by: dr_mohan