All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Ferron <chris.e.ferron at linux.intel.com>
To: powertop@lists.01.org
Subject: Re: [Powertop] [PATCH] Add support to store boardname in /data directory
Date: Wed, 18 Jul 2012 15:06:47 -0700	[thread overview]
Message-ID: <50073377.8060200@linux.intel.com> (raw)
In-Reply-To: 1342623204-30480-1-git-send-email-i.zhbanov@samsung.com

[-- Attachment #1: Type: text/plain, Size: 1326 bytes --]

On 07/18/2012 07:53 AM, Igor Zhbanov wrote:
> Add support to store boardname in /data directory.
> This patch is based on Linaro's changes.
> ---
>   src/main.cpp |   15 +++++++++++----
>   1 files changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/src/main.cpp b/src/main.cpp
> index 7a1b976..8a68533 100644
> --- a/src/main.cpp
> +++ b/src/main.cpp
> @@ -240,12 +240,19 @@ static void load_board_params()
>   	string boardname;
>   	char filename[4096];
>   
> -	boardname = read_sysfs_string("/etc/boardname");
> +	if (access("/etc/boardname", R_OK) == 0) {
> +		boardname = read_sysfs_string("/etc/boardname");
>   
> -	if (boardname.length() < 2)
> -		return;
> +		if (boardname.length() < 2)
> +			return;
>   
> -	sprintf(filename, "/var/cache/powertop/saved_parameters.powertop.%s", boardname.c_str());
> +		sprintf(filename,
> +			"/var/cache/powertop/saved_parameters.powertop.%s",
> +			boardname.c_str());
> +	} else if (access("/data", R_OK) == 0)
> +		sprintf(filename,"saved_parameters.powertop");
> +	else
> +		return;
>   
>   	if (access(filename, R_OK))
>   		return;
Thank you for this patch, but 'we' consider boardname now deprecated. As 
such there is a future commit that will remove this code upcoming. As 
such your patch will not be needed.
-Chris



             reply	other threads:[~2012-07-18 22:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-18 22:06 Chris Ferron [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-07-18 14:53 [Powertop] [PATCH] Add support to store boardname in /data directory Igor Zhbanov

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=50073377.8060200@linux.intel.com \
    --to=powertop@lists.01.org \
    /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.