From: Samuel Mendoza-Jonas <sam@mendozajonas.com>
To: OpenBMC Patches <openbmc-patches@stwcx.xyz>
Cc: openbmc@lists.ozlabs.org, ratagupt <ratagupt@in.ibm.com>
Subject: Re: [PATCH phosphor-host-ipmid v2 2/2] Review Comment added for 146621
Date: Tue, 19 Apr 2016 14:45:37 +1000 [thread overview]
Message-ID: <20160419044537.GA21932@localhost.localdomain> (raw)
In-Reply-To: <1460978439-16510-3-git-send-email-openbmc-patches@stwcx.xyz>
Hi Ratan,
When addressing comments it's best to squash your changes into the
original patch; please resend this as one patch.
Thanks!
Sam
On Mon, Apr 18, 2016 at 06:20:39AM -0500, OpenBMC Patches wrote:
> From: ratagupt <ratagupt@in.ibm.com>
>
> ---
> chassishandler.C | 19 ++++++++++++-------
> 1 file changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/chassishandler.C b/chassishandler.C
> index 1a5508f..5144e15 100644
> --- a/chassishandler.C
> +++ b/chassishandler.C
> @@ -92,7 +92,7 @@ finish:
> return r;
> }
>
> -int dbus_get_property(const char *name,char **buf)
> +int dbus_get_property(const char *name, char **buf)
> {
> sd_bus_error error = SD_BUS_ERROR_NULL;
> sd_bus_message *m = NULL;
> @@ -161,7 +161,7 @@ finish:
> return r;
> }
>
> -int dbus_set_property(const char * name,const char *value)
> +int dbus_set_property(const char * name, const char *value)
> {
> sd_bus_error error = SD_BUS_ERROR_NULL;
> sd_bus_message *m = NULL;
> @@ -198,7 +198,7 @@ int dbus_set_property(const char * name,const char *value)
> host_intf_name, /* first argument */
> name, /* second argument */
> "s", /* third argument */
> - value); /* fourth argument */
> + value); /* fourth argument */
>
> if (r < 0) {
> fprintf(stderr, "Failed to issue method call: %s\n", error.message);
> @@ -374,8 +374,9 @@ char* get_boot_option_by_ipmi(uint8_t p) {
> }
>
> #define SET_PARM_VERSION 1
> -#define SET_PARM_BOOT_FLAGS_VALID_ONE_TIME 0x80
> -#define SET_PARM_BOOT_FLAGS_VALID_PERMANENT 0xC0
> +#define SET_PARM_BOOT_FLAGS_VALID_ONE_TIME 0x80 //boot flags data1 8th bit on
> +#define SET_PARM_BOOT_FLAGS_VALID_PERMANENT 0xC0 //boot flags data1 7&8 bit on
> +#define SET_PARM_BOOT_FLAGS_ONETIME 0x40 //boot flags data1 7th bit on
>
> ipmi_ret_t ipmi_chassis_get_sys_boot_options(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
> ipmi_request_t request, ipmi_response_t response,
> @@ -433,7 +434,9 @@ ipmi_ret_t ipmi_chassis_get_sys_boot_options(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
> } else {
>
> printf("BootPolicy is[%s]", p);
> - resp->data[0] = (strcmp(p,"ONETIME")==0)?SET_PARM_BOOT_FLAGS_VALID_ONE_TIME:SET_PARM_BOOT_FLAGS_VALID_PERMANENT;
> + resp->data[0] = (strncmp(p,"ONETIME",strlen("ONETIME"))==0) ?
> + SET_PARM_BOOT_FLAGS_VALID_ONE_TIME:
> + SET_PARM_BOOT_FLAGS_VALID_PERMANENT;
> rc = IPMI_CC_OK;
>
> }
> @@ -489,7 +492,9 @@ ipmi_ret_t ipmi_chassis_set_sys_boot_options(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
> }
>
> /* setting the boot policy */
> - s= (char *)(((reqptr->data[0] & 0x40) == 0x40) ?"PERMANENT":"ONETIME");
> + s = (char *)(((reqptr->data[0] & SET_PARM_BOOT_FLAGS_ONETIME) ==
> + SET_PARM_BOOT_FLAGS_ONETIME) ?"PERMANENT":"ONETIME");
> +
> printf ( "\nBoot Policy is %s",s);
> int r = dbus_set_property("boot_policy",s);
>
> --
> 2.7.1
>
>
> _______________________________________________
> openbmc mailing list
> openbmc@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/openbmc
prev parent reply other threads:[~2016-04-19 4:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-18 11:20 [PATCH phosphor-host-ipmid v2 0/2] Adding Boot Policy OpenBMC Patches
2016-04-18 11:20 ` [PATCH phosphor-host-ipmid v2 1/2] " OpenBMC Patches
2016-04-19 16:49 ` Stewart Smith
2016-04-18 11:20 ` [PATCH phosphor-host-ipmid v2 2/2] Review Comment added for 146621 OpenBMC Patches
2016-04-19 4:45 ` Samuel Mendoza-Jonas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160419044537.GA21932@localhost.localdomain \
--to=sam@mendozajonas.com \
--cc=openbmc-patches@stwcx.xyz \
--cc=openbmc@lists.ozlabs.org \
--cc=ratagupt@in.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.