Re: [PATCH] codegen: drop config.h and use short license header for Wireshark

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> Shorten the generated dissector, drop unused config.h inclusion and
> abbreviate the license blurb. No functional change, cosmetics only.
> 
> Signed-off-by: Peter Wu <peter@xxxxxxxxxxxxx>

I'm fine with the config.h, the license I would retain the full version

Frediano

> ---
> For the updated output, see https://code.wireshark.org/review/29380
> I considered capitalizing names such as SPICE_VSC_MESSAGE_TYPE_FLUSHCOMPLETE
> (instead of SPICE_VSC_MESSAGE_TYPE_FlushComplete), but that breaks the public
> spice-protocol interface which has been there since at least 2010, so nope.
> ---
>  spice_codegen.py | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/spice_codegen.py b/spice_codegen.py
> index 76d7c5e..d791064 100755
> --- a/spice_codegen.py
> +++ b/spice_codegen.py
> @@ -176,7 +176,15 @@ writer.header.set_option("dest_file", dest_file)
>  writer.set_option("source", os.path.basename(proto_file))
>  
>  if options.license == "LGPL":
> -    license = """/*
> +    if options.generate_dissector:
> +        license = """/*
> + * Copyright (C) 2013 Red Hat, Inc.
> + * SPDX-License-Identifier: LGPL-2.1-or-later
> + */
> +
> +"""
> +    else:
> +        license = """/*
>    Copyright (C) 2013 Red Hat, Inc.
>  
>    This library is free software; you can redistribute it and/or
> @@ -236,7 +244,7 @@ writer.writeln("/* this is a file autogenerated by
> spice_codegen.py */")
>  writer.write(license)
>  writer.header.writeln("/* this is a file autogenerated by spice_codegen.py
>  */")
>  writer.header.write(license)
> -if not options.header and not options.generate_enums:
> +if not (options.header or options.generate_enums or
> options.generate_dissector):
>      writer.writeln("#ifdef HAVE_CONFIG_H")
>      writer.writeln("#include <config.h>")
>      writer.writeln("#endif")
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]