On 20.12.2013 14:07, Stefan Hajnoczi wrote:
On Fri, Dec 20, 2013 at 12:31:57PM +0100, Peter Lieven wrote:
- DID NOT add full implementation of bdrv_get_allocated_file_size because
we are not in a coroutine context and I cannot do an async call here.
I could do a sync call if there would be a guarantee that no requests
are in flight. [Stefan]
Let's discuss in the other email thread where we started.
Okay.
+static int64_t nfs_client_open(NFSClient *client, const char *filename,
+ int flags, Error **errp)
+{
+ int ret = -EINVAL;
+ URI *uri;
+ char *file = NULL, *strp = NULL;
+ struct stat st;
+
+ uri = uri_parse(filename);
+ if (!uri) {
+ error_setg(errp, "Invalid URL specified.\n");
\n should not be included in error_setg() messages.
+ goto fail;
+ }
+ strp = strrchr(uri->path, '/');
+ if (strp == NULL) {
+ error_setg(errp, "Invalid URL specified.\n");
\n should not be included in error_setg() messages.
If thats the only objection you have, please remove the \n
when picking.
Thanks,
Peter