From 41c7cdcfbe40025035a764531241cadc76c83de0 Mon Sep 17 00:00:00 2001
From: Shreenidhi Shedi <sshedi@vmware.com>
Date: Fri, 26 Nov 2021 00:36:27 +0530
Subject: [PATCH] Return immediately from VMCISock_GetAFValueFd

The ioctl in this function call floods dmesg with
"Unknown ioctl 1976 messages"

Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
---
 open-vm-tools/lib/include/vmci_sockets.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/open-vm-tools/lib/include/vmci_sockets.h b/open-vm-tools/lib/include/vmci_sockets.h
index e1e7f9c85..334c16c6c 100644
--- a/open-vm-tools/lib/include/vmci_sockets.h
+++ b/open-vm-tools/lib/include/vmci_sockets.h
@@ -742,6 +742,15 @@ struct uuid_2_cid {
 
    static inline int VMCISock_GetAFValueFd(int *outFd)
    {
+      /*
+       * ioctl(fd, VMCI_SOCKETS_GET_AF_VALUE, &family)
+       * The above call fails in aarch64 & floods Unknown ioctl 1976 messages
+       * in dmesg output, hence disabling this for aarch64 only
+       * This patch gets applied to aarch64 only, this is done using build time
+       * guards in spec file.
+       */
+      return -1;
+
       int fd;
       int family = -1;
 
-- 
2.33.1