summaryrefslogtreecommitdiffstats
path: root/python/guestfs-py.c
diff options
context:
space:
mode:
authorMatthew Booth <mbooth@redhat.com>2011-10-18 13:30:40 +0100
committerRichard W.M. Jones <rjones@redhat.com>2011-10-19 18:37:15 +0100
commitccdb28b761bbb37ff4f4f26dae494e5ea01562c5 (patch)
tree7d8452e3a0e55562e0d50ecd149c5031b88d2857 /python/guestfs-py.c
parent76d879e913003c4472a7237a6b2a86d31edafdb7 (diff)
downloadlibguestfs-ccdb28b761bbb37ff4f4f26dae494e5ea01562c5.tar.gz
libguestfs-ccdb28b761bbb37ff4f4f26dae494e5ea01562c5.tar.xz
libguestfs-ccdb28b761bbb37ff4f4f26dae494e5ea01562c5.zip
inspect: Don't assume number of captures in match functions
It is possible for the pcre library to return a variable number of captures for a single regular expression. e.g.: ^/dev/(cciss/c\d+d\d+)(?:p(\d+))?$ This will return either 1 or 2 captures depending on whether the device has a partition suffix. The current match wrappers don't allow for this, and require that a predictable number of matches are returned. This change updates match, match1, match2, and match3 to ignore the specific number of matches returned. Instead, any returned captures are assigned to the given arguments, and any remaining arguments are set to NULL. (cherry picked from commit f5c9f0e9ee1729b1260cef3e51ca91936e1868c4)
Diffstat (limited to 'python/guestfs-py.c')
0 files changed, 0 insertions, 0 deletions