From 1552a28e5f8d437aabeb97f167d80c07e1af987c Mon Sep 17 00:00:00 2001 From: Johan Redestig Date: Tue, 3 Jan 2017 09:36:47 +0100 Subject: [PATCH] fs_config: Fix oem range parsing Addresses the following build error: "value" not in valid range [], got: 2901 for: "AID_ABC" file:\ "device/somc/abc/config.fs" that happens when parsing device/somc/abc/config.fs: [AID_ABC] value: 2901 The problem is that the AID.PREFIX is 'AID_' so the _OEM_RANGE expression is searching for AID__OEM_RESERVED, which never exists. Drop the extra '_'. Change-Id: I8a1556731e14e49cef66e3e91121e4be23a308e0 Test: ./build/tools/fs_config/fs_config_generator.py fsconfig --aid-header=system/core/include/private/android_filesystem_config.h device/somc/abc/config.fs --- tools/fs_config/fs_config_generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/fs_config/fs_config_generator.py b/tools/fs_config/fs_config_generator.py index 6b5e03c71..7f1ec3db5 100755 --- a/tools/fs_config/fs_config_generator.py +++ b/tools/fs_config/fs_config_generator.py @@ -252,7 +252,7 @@ class AIDHeaderParser(object): _AID_DEFINE = re.compile(r'\s*#define\s+%s.*' % AID.PREFIX) _OEM_START_KW = 'START' _OEM_END_KW = 'END' - _OEM_RANGE = re.compile('%s_OEM_RESERVED_[0-9]*_{0,1}(%s|%s)' % + _OEM_RANGE = re.compile('%sOEM_RESERVED_[0-9]*_{0,1}(%s|%s)' % (AID.PREFIX, _OEM_START_KW, _OEM_END_KW)) # AID lines cannot end with _START or _END, ie AID_FOO is OK # but AID_FOO_START is skiped. Note that AID_FOOSTART is NOT skipped. -- 2.11.0