vchan: fix xc_gnttab_open call

This commit is contained in:
Marek Marczykowski 2012-06-03 16:38:00 +02:00
parent edf1ecfcfd
commit f01b1b40ac

View File

@ -278,10 +278,11 @@ static int client_interface_init(struct libvchan *ctrl, int domain, int devno)
struct xs_handle *xs; struct xs_handle *xs;
#ifdef XENCTRL_HAS_XC_INTERFACE #ifdef XENCTRL_HAS_XC_INTERFACE
xc_interface *xcfd; xc_interface *xcfd;
xc_gnttab *xcg;
#else #else
int xcfd; int xcfd;
#endif
int xcg; int xcg;
#endif
char buf[64]; char buf[64];
char *ref; char *ref;
int version; int version;
@ -346,7 +347,7 @@ static int client_interface_init(struct libvchan *ctrl, int domain, int devno)
xc_interface_close(xcfd); xc_interface_close(xcfd);
break; break;
case 2: case 2:
xcg = xc_gnttab_open(); xcg = xc_gnttab_open(NULL, 0);
if (xcg < 0) if (xcg < 0)
goto fail; goto fail;
ctrl->ring = (struct vchan_interface *) ctrl->ring = (struct vchan_interface *)