Lines Matching refs:out_file

528 static void dump_vmstate_vmsd(FILE *out_file,
532 static void dump_vmstate_vmsf(FILE *out_file, const VMStateField *field, in dump_vmstate_vmsf() argument
535 fprintf(out_file, "%*s{\n", indent, ""); in dump_vmstate_vmsf()
537 fprintf(out_file, "%*s\"field\": \"%s\",\n", indent, "", field->name); in dump_vmstate_vmsf()
538 fprintf(out_file, "%*s\"version_id\": %d,\n", indent, "", in dump_vmstate_vmsf()
540 fprintf(out_file, "%*s\"field_exists\": %s,\n", indent, "", in dump_vmstate_vmsf()
543 fprintf(out_file, "%*s\"num\": %d,\n", indent, "", field->num); in dump_vmstate_vmsf()
545 fprintf(out_file, "%*s\"size\": %zu", indent, "", field->size); in dump_vmstate_vmsf()
547 fprintf(out_file, ",\n"); in dump_vmstate_vmsf()
548 dump_vmstate_vmsd(out_file, field->vmsd, indent, false); in dump_vmstate_vmsf()
550 fprintf(out_file, "\n%*s}", indent - 2, ""); in dump_vmstate_vmsf()
553 static void dump_vmstate_vmss(FILE *out_file, in dump_vmstate_vmss() argument
558 dump_vmstate_vmsd(out_file, subsection, indent, true); in dump_vmstate_vmss()
562 static void dump_vmstate_vmsd(FILE *out_file, in dump_vmstate_vmsd() argument
567 fprintf(out_file, "%*s{\n", indent, ""); in dump_vmstate_vmsd()
569 fprintf(out_file, "%*s\"%s\": {\n", indent, "", "Description"); in dump_vmstate_vmsd()
572 fprintf(out_file, "%*s\"name\": \"%s\",\n", indent, "", vmsd->name); in dump_vmstate_vmsd()
573 fprintf(out_file, "%*s\"version_id\": %d,\n", indent, "", in dump_vmstate_vmsd()
575 fprintf(out_file, "%*s\"minimum_version_id\": %d", indent, "", in dump_vmstate_vmsd()
581 fprintf(out_file, ",\n%*s\"Fields\": [\n", indent, ""); in dump_vmstate_vmsd()
590 fprintf(out_file, ",\n"); in dump_vmstate_vmsd()
592 dump_vmstate_vmsf(out_file, field, indent + 2); in dump_vmstate_vmsd()
597 fprintf(out_file, "\n%*s]", indent, ""); in dump_vmstate_vmsd()
603 fprintf(out_file, ",\n%*s\"Subsections\": [\n", indent, ""); in dump_vmstate_vmsd()
607 fprintf(out_file, ",\n"); in dump_vmstate_vmsd()
609 dump_vmstate_vmss(out_file, *subsection, indent + 2); in dump_vmstate_vmsd()
613 fprintf(out_file, "\n%*s]", indent, ""); in dump_vmstate_vmsd()
615 fprintf(out_file, "\n%*s}", indent - 2, ""); in dump_vmstate_vmsd()
618 static void dump_machine_type(FILE *out_file) in dump_machine_type() argument
624 fprintf(out_file, " \"vmschkmachine\": {\n"); in dump_machine_type()
625 fprintf(out_file, " \"Name\": \"%s\"\n", mc->name); in dump_machine_type()
626 fprintf(out_file, " },\n"); in dump_machine_type()
629 void dump_vmstate_json_to_file(FILE *out_file) in dump_vmstate_json_to_file() argument
634 fprintf(out_file, "{\n"); in dump_vmstate_json_to_file()
635 dump_machine_type(out_file); in dump_vmstate_json_to_file()
650 fprintf(out_file, ",\n"); in dump_vmstate_json_to_file()
653 fprintf(out_file, "%*s\"%s\": {\n", indent, "", name); in dump_vmstate_json_to_file()
655 fprintf(out_file, "%*s\"Name\": \"%s\",\n", indent, "", name); in dump_vmstate_json_to_file()
656 fprintf(out_file, "%*s\"version_id\": %d,\n", indent, "", in dump_vmstate_json_to_file()
658 fprintf(out_file, "%*s\"minimum_version_id\": %d,\n", indent, "", in dump_vmstate_json_to_file()
661 dump_vmstate_vmsd(out_file, dc->vmsd, indent, false); in dump_vmstate_json_to_file()
663 fprintf(out_file, "\n%*s}", indent - 2, ""); in dump_vmstate_json_to_file()
666 fprintf(out_file, "\n}\n"); in dump_vmstate_json_to_file()
667 fclose(out_file); in dump_vmstate_json_to_file()