[lxc-devel] [PATCH 06/21] Replace get_current_dir_name by getcwd

Serge Hallyn serge.hallyn at canonical.com
Thu Jan 3 17:51:21 UTC 2013


Quoting Stéphane Graber (stgraber at ubuntu.com):
> get_current_dir_name appears to be specific to glibc. Replace that call
> by an equivalent getcwd call.
> 
> Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>

Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>

> ---
>  src/lxc/lxc_attach.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/lxc/lxc_attach.c b/src/lxc/lxc_attach.c
> index e292bc4..ba98d73 100644
> --- a/src/lxc/lxc_attach.c
> +++ b/src/lxc/lxc_attach.c
> @@ -164,7 +164,7 @@ int main(int argc, char *argv[])
>  		}
>  	}
>  
> -	curdir = get_current_dir_name();
> +	curdir = getcwd(NULL, 0);
>  
>  	/* determine which namespaces the container was created with
>  	 * by asking lxc-start
> -- 
> 1.8.0
> 
> 
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122712
> _______________________________________________
> Lxc-devel mailing list
> Lxc-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-devel




More information about the lxc-devel mailing list