Skip to contentSkip to conversation

qemu-nbd: remove useless parameter from nbd_negotiate()

PATCH Applied Laurent Vivier 2 participants 2 messages Sep 8, 2008 – Sep 10, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu-nbd: remove useless parameter from nbd_negotiate()

This patch removes "BlockDriverState *bs" from nbd_negotiate() because it is not used.

Signature · 3 lines
----------------- [email protected]  ------------------
  "La perfection est atteinte non quand il ne reste rien à
ajouter mais quand il ne reste rien à enlever." Saint Exupéry
---
 nbd.c      |    2 +-
 nbd.h      |    2 +-
 qemu-nbd.c |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
nbd.c +1 -1
Index: qemu/nbd.c
===================================================================
@@ -264,7 +264,7 @@ error:
                   Request (type == 2)
 */
 
-int nbd_negotiate(BlockDriverState *bs, int csock, off_t size)
+int nbd_negotiate(int csock, off_t size)
 {
 	char buf[8 + 8 + 8 + 128];
 
nbd.h +1 -1
Index: qemu/nbd.h
===================================================================
@@ -50,7 +50,7 @@ int tcp_socket_incoming(const char *addr
 int unix_socket_outgoing(const char *path);
 int unix_socket_incoming(const char *path);
 
-int nbd_negotiate(BlockDriverState *bs, int csock, off_t size);
+int nbd_negotiate(int csock, off_t size);
 int nbd_receive_negotiate(int csock, off_t *size, size_t *blocksize);
 int nbd_init(int fd, int csock, off_t size, size_t blocksize);
 int nbd_send_request(int csock, struct nbd_request *request);
qemu-nbd.c +1 -1
Index: qemu/qemu-nbd.c
===================================================================
@@ -458,7 +458,7 @@ int main(int argc, char **argv)
                                              (struct sockaddr *)&addr,
                                              &addr_len);
                 if (sharing_fds[nb_fds] != -1 &&
-                    nbd_negotiate(bs, sharing_fds[nb_fds], fd_size) != -1) {
+                    nbd_negotiate(sharing_fds[nb_fds], fd_size) != -1) {
                         if (sharing_fds[nb_fds] > max_fd)
                             max_fd = sharing_fds[nb_fds];
                         nb_fds++;