Skip to content

Commit

Permalink
Modified get_domain_xml.c
Browse files Browse the repository at this point in the history
add "%s" in fprintf
  • Loading branch information
livemoon committed Dec 16, 2011
1 parent 176e16c commit 895e0ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libvirt_code/get_domain_xml.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ int main() {
//list_disk_domain(dom);
char *xmldesc;
xmldesc = virDomainGetXMLDesc(dom, 0);
if ((fp = fopen(virDomainGetName(dom), "w")) == NULL) {
if ((fp = fopen(virDomainGetName(dom), "wt")) == NULL) {
printf("Cannot open file test\n");
}
fprintf(fp,xmldesc);
fprintf(fp,"%s",xmldesc);
fclose(fp);

free(xmldesc);
Expand Down

0 comments on commit 895e0ae

Please sign in to comment.