On Fri, 2018-01-05 at 12:14 +0100, Andrea Bolognani wrote: > > if (isLink) { > > VIR_DEBUG("Creating symlink %s -> %s", data->file, data->target); > > + > > + /* First, unlink the symlink target. Symlinks change and > > + * therefore we have no guarantees that pre-existing > > + * symlink is still valid. */ > > + if (unlink(data->file) < 0 && > > Here... > > > + errno != ENOENT) { > > + virReportSystemError(errno, > > + _("Unable to remove symlink %s"), > > + data->file); > > ... and here, shouldn't you be using data->target instead > of data->file?
Never mind, you got it right and I clearly need more coffee :) However, later on: > > + virReportSystemError(errno, > > + _("Unable to create symlink %s"), > > + data->target); > > + goto cleanup; You should use data->file here to be consistent. Either way: Reviewed-by: Andrea Bolognani <abolo...@redhat.com> -- Andrea Bolognani / Red Hat / Virtualization -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list