static int con_init(struct XenDevice *xendev)

{

    struct XenConsole *con = container_of(xendev, struct XenConsole, xendev);

    char *type, *dom;



    /* setup */

    dom = xs_get_domain_path(xenstore, con->xendev.dom);

    snprintf(con->console, sizeof(con->console), "%s/console", dom);

    free(dom);



    type = xenstore_read_str(con->console, "type");

    if (!type || strcmp(type, "ioemu") != 0) {

	xen_be_printf(xendev, 1, "not for me (type=%s)\n", type);

	return -1;

    }



    if (!serial_hds[con->xendev.dev])

	xen_be_printf(xendev, 1, "WARNING: serial line %d not configured\n",

                      con->xendev.dev);

    else

        con->chr = serial_hds[con->xendev.dev];



    return 0;

}

static int con_init(struct XenDevice *xendev)

{

    struct XenConsole *con = container_of(xendev, struct XenConsole, xendev);

    char *type, *dom;



    

    dom = xs_get_domain_path(xenstore, con->xendev.dom);

    snprintf(con->console, sizeof(con->console), "%s/console", dom);

    free(dom);



    type = xenstore_read_str(con->console, "type");

    if (!type || strcmp(type, "ioemu") != 0) {

	xen_be_printf(xendev, 1, "not for me (type=%s)\n", type);

	return -1;

    }



    if (!serial_hds[con->xendev.dev])

	xen_be_printf(xendev, 1, "WARNING: serial line %d not configured\n",

                      con->xendev.dev);

    else

        con->chr = serial_hds[con->xendev.dev];



    return 0;

}

	return -1;     return 0;
static int FUNC_0(struct XenDevice *VAR_0)

{

    struct XenConsole *VAR_1 = container_of(VAR_0, struct XenConsole, VAR_0);

    char *VAR_2, *VAR_3;



    

    VAR_3 = xs_get_domain_path(xenstore, VAR_1->VAR_0.VAR_3);

    snprintf(VAR_1->console, sizeof(VAR_1->console), "%s/console", VAR_3);

    free(VAR_3);



    VAR_2 = xenstore_read_str(VAR_1->console, "VAR_2");

    if (!VAR_2 || strcmp(VAR_2, "ioemu") != 0) {

	xen_be_printf(VAR_0, 1, "not for me (VAR_2=%s)\n", VAR_2);

	return -1;

    }



    if (!serial_hds[VAR_1->VAR_0.dev])

	xen_be_printf(VAR_0, 1, "WARNING: serial line %d not configured\n",

                      VAR_1->VAR_0.dev);

    else

        VAR_1->chr = serial_hds[VAR_1->VAR_0.dev];



    return 0;

}

static int FUNC_0(struct XenDevice *VAR_0)
{ struct XenConsole *VAR_1 = container_of(VAR_0, struct XenConsole, VAR_0); char *VAR_2, *VAR_3; VAR_3 = xs_get_domain_path(xenstore, VAR_1->VAR_0.VAR_3); snprintf(VAR_1->console, sizeof(VAR_1->console), "%s/console", VAR_3); free(VAR_3); VAR_2 = xenstore_read_str(VAR_1->console, "VAR_2"); if (!VAR_2 || strcmp(VAR_2, "ioemu") != 0) { xen_be_printf(VAR_0, 1, "not for me (VAR_2=%s)\n", VAR_2); return -1; } if (!serial_hds[VAR_1->VAR_0.dev])
xen_be_printf(VAR_0, 1, "WARNING: serial line %d not configured\n",
VAR_1->VAR_0.dev); else
VAR_1->chr = serial_hds[VAR_1->VAR_0.dev]; return 0; }