From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Tyser Date: Sat, 24 Oct 2009 16:47:27 -0500 Subject: [U-Boot] [PATCH 3/5] readline(): Add ability to modify a string buffer In-Reply-To: <20091024172619.98009185D4A5@gemini.denx.de> References: <1256259563-32725-1-git-send-email-ptyser@xes-inc.com> <1256259563-32725-3-git-send-email-ptyser@xes-inc.com> <20091024172619.98009185D4A5@gemini.denx.de> Message-ID: <4AE375EF.7060401@xes-inc.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Wolfgang Denk wrote: > Dear Peter Tyser, > > In message <1256259563-32725-3-git-send-email-ptyser@xes-inc.com> you wrote: >> If the 'buf' parameter is a non-0-length string, its contents will be >> edited. Previously, the initial value of 'buf' was ignored and the >> user entered its contents from scratch. > > What is the purpose of this modification? Are you fixing a bug (which > one?) or implementing an extension (which one) or what? This change was necessary to add a new "editenv" command. This change allows the readline() function to edit a string instead of just enter one from scratch. In theory this feature could be used for other areas of U-Boot in the future, but at this point the only user of it would be the "editenv" command which I submitted a patch for. If the 'editenv' patch is rejected, I don't mind this one being rejected too. Best, Peter