mirror of
https://github.com/libvirt/libvirt.git
synced 2026-09-03 20:53:04 -05:00
scripts: avoid matching 'char **' as string for systemtap
When a probe argument is declared "char *" we reference the userspace string value using 'user_string(...)' for systemtap. Unfortunately our code generator also matches on args declared "char **" and generates bogus code *cert = user_string($arg4); which is a syntax error for systemtap. Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
@@ -124,7 +124,7 @@ for file in filelist:
|
||||
for idx in range(len(argbits)):
|
||||
arg = argbits[idx]
|
||||
isstr = False
|
||||
if 'char *' in arg:
|
||||
if re.match(r'''.*char\s\*[^\*].*''', arg) is not None:
|
||||
isstr = True
|
||||
|
||||
m = re.search(r'''^.*\s\*?(\S+)$''', arg)
|
||||
|
||||
Reference in New Issue
Block a user