static uint8_t usb_linux_get_alt_setting(USBHostDevice *s,

    uint8_t configuration, uint8_t interface)

{

    char device_name[64], line[1024];

    int alt_setting;



    sprintf(device_name, "%d-%s:%d.%d", s->bus_num, s->port,

            (int)configuration, (int)interface);



    if (!usb_host_read_file(line, sizeof(line), "bAlternateSetting",

                            device_name)) {

        /* Assume alt 0 on error */

        return 0;

    }

    if (sscanf(line, "%d", &alt_setting) != 1) {

        /* Assume alt 0 on error */

        return 0;

    }

    return alt_setting;

}

static uint8_t usb_linux_get_alt_setting(USBHostDevice *s,

    uint8_t configuration, uint8_t interface)

{

    char device_name[64], line[1024];

    int alt_setting;



    sprintf(device_name, "%d-%s:%d.%d", s->bus_num, s->port,

            (int)configuration, (int)interface);



    if (!usb_host_read_file(line, sizeof(line), "bAlternateSetting",

                            device_name)) {

        

        return 0;

    }

    if (sscanf(line, "%d", &alt_setting) != 1) {

        

        return 0;

    }

    return alt_setting;

}

static uint8_t usb_linux_get_alt_setting(USBHostDevice *s,     uint8_t configuration, uint8_t interface)     char device_name[64], line[1024];     int alt_setting;     sprintf(device_name, "%d-%s:%d.%d", s->bus_num, s->port,             (int)configuration, (int)interface);     if (!usb_host_read_file(line, sizeof(line), "bAlternateSetting",                             device_name)) {         return 0;     if (sscanf(line, "%d", &alt_setting) != 1) {         return 0;     return alt_setting;         return 0;
static uint8_t FUNC_0(USBHostDevice *s,

    uint8_t configuration, uint8_t interface)

{

    char VAR_0[64], VAR_1[1024];

    int VAR_2;



    sprintf(VAR_0, "%d-%s:%d.%d", s->bus_num, s->port,

            (int)configuration, (int)interface);



    if (!usb_host_read_file(VAR_1, sizeof(VAR_1), "bAlternateSetting",

                            VAR_0)) {

        

        return 0;

    }

    if (sscanf(VAR_1, "%d", &VAR_2) != 1) {

        

        return 0;

    }

    return VAR_2;

}

static uint8_t FUNC_0(USBHostDevice *s,
uint8_t configuration, uint8_t interface)
{ char VAR_0[64], VAR_1[1024]; int VAR_2; sprintf(VAR_0, "%d-%s:%d.%d", s->bus_num, s->port,
(int)configuration, (int)interface); if (!usb_host_read_file(VAR_1, sizeof(VAR_1), "bAlternateSetting",
VAR_0)) { return 0; } if (sscanf(VAR_1, "%d", &VAR_2) != 1) { return 0; } return VAR_2; }