From: VMware, Inc <> Date: Tue, 26 Apr 2011 21:04:51 +0000 (-0700) Subject: Fix ordering of HGFS opcode for search read V4 backwards compatibiliy X-Git-Tag: 2011.04.25-402641~37 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ec413bc828a10fde76f60eeb91f9bb27f9be0dfb;p=thirdparty%2Fopen-vm-tools.git Fix ordering of HGFS opcode for search read V4 backwards compatibiliy Since change notification is released as of Beta 1 the previous change of inserting the search read opcode ahead of this will lead to incompatibily for Beta 2 servers against Beta 1 tools. Make the continuity seamless by keeping the change notification opcode ahead of the search read V4. This means the HGFS server dispatch handler must check for a NULL entry in its handler dispatch table now. (Or we could put a dummy dispatch handler which always returns protocol error, but I think NULL is okay.) The change notification opcode is only for requests sent by the server to the guest clients in response to a directory change event. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/lib/hgfsServer/hgfsServerParameters.c b/open-vm-tools/lib/hgfsServer/hgfsServerParameters.c index ea133e799..2905985db 100644 --- a/open-vm-tools/lib/hgfsServer/hgfsServerParameters.c +++ b/open-vm-tools/lib/hgfsServer/hgfsServerParameters.c @@ -104,8 +104,8 @@ static HgfsCapability hgfsDefaultCapabilityTable[] = {HGFS_OP_WRITE_FAST_V4, HGFS_REQUEST_NOT_SUPPORTED}, {HGFS_OP_SET_WATCH_V4, HGFS_REQUEST_NOT_SUPPORTED}, {HGFS_OP_REMOVE_WATCH_V4, HGFS_REQUEST_NOT_SUPPORTED}, - {HGFS_OP_SEARCH_READ_V4, HGFS_REQUEST_NOT_SUPPORTED}, {HGFS_OP_NOTIFY_V4, HGFS_REQUEST_NOT_SUPPORTED}, + {HGFS_OP_SEARCH_READ_V4, HGFS_REQUEST_NOT_SUPPORTED}, {HGFS_OP_OPEN_V4, HGFS_REQUEST_NOT_SUPPORTED}, {HGFS_OP_ENUMERATE_STREAMS_V4, HGFS_REQUEST_NOT_SUPPORTED}, {HGFS_OP_GETATTR_V4, HGFS_REQUEST_NOT_SUPPORTED}, diff --git a/open-vm-tools/lib/include/hgfsProto.h b/open-vm-tools/lib/include/hgfsProto.h index c2d939730..3dd666888 100644 --- a/open-vm-tools/lib/include/hgfsProto.h +++ b/open-vm-tools/lib/include/hgfsProto.h @@ -128,8 +128,8 @@ typedef enum { HGFS_OP_WRITE_FAST_V4, /* Write */ HGFS_OP_SET_WATCH_V4, /* Start monitoring directory changes. */ HGFS_OP_REMOVE_WATCH_V4, /* Stop monitoring directory changes. */ - HGFS_OP_SEARCH_READ_V4, /* Read V4 directory entries. */ HGFS_OP_NOTIFY_V4, /* Notification for a directory change event. */ + HGFS_OP_SEARCH_READ_V4, /* Read V4 directory entries. */ HGFS_OP_OPEN_V4, /* Open file */ HGFS_OP_ENUMERATE_STREAMS_V4, /* Enumerate alternative named streams for a file. */ HGFS_OP_GETATTR_V4, /* Get file attributes */