nfs: Make errp the last parameter of nfs_client_open
Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20170421122710.15373-10-famz@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
		
							parent
							
								
									78bbd910bb
								
							
						
					
					
						commit
						cb8d4bf677
					
				@ -497,7 +497,7 @@ out:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int64_t nfs_client_open(NFSClient *client, QDict *options,
 | 
					static int64_t nfs_client_open(NFSClient *client, QDict *options,
 | 
				
			||||||
                               int flags, Error **errp, int open_flags)
 | 
					                               int flags, int open_flags, Error **errp)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    int ret = -EINVAL;
 | 
					    int ret = -EINVAL;
 | 
				
			||||||
    QemuOpts *opts = NULL;
 | 
					    QemuOpts *opts = NULL;
 | 
				
			||||||
@ -663,7 +663,7 @@ static int nfs_file_open(BlockDriverState *bs, QDict *options, int flags,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    ret = nfs_client_open(client, options,
 | 
					    ret = nfs_client_open(client, options,
 | 
				
			||||||
                          (flags & BDRV_O_RDWR) ? O_RDWR : O_RDONLY,
 | 
					                          (flags & BDRV_O_RDWR) ? O_RDWR : O_RDONLY,
 | 
				
			||||||
                          errp, bs->open_flags);
 | 
					                          bs->open_flags, errp);
 | 
				
			||||||
    if (ret < 0) {
 | 
					    if (ret < 0) {
 | 
				
			||||||
        return ret;
 | 
					        return ret;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@ -705,7 +705,7 @@ static int nfs_file_create(const char *url, QemuOpts *opts, Error **errp)
 | 
				
			|||||||
        goto out;
 | 
					        goto out;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ret = nfs_client_open(client, options, O_CREAT, errp, 0);
 | 
					    ret = nfs_client_open(client, options, O_CREAT, 0, errp);
 | 
				
			||||||
    if (ret < 0) {
 | 
					    if (ret < 0) {
 | 
				
			||||||
        goto out;
 | 
					        goto out;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user