crypto.c (757dda54b43867936012970a1b457f3d16e7398d) | crypto.c (a9262f551eba44d4d0f9e396d7124c059a93e204) |
---|---|
1/* 2 * QEMU block full disk encryption 3 * 4 * Copyright (c) 2015-2016 Red Hat, Inc. 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either --- 95 unchanged lines hidden (view full) --- 104 const uint8_t *buf, 105 size_t buflen, 106 void *opaque, 107 Error **errp) 108{ 109 struct BlockCryptoCreateData *data = opaque; 110 ssize_t ret; 111 | 1/* 2 * QEMU block full disk encryption 3 * 4 * Copyright (c) 2015-2016 Red Hat, Inc. 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either --- 95 unchanged lines hidden (view full) --- 104 const uint8_t *buf, 105 size_t buflen, 106 void *opaque, 107 Error **errp) 108{ 109 struct BlockCryptoCreateData *data = opaque; 110 ssize_t ret; 111 |
112 ret = blk_pwrite(data->blk, offset, buf, buflen, 0); | 112 ret = blk_pwrite(data->blk, offset, buflen, buf, 0); |
113 if (ret < 0) { 114 error_setg_errno(errp, -ret, "Could not write encryption header"); 115 return ret; 116 } 117 return 0; 118} 119 120static int block_crypto_create_init_func(QCryptoBlock *block, --- 854 unchanged lines hidden --- | 113 if (ret < 0) { 114 error_setg_errno(errp, -ret, "Could not write encryption header"); 115 return ret; 116 } 117 return 0; 118} 119 120static int block_crypto_create_init_func(QCryptoBlock *block, --- 854 unchanged lines hidden --- |