Received: from eggs.gnu.org ([2001:4830:134:3::10]:38272) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9UMC-0002pE-5K for qemu-devel@nongnu.org; Tue, 31 Oct 2017 07:05:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9UM9-0004u6-0X for qemu-devel@nongnu.org; Tue, 31 Oct 2017 07:05:20 -0400 From: Alberto Garcia In-Reply-To: <20170929165347.29658-11-mreitz@redhat.com> References: <20170929165347.29658-1-mreitz@redhat.com> <20170929165347.29658-11-mreitz@redhat.com> Date: Tue, 31 Oct 2017 12:05:01 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v6 10/25] block: Add bdrv_dirname() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, Kevin Wolf , Eric Blake , John Snow On Fri 29 Sep 2017 06:53:32 PM CEST, Max Reitz wrote: > This function may be implemented by block drivers to derive a directory > name from a BDS. Concatenating this g_free()-able string with a relative > filename must result in a valid (not necessarily existing) filename, so > this is a function that should generally be not implemented by format > drivers, because this is protocol-specific. > > If a BDS's driver does not implement this function, bdrv_dirname() will > fall through to the BDS's file if it exists. If it does not, the > exact_filename field will be used to generate a directory name. > > Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia Berto