..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@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to