[Libguestfs] [PATCH v8 6/8] New API: internal_yara_scan

Richard W.M. Jones rjones at redhat.com
Tue Apr 25 08:46:14 UTC 2017


On Tue, Apr 25, 2017 at 12:20:04AM +0300, Matteo Cafasso wrote:
> +  CHROOT_IN;
> +  fd = open (path, O_RDONLY|O_CLOEXEC);
> +  CHROOT_OUT;
> +
> +  if (fd < 0) {

open(2) returns -1 on error, so you only need to check for that.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html




More information about the Libguestfs mailing list