~pmdj/ubuntu/trusty/qemu/2.9+applesmc+fadtv3

« back to all changes in this revision

Viewing changes to block/crypto.c

  • Committer: Phil Dennis-Jordan
  • Date: 2017-07-21 08:03:43 UTC
  • mfrom: (1.1.1)
  • Revision ID: phil@philjordan.eu-20170721080343-2yr2vdj7713czahv
New upstream release 2.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
300
300
    QCryptoBlockOpenOptions *open_opts = NULL;
301
301
    unsigned int cflags = 0;
302
302
 
 
303
    bs->file = bdrv_open_child(NULL, options, "file", bs, &child_file,
 
304
                               false, errp);
 
305
    if (!bs->file) {
 
306
        return -EINVAL;
 
307
    }
 
308
 
303
309
    opts = qemu_opts_create(opts_spec, NULL, 0, &error_abort);
304
310
    qemu_opts_absorb_qdict(opts, options, &local_err);
305
311
    if (local_err) {
383
389
 
384
390
    offset += payload_offset;
385
391
 
386
 
    return bdrv_truncate(bs->file->bs, offset);
 
392
    return bdrv_truncate(bs->file, offset);
387
393
}
388
394
 
389
395
static void block_crypto_close(BlockDriverState *bs)
622
628
    .bdrv_probe         = block_crypto_probe_luks,
623
629
    .bdrv_open          = block_crypto_open_luks,
624
630
    .bdrv_close         = block_crypto_close,
 
631
    .bdrv_child_perm    = bdrv_format_default_perms,
625
632
    .bdrv_create        = block_crypto_create_luks,
626
633
    .bdrv_truncate      = block_crypto_truncate,
627
634
    .create_opts        = &block_crypto_create_opts_luks,