Revision 1ecda02b net/slirp.c

b/net/slirp.c
413 413

  
414 414
    if (slirp_add_hostfwd(s->slirp, is_udp, host_addr, host_port, guest_addr,
415 415
                          guest_port) < 0) {
416
        qemu_error("could not set up host forwarding rule '%s'\n",
417
                   redir_str);
416
        error_report("could not set up host forwarding rule '%s'",
417
                     redir_str);
418 418
        return -1;
419 419
    }
420 420
    return 0;
421 421

  
422 422
 fail_syntax:
423
    qemu_error("invalid host forwarding rule '%s'\n", redir_str);
423
    error_report("invalid host forwarding rule '%s'", redir_str);
424 424
    return -1;
425 425
}
426 426

  
......
473 473
        snprintf(cmd, sizeof(cmd), "rm -rf %s", s->smb_dir);
474 474
        ret = system(cmd);
475 475
        if (ret == -1 || !WIFEXITED(ret)) {
476
            qemu_error("'%s' failed.\n", cmd);
476
            error_report("'%s' failed.", cmd);
477 477
        } else if (WEXITSTATUS(ret)) {
478
            qemu_error("'%s' failed. Error code: %d\n",
479
                    cmd, WEXITSTATUS(ret));
478
            error_report("'%s' failed. Error code: %d",
479
                         cmd, WEXITSTATUS(ret));
480 480
        }
481 481
        s->smb_dir[0] = '\0';
482 482
    }
......
493 493
    snprintf(s->smb_dir, sizeof(s->smb_dir), "/tmp/qemu-smb.%ld-%d",
494 494
             (long)getpid(), instance++);
495 495
    if (mkdir(s->smb_dir, 0700) < 0) {
496
        qemu_error("could not create samba server dir '%s'\n", s->smb_dir);
496
        error_report("could not create samba server dir '%s'", s->smb_dir);
497 497
        return -1;
498 498
    }
499 499
    snprintf(smb_conf, sizeof(smb_conf), "%s/%s", s->smb_dir, "smb.conf");
......
501 501
    f = fopen(smb_conf, "w");
502 502
    if (!f) {
503 503
        slirp_smb_cleanup(s);
504
        qemu_error("could not create samba server configuration file '%s'\n",
505
                   smb_conf);
504
        error_report("could not create samba server configuration file '%s'",
505
                     smb_conf);
506 506
        return -1;
507 507
    }
508 508
    fprintf(f,
......
533 533

  
534 534
    if (slirp_add_exec(s->slirp, 0, smb_cmdline, &vserver_addr, 139) < 0) {
535 535
        slirp_smb_cleanup(s);
536
        qemu_error("conflicting/invalid smbserver address\n");
536
        error_report("conflicting/invalid smbserver address");
537 537
        return -1;
538 538
    }
539 539
    return 0;
......
618 618
    snprintf(buf, sizeof(buf), "guestfwd.tcp:%d", port);
619 619
    fwd->hd = qemu_chr_open(buf, p, NULL);
620 620
    if (!fwd->hd) {
621
        qemu_error("could not open guest forwarding device '%s'\n", buf);
621
        error_report("could not open guest forwarding device '%s'", buf);
622 622
        qemu_free(fwd);
623 623
        return -1;
624 624
    }
625 625

  
626 626
    if (slirp_add_exec(s->slirp, 3, fwd->hd, &server, port) < 0) {
627
        qemu_error("conflicting/invalid host:port in guest forwarding "
628
                   "rule '%s'\n", config_str);
627
        error_report("conflicting/invalid host:port in guest forwarding "
628
                     "rule '%s'", config_str);
629 629
        qemu_free(fwd);
630 630
        return -1;
631 631
    }
......
638 638
    return 0;
639 639

  
640 640
 fail_syntax:
641
    qemu_error("invalid guest forwarding rule '%s'\n", config_str);
641
    error_report("invalid guest forwarding rule '%s'", config_str);
642 642
    return -1;
643 643
}
644 644

  

Also available in: Unified diff