|
From: | Eric Blake |
Subject: | Re: [Qemu-devel] [PATCH 1/3] block/ssh: Pull ssh_grow_file() from ssh_create() |
Date: | Wed, 14 Feb 2018 15:08:19 -0600 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
On 02/14/2018 02:49 PM, Max Reitz wrote:
If we ever want to offer even rudimentary truncation functionality for ssh, we should put the respective code into a reusable function. Signed-off-by: Max Reitz <address@hidden> --- block/ssh.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-)
+++ b/block/ssh.c @@ -803,6 +803,26 @@ static int ssh_file_open(BlockDriverState *bs, QDict *options, int bdrv_flags, return ret; }+static int ssh_grow_file(BDRVSSHState *s, int64_t offset, Error **errp)+{ + ssize_t ret; + char c[1] = { '\0' };
Could spell this 'char c[1] = "";', but you just did code motion. Reviewed-by: Eric Blake <address@hidden> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
[Prev in Thread] | Current Thread | [Next in Thread] |