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

Re: [Xen-devel] [RFC XEN PATCH 13/16] tools/libxl: add support to map host pmem device to guests



..snip..
> > +    mfn = host_spa >> XC_PAGE_SHIFT;
> > +    gpfn = guest_spa >> XC_PAGE_SHIFT;
> > +    nr_gpfns = guest_size >> XC_PAGE_SHIFT;
> > +
> > +    switch ( st.st_mode & S_IFMT )
> > +    {
> > +    case S_IFBLK:
> > +        ret = add_pages(gc, domid, mfn, gpfn, nr_gpfns);
> 
> You will need to change the return value.
> > +        break;
> > +
> > +    case S_IFREG:
> > +        ret = add_file(gc, domid, fd, mfn, gpfn, nr_gpfns);
> 
> Ditto here.

Also should we close the fd descriptor if there are any errors?

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.