[CRIU] [PATCH 08/16] parasite: Make sure no dots in names generated

Andrew Vagin avagin at parallels.com
Tue Feb 14 06:46:52 EST 2012


On Mon, Feb 13, 2012 at 11:26:31PM +0400, Cyrill Gorcunov wrote:
> Some names may be "dot" mangled.
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
>  gen-offsets.sh |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/gen-offsets.sh b/gen-offsets.sh
> index 0948aed..70158fb 100644
> --- a/gen-offsets.sh
> +++ b/gen-offsets.sh
> @@ -12,7 +12,7 @@ echo "/* Autogenerated file, don't edit */"
>  echo "#ifndef $name_ifndef"
>  echo "#define $name_ifndef"
>  echo ""
> -nm $name_objname | grep ' [Tt] ' | awk "$awk_cmd"
> +nm $name_objname | grep ' [Tt] ' | sed -e 's/\./_/g' | awk "$awk_cmd"

Using grep, sed and awk together is a bad style. awk is enough for all
these things.

>  echo ""
>  echo "static char $name_blob[] = {"
>  hexdump -v -e '"\t"' -e '8/1 "0x%02x, "' -e '"\n"' $name_bin
> -- 
> 1.7.7.6
> 
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://openvz.org/mailman/listinfo/criu


More information about the CRIU mailing list