-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1 iQIcBAABAgAGBQJW6Zj4AAoJEL2+eyfA3jBXKWUP/2m7AKVuHcK2I8eUM0Wv2rwN ngtGaQiZV8JRsIIXeTNsr1eAZiFK1iSn7iwuN4gH+Q0wQilvDs6RcZK6Cey2tqqG O4Gn/EV3Nj+gtty1D7i5se30MrFxMBvmVPRlPzbIImjt04vGOFxjKnmehAqoLdsT 9+k5UhJKwPdcVb1QMWLmuoTIjbwCYQgRWjiSi0Z4VIaBr2AhLKyRUGWzsFHW6MHx OPgvFfwzK5HvgZ/VZ4jz6W00I3dOSnbBIvzUQ2uPtFaAoKEr1cUfn1qurxXnVPLP ZlPJ7EnNfCczDu568UvFmqz4lEKy9og1tWC9futeW0MYEsutjxxple1UjFeE1A9E bvUUPjhUENz21GlTnvlH/XROu3FQOp4mLT7DVmyPZFo30xTtw5wpBu37PCFzFLqO ERwIr2Wax9Ng2+gYH04YtfFagmcKjOlFEvLRsIikG0gnKzZeY/io+dPFtje+2dup F3hXNHR1s21Se6eHAS4UpnR7l6nVHtlrJLJXjPWne4ySgD1L9/s5Rb4o3JILnpBG VX1a0/ed0ZgaoR5edUzsl1EswHVHyEA/mGQKyetbbe0Pxtb8pHYdYLyhV9QIBukY PECazykbw/mfl1H7I3Rmivn13Dj+6MjSdZyRHhmZTOqqfaST3aFYaNy64/M9jvLg b9EKPtFiK+9/XxS9yCFo =s9sC -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into staging # gpg: Signature made Wed 16 Mar 2016 17:33:44 GMT using RSA key ID C0DE3057 # gpg: Good signature from "Jeffrey Cody <jcody@redhat.com>" # gpg: aka "Jeffrey Cody <jeff@codyprime.org>" # gpg: aka "Jeffrey Cody <codyprime@gmail.com>" * remotes/cody/tags/block-pull-request: MAINTAINERS: Fix typo, block/stream.h -> block/stream.c block/sheepdog: fix argument passed to qemu_strtoul() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
33616ace9f
@ -1016,7 +1016,7 @@ F: blockjob.c
|
||||
F: include/block/blockjob.h
|
||||
F: block/backup.c
|
||||
F: block/commit.c
|
||||
F: block/stream.h
|
||||
F: block/stream.c
|
||||
F: block/mirror.c
|
||||
T: git git://github.com/codyprime/qemu-kvm-jtc.git block
|
||||
|
||||
|
@ -2549,7 +2549,7 @@ static int sd_snapshot_delete(BlockDriverState *bs,
|
||||
const char *name,
|
||||
Error **errp)
|
||||
{
|
||||
uint32_t snap_id = 0;
|
||||
unsigned long snap_id = 0;
|
||||
char snap_tag[SD_MAX_VDI_TAG_LEN];
|
||||
Error *local_err = NULL;
|
||||
int fd, ret;
|
||||
@ -2571,12 +2571,15 @@ static int sd_snapshot_delete(BlockDriverState *bs,
|
||||
memset(buf, 0, sizeof(buf));
|
||||
memset(snap_tag, 0, sizeof(snap_tag));
|
||||
pstrcpy(buf, SD_MAX_VDI_LEN, s->name);
|
||||
if (qemu_strtoul(snapshot_id, NULL, 10, (unsigned long *)&snap_id)) {
|
||||
return -1;
|
||||
ret = qemu_strtoul(snapshot_id, NULL, 10, &snap_id);
|
||||
if (ret || snap_id > UINT32_MAX) {
|
||||
error_setg(errp, "Invalid snapshot ID: %s",
|
||||
snapshot_id ? snapshot_id : "<null>");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (snap_id) {
|
||||
hdr.snapid = snap_id;
|
||||
hdr.snapid = (uint32_t) snap_id;
|
||||
} else {
|
||||
pstrcpy(snap_tag, sizeof(snap_tag), snapshot_id);
|
||||
pstrcpy(buf + SD_MAX_VDI_LEN, SD_MAX_VDI_TAG_LEN, snap_tag);
|
||||
|
Loading…
x
Reference in New Issue
Block a user