Diff between 5226a2d35969ef1151f6e5cb3f3c35fb53afa5a3 and a6b2fd7bf28c850821b50fe675766e0624dee3de

Changed Files

File Additions Deletions Status
emulator/vhci.c +10 -1 modified

Full Patch

diff --git a/emulator/vhci.c b/emulator/vhci.c
index f8560e0..59ad1ec 100644
--- a/emulator/vhci.c
+++ b/emulator/vhci.c
@@ -230,7 +230,16 @@ int vhci_set_force_wakeup(struct vhci *vhci, bool enable)
 
 int vhci_set_msft_opcode(struct vhci *vhci, uint16_t opcode)
 {
-	return vhci_debugfs_write(vhci, "msft_opcode", &opcode, sizeof(opcode));
+	int err;
+	char val[7];
+
+	snprintf(val, sizeof(val), "0x%4x", opcode);
+
+	err = vhci_debugfs_write(vhci, "msft_opcode", &val, sizeof(val));
+	if (err)
+		return err;
+
+	return btdev_set_msft_opcode(vhci->btdev, opcode);
 }
 
 int vhci_set_aosp_capable(struct vhci *vhci, bool enable)