[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] VM generation ID save/restore and migrate
> -----Original Message----- > From: Shriram Rajagopalan [mailto:rshriram@xxxxxxxxx] > Sent: 07 December 2011 22:09 > To: Paul Durrant > Cc: xen-devel@xxxxxxxxxxxxxxxxxxx > Subject: Re: [Xen-devel] [PATCH] VM generation ID save/restore and > migrate > > On Wed, Dec 7, 2011 at 1:38 AM, Paul Durrant > <paul.durrant@xxxxxxxxxx> wrote: > > > > diff -r 38eb74c01d9d -r 9eaac880f504 tools/xcutils/xc_restore.c > > --- a/tools/xcutils/xc_restore.c Tue Dec 06 21:16:56 2011 > +0000 > > +++ b/tools/xcutils/xc_restore.c Wed Dec 07 09:36:07 2011 > +0000 > > @@ -23,11 +23,12 @@ main(int argc, char **argv) > > xc_interface *xch; > > int io_fd, ret; > > int superpages; > > - unsigned long store_mfn, console_mfn; > > + unsigned long store_mfn, console_mfn, vm_gid_addr; > > + int no_increment_gid; > > > > - if ( (argc != 8) && (argc != 9) ) > > + if ( (argc < 8) || (argc > 10) ) > > errx(1, "usage: %s iofd domid store_evtchn " > > - "console_evtchn hvm pae apic [superpages]", > argv[0]); > > + "console_evtchn hvm pae apic [superpages > > + [no_increment_gid]]", argv[0]); > > > > xch = xc_interface_open(0,0,0); > > if ( !xch ) > > @@ -40,19 +41,25 @@ main(int argc, char **argv) > > hvm = atoi(argv[5]); > > pae = atoi(argv[6]); > > apic = atoi(argv[7]); > > - if ( argc == 9 ) > > + if ( argc >= 9 ) > > superpages = atoi(argv[8]); > > else > > superpages = !!hvm; > > + if ( argc >= 10 ) > > + no_increment_gid = !atoi(argv[9]); > > + else > > + no_increment_gid = 0; > > > > Just a nit: > It would be better if this was " if (argc == 10) no_increment..." as > the current form contradicts with the previous check (if argc <8 || > argc > 10), but I guess there is no correctness issue since the > first check would catch any extra args. > > Anyway, I am okay with the patch. > > Acked-by: Shriram Rajagopalan <rshriram@xxxxxxxxx> for *sections I > am responsible for* (tools/python/xen/lowlevel/checkpoint/*). > No html this time :-) Thanks for the ack Shriram. Agreed that the >= check could now be == but, as you say, there's no correctness issue so I'll leave the patch alone this time. Cheers, Paul _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |