diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-08-02 14:05:54 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-08-02 14:05:54 +0100 |
commit | b3d0cc0588845d3cad3fd67943d93e1bd87b1700 (patch) | |
tree | 79486747a419a63700f497499dd56f56ebcba8aa /examples | |
parent | d40b5028762eeaf9235165301bd76d468b7e251c (diff) | |
download | libguestfs-b3d0cc0588845d3cad3fd67943d93e1bd87b1700.tar.gz libguestfs-b3d0cc0588845d3cad3fd67943d93e1bd87b1700.tar.xz libguestfs-b3d0cc0588845d3cad3fd67943d93e1bd87b1700.zip |
grep: Add optargs to grep API and deprecate fgrep etc.
This commit makes grep into an optargs API, with flags for extended,
fixed, [case-]insensitive and compressed.
At the same time it deprecates: egrep, fgrep, grepi, egrepi, fgrepi,
zgrep, zegrep, zfgrep, zgrepi, zegrepi and zfgrepi.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/virt-dhcp-address.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/virt-dhcp-address.c b/examples/virt-dhcp-address.c index 3534f0bc..c6f25c6c 100644 --- a/examples/virt-dhcp-address.c +++ b/examples/virt-dhcp-address.c @@ -169,7 +169,9 @@ print_dhcp_address_linux (guestfs_h *g, char *root, const char *logfile) char **lines, *p; size_t len; - lines = guestfs_egrep (g, "dhclient.*: bound to ", logfile); + lines = guestfs_grep_opts (g, "dhclient.*: bound to ", logfile, + GUESTFS_GREP_OPTS_EXTENDED, 1, + -1); if (lines == NULL) exit (EXIT_FAILURE); |