From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Mon, 7 Dec 2020 17:18:36 -0500 Subject: [PATCH v2 01/12] env: Allow returning errors from hdelete_r() In-Reply-To: <20201105173349.903603-2-sjg@chromium.org> References: <20201105173349.903603-1-sjg@chromium.org> <20201105173349.903603-2-sjg@chromium.org> Message-ID: <20201207221836.GQ32272@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Nov 05, 2020 at 10:33:37AM -0700, Simon Glass wrote: > At present this function returns 1 on success and 0 on failure. But in > the latter case it provides no indication of what went wrong. > > If an attempt is made to delete a non-existent variable, the caller may > want to ignore this error. This happens when setting a non-existent > variable to "", for example. > > Update the function to return 0 on success and a useful error code on > failure. Add a function comment too. > > Make sure that env_set() does not return an error if it is deleting a > variable that doesn't exist. We could update env_set() to return useful > error numbers also, but that is beyond the scope of this change. > > Signed-off-by: Simon Glass > > wip Applied to u-boot/next, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: