[PATCH 1/2] fs: implement pushd/popd chdir wrappers

Sascha Hauer sha at pengutronix.de
Wed Jan 12 02:29:40 PST 2022


On Sat, Jan 08, 2022 at 06:15:54PM +0100, Ahmad Fatoum wrote:
> We don't have dirfd's, so running operations relative to the current
> working directory always involves some allocation/freeing boilerplate.
> 
> Add pushd/popd helpers to move the boilerplate out of the callsites.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
> ---
>  fs/fs.c          | 30 ++++++++++++++++++++++++++++++
>  include/unistd.h |  2 ++
>  2 files changed, 32 insertions(+)

Applied, thanks

Sascha


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list