scripts/dts: Rename --deprecate-only to --deprecated-only

--deprecate-only sounded like a command to "only deprecate (something)"
to me at first. --deprecated-only might make it clearer that it's about
only generating deprecated stuff.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This commit is contained in:
Ulf Magnusson 2019-07-25 01:05:54 +02:00 committed by Kumar Gala
commit a72e451624

View file

@ -274,7 +274,7 @@ def write_conf(f):
f.write('\n') f.write('\n')
def write_header(f, deprecate_only): def write_header(f, deprecated_only):
f.write('''\ f.write('''\
/********************************************** /**********************************************
* Generated include file * Generated include file
@ -307,7 +307,7 @@ def write_header(f, deprecate_only):
deprecated_warn = True deprecated_warn = True
if not prop.startswith('DT_'): if not prop.startswith('DT_'):
deprecated_warn = True deprecated_warn = True
if deprecate_only and not deprecated_warn: if deprecated_only and not deprecated_warn:
continue continue
f.write(define_str(prop, defs[node][prop], value_tabs, deprecated_warn)) f.write(define_str(prop, defs[node][prop], value_tabs, deprecated_warn))
@ -320,7 +320,7 @@ def write_header(f, deprecate_only):
deprecated_warn = True deprecated_warn = True
if alias in deprecated: if alias in deprecated:
deprecated_warn = True deprecated_warn = True
if deprecate_only and not deprecated_warn: if deprecated_only and not deprecated_warn:
continue continue
f.write(define_str(alias, alias_target, value_tabs, deprecated_warn)) f.write(define_str(alias, alias_target, value_tabs, deprecated_warn))
@ -477,7 +477,7 @@ def parse_arguments():
parser.add_argument("--old-alias-names", action='store_true', parser.add_argument("--old-alias-names", action='store_true',
help="Generate aliases also in the old way, without " help="Generate aliases also in the old way, without "
"compatibility information in their labels") "compatibility information in their labels")
parser.add_argument("--deprecate-only", action='store_true', parser.add_argument("--deprecated-only", action='store_true',
help="Generate only the deprecated defines") help="Generate only the deprecated defines")
return parser.parse_args() return parser.parse_args()
@ -533,7 +533,7 @@ def main():
if args.include is not None: if args.include is not None:
with open(args.include, 'w', encoding='utf-8') as f: with open(args.include, 'w', encoding='utf-8') as f:
write_header(f, args.deprecate_only) write_header(f, args.deprecated_only)
if __name__ == '__main__': if __name__ == '__main__':