static int vhost_kernel_memslots_limit(struct vhost_dev *dev)

{

    int limit = 64;

    char *s;



    if (g_file_get_contents("/sys/module/vhost/parameters/max_mem_regions",

                            &s, NULL, NULL)) {

        uint64_t val = g_ascii_strtoull(s, NULL, 10);

        if (!((val == G_MAXUINT64 || !val) && errno)) {


            return val;

        }

        error_report("ignoring invalid max_mem_regions value in vhost module:"

                     " %s", s);

    }


    return limit;

}
static int vhost_kernel_memslots_limit(struct vhost_dev *dev)

{

    int limit = 64;

    char *s;



    if (g_file_get_contents("/sys/module/vhost/parameters/max_mem_regions",

                            &s, NULL, NULL)) {

        uint64_t val = g_ascii_strtoull(s, NULL, 10);

        if (!((val == G_MAXUINT64 || !val) && errno)) {


            return val;

        }

        error_report("ignoring invalid max_mem_regions value in vhost module:"

                     " %s", s);

    }


    return limit;

}
static int FUNC_0(struct vhost_dev *VAR_0)

{

    int VAR_1 = 64;

    char *VAR_2;



    if (g_file_get_contents("/sys/module/vhost/parameters/max_mem_regions",

                            &VAR_2, NULL, NULL)) {

        uint64_t val = g_ascii_strtoull(VAR_2, NULL, 10);

        if (!((val == G_MAXUINT64 || !val) && errno)) {


            return val;

        }

        error_report("ignoring invalid max_mem_regions value in vhost module:"

                     " %VAR_2", VAR_2);

    }


    return VAR_1;

}
static int FUNC_0(struct vhost_dev *VAR_0)
{ int VAR_1 = 64; char *VAR_2; if (g_file_get_contents("/sys/module/vhost/parameters/max_mem_regions",
&VAR_2, NULL, NULL)) { uint64_t val = g_ascii_strtoull(VAR_2, NULL, 10); if (!((val == G_MAXUINT64 || !val) && errno)) { return val; } error_report("ignoring invalid max_mem_regions value in vhost module:"
" %VAR_2", VAR_2); } return VAR_1; }