All of lore.kernel.org
 help / color / mirror / Atom feed
From: Timur Tabi <timur@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [u-boot-release] [PATCH 6/7] getenv_f() env variable exist w/o needing a buffer
Date: Mon, 7 Jan 2013 11:46:06 -0600	[thread overview]
Message-ID: <50EB09DE.9020104@freescale.com> (raw)
In-Reply-To: <1357323245-12455-6-git-send-email-yorksun@freescale.com>

York Sun wrote:
> From: James Yang <James.Yang@freescale.com>
> 
> getenv_f() searches the environment for a variable name and copies the
> value of the variable to a buffer pointed to by one of the function's
> parameters.  However, this means that the buffer needs to exist and
> needs to be of sufficient length (passed as another parameter to
> getenv_f()) to hold the requested variable's value, even if all that is
> desired is the mere detection of the existence of the variable itself.
> 
> This patch removes the requirement that the buffer needs to exist.  If
> the pointer to the buffer is set to NULL and the requested variable is
> found, getenv_f() returns 1, else it returns -1.  The buffer length
> parameter is ignored if the pointer is set to NULL.  The original
> functionality of getenv_f() is retained (return number of bytes copied
> if variable is found, -1 if not), other than being able to copy the
> variable's value to the address 0.
> 
> Signed-off-by: James Yang <James.Yang@freescale.com>

Acked-by: Timur Tabi <timur@freescale.com>

-- 
Timur Tabi
Linux kernel developer at Freescale

  parent reply	other threads:[~2013-01-07 17:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-04 18:13 [U-Boot] [PATCH 1/7] powerpc/mpc8xxx: Enable entering DDR debugging by key press York Sun
2013-01-04 18:14 ` [U-Boot] [PATCH 2/7] Move DDR command parsing to separate function York Sun
2013-01-04 18:14 ` [U-Boot] [PATCH 3/7] Fix data stage name matching issue York Sun
2013-01-04 18:14 ` [U-Boot] [PATCH 4/7] Add copy command to FSL DDR interactive York Sun
2013-01-04 18:14 ` [U-Boot] [PATCH 5/7] README.fsl-ddr typos and update to reflect hotkey York Sun
2013-01-04 18:14 ` [U-Boot] [PATCH 6/7] getenv_f() env variable exist w/o needing a buffer York Sun
2013-01-04 22:06   ` Wolfgang Denk
2013-01-04 23:08     ` James Yang
2013-01-05  6:23       ` Wolfgang Denk
2013-01-07 17:46   ` Timur Tabi [this message]
2013-01-04 18:14 ` [U-Boot] [PATCH 7/7] powerpc/mpc8xxx: FSL DDR debugger auto run of stored commands York Sun
2013-01-08  6:35 ` [U-Boot] [PATCH 1/7] powerpc/mpc8xxx: Enable entering DDR debugging by key press Wolfgang Denk
2013-01-08  6:39   ` sun york-R58495
2013-01-08 19:24   ` York Sun

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=50EB09DE.9020104@freescale.com \
    --to=timur@freescale.com \
    --cc=u-boot@lists.denx.de \
    /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.