|
1 | | -From c2e4c24c226555903705aae0386aefe0e15bf873 Mon Sep 17 00:00:00 2001 |
2 | | -From: Andrew Chow < [email protected]> |
3 | | -Date: Tue, 27 Nov 2018 17:32:44 -0500 |
4 | | -Subject: [PATCH 1/3] Use linux unix socket address format |
5 | | - |
6 | | ---- |
7 | | - unix/variant/pyb.py | 6 +++--- |
8 | | - 1 file changed, 3 insertions(+), 3 deletions(-) |
9 | | - |
10 | | -diff --git a/unix/variant/pyb.py b/unix/variant/pyb.py |
11 | | -index d22bb1b..fe8e7ca 100644 |
12 | | ---- a/unix/variant/pyb.py |
13 | | -+++ b/unix/variant/pyb.py |
14 | | -@@ -36,10 +36,10 @@ class USB_HID: |
15 | | - import usocket as socket |
16 | | - self.pipe = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM) |
17 | | - # If on linux, try commenting the following line |
18 | | -- addr = bytes([len(self.fn)+2, socket.AF_UNIX] + list(self.fn)) |
19 | | -+ # addr = bytes([len(self.fn)+2, socket.AF_UNIX] + list(self.fn)) |
20 | | - # If on linux, try uncommenting the following two lines |
21 | | -- #import struct |
22 | | -- #addr = struct.pack('H108s', socket.AF_UNIX, self.fn) |
23 | | -+ import struct |
24 | | -+ addr = struct.pack('H108s', socket.AF_UNIX, self.fn) |
25 | | - while 1: |
26 | | - try: |
27 | | - self.pipe.bind(addr) |
28 | | --- |
29 | | -2.38.1 |
30 | | - |
31 | | - |
32 | 1 | From fd51e85693e0d66129133b1f195134aead1cf7d0 Mon Sep 17 00:00:00 2001 |
33 | 2 | From: Andrew Chow < [email protected]> |
34 | 3 | Date: Tue, 17 Dec 2019 17:56:05 -0500 |
|
0 commit comments