[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH 1/2] v2v: fix path to source when copying files from guest tools directory



On Mon, 28 Jan 2019 17:24:15 +0000
"Richard W.M. Jones" <rjones redhat com> wrote:

> On Sat, Jan 26, 2019 at 01:19:58PM +0100, Tomáš Golembiovský wrote:
> > The debug message was slightly changed too to better match the similar
> > message for ISO case. It refers to the root directory instead of the
> > specific subdirectory inside guest tools.
> > 
> > Signed-off-by: Tomáš Golembiovský <tgolembi redhat com>
> > ---
> >  v2v/windows_virtio.ml | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/v2v/windows_virtio.ml b/v2v/windows_virtio.ml
> > index 92bf3ec60..94c4774b7 100644
> > --- a/v2v/windows_virtio.ml
> > +++ b/v2v/windows_virtio.ml
> > @@ -308,10 +308,10 @@ and copy_drivers g inspect driverdir =
> >  and copy_from_virtio_win g inspect srcdir destdir filter missing =
> >    let ret = ref [] in
> >    if is_directory virtio_win then (
> > -    let dir = virtio_win // srcdir in
> > -    debug "windows: copy_from_virtio_win: guest tools source directory %s" dir;
> > +    debug "windows: copy_from_virtio_win: guest tools source directory %s" virtio_win;  
> 
> Be good to put "virtio_win" on the next line.

ack

> 
> > -    if not (is_directory srcdir) then missing ()
> > +    let dir = virtio_win // srcdir in
> > +    if not (is_directory dir) then missing ()  
> 
> Did this code actually work before?  It seems to be checking if
> literally srcdir (as a directory on the host) exists.

Nope, I don't think it has ever worked (srcdir is relative path).

    Tomas

> 
> But yes, looks good apart from the overlong line.
> 
> Rich.
> 
> >      else (
> >        let cmd = sprintf "cd %s && find -L -type f" (quote dir) in
> >        let paths = external_command cmd in
> > -- 
> > 2.20.1
> > 
> > _______________________________________________
> > Libguestfs mailing list
> > Libguestfs redhat com
> > https://www.redhat.com/mailman/listinfo/libguestfs  
> 
> -- 
> Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
> Read my programming and virtualization blog: http://rwmj.wordpress.com
> Fedora Windows cross-compiler. Compile Windows programs, test, and
> build Windows installers. Over 100 libraries supported.
> http://fedoraproject.org/wiki/MinGW


-- 
Tomáš Golembiovský <tgolembi redhat com>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]