~ubuntu-branches/ubuntu/quantal/open-vm-tools/quantal-201210021442

« back to all changes in this revision

Viewing changes to modules/linux/vsock/linux/util.c

  • Committer: Bazaar Package Importer
  • Author(s): Serge Hallyn
  • Date: 2011-03-31 14:20:05 UTC
  • mfrom: (1.4.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110331142005-3n9red91p7ogkweo
Tags: 2011.03.28-387002-0ubuntu1
* Merge latest upstream git tag.  This has the unlocked_ioctl change
  needed to fix dkms build failures (LP: #727342)
* Changes in debian/rules:
  - work around a bug in toolbox/Makefile, where install-exec-hook is
    not happening.  This needs to get fixed the right way.
  - don't install 'vmware-user' which seems to no longer exist
  - move /etc/xdg into open-vm-toolbox (which should be done using .install)
* debian/open-vm-tools.init: add 'modprobe [-r] vmblock'. (LP: #332323)
* debian/rules and debian/open-vm-toolbox.lintian-overrides:
  - Make vmware-user-suid-wrapper suid-root (LP: #332323)

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 */
25
25
 
26
26
#include "driver-config.h"
 
27
#include <linux/list.h>
27
28
#include <linux/socket.h>
28
29
#include "compat_sock.h"
29
 
#include "compat_list.h"
30
30
 
31
31
#include "af_vsock.h"
32
32
#include "util.h"
34
34
struct list_head vsockBindTable[VSOCK_HASH_SIZE + 1];
35
35
struct list_head vsockConnectedTable[VSOCK_HASH_SIZE];
36
36
 
37
 
spinlock_t vsockTableLock = SPIN_LOCK_UNLOCKED;
38
 
 
39
 
/*
40
 
 * snprintf() wasn't exported until 2.4.10: fall back on sprintf in those
41
 
 * cases.  It's okay since this is only for the debug function for logging
42
 
 * packets.
43
 
 */
44
 
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 10)
45
 
#define snprintf(str, size, fmt, args...) sprintf(str, fmt, ## args)
46
 
#endif
 
37
DEFINE_SPINLOCK(vsockTableLock);
47
38
 
48
39
 
49
40
/*
371
362
         sk = sk_vsock(vsk);
372
363
 
373
364
         /* We only store stream sockets in the bound table. */
374
 
         ASSERT(sk->compat_sk_socket ?
375
 
                   sk->compat_sk_socket->type == SOCK_STREAM :
 
365
         ASSERT(sk->sk_socket ?
 
366
                   sk->sk_socket->type == SOCK_STREAM :
376
367
                   1);
377
368
         goto found;
378
369
      }