Revision 34b5d2c6 qemu-nbd.c

b/qemu-nbd.c
355 355
#endif
356 356
    pthread_t client_thread;
357 357
    const char *fmt = NULL;
358
    Error *local_err = NULL;
358 359

  
359 360
    /* The client thread uses SIGTERM to interrupt the server.  A signal
360 361
     * handler ensures that "qemu-nbd -v -c" exits with a nice status code.
......
573 574

  
574 575
    bs = bdrv_new("hda");
575 576
    srcpath = argv[optind];
576
    ret = bdrv_open(bs, srcpath, NULL, flags, drv);
577
    ret = bdrv_open(bs, srcpath, NULL, flags, drv, &local_err);
577 578
    if (ret < 0) {
578 579
        errno = -ret;
579
        err(EXIT_FAILURE, "Failed to bdrv_open '%s'", argv[optind]);
580
        err(EXIT_FAILURE, "Failed to bdrv_open '%s': %s", argv[optind],
581
            error_get_pretty(local_err));
580 582
    }
581 583

  
582 584
    fd_size = bdrv_getlength(bs);

Also available in: Unified diff