kopia lustrzana https://github.com/micropython/micropython-lib
fcntl: fcntl/ioctl arg defaults to 0 per CPython.
rodzic
ec4217b8fa
commit
777129064b
|
@ -10,14 +10,14 @@ ioctl_l = libc.func("i", "ioctl", "iil")
|
||||||
ioctl_s = libc.func("i", "ioctl", "iip")
|
ioctl_s = libc.func("i", "ioctl", "iip")
|
||||||
|
|
||||||
|
|
||||||
def fcntl(fd, op, arg):
|
def fcntl(fd, op, arg=0):
|
||||||
if type(arg) is int:
|
if type(arg) is int:
|
||||||
return fcntl_l(fd, op, arg)
|
return fcntl_l(fd, op, arg)
|
||||||
else:
|
else:
|
||||||
return fcntl_s(fd, op, arg)
|
return fcntl_s(fd, op, arg)
|
||||||
|
|
||||||
|
|
||||||
def ioctl(fd, op, arg):
|
def ioctl(fd, op, arg=0):
|
||||||
if type(arg) is int:
|
if type(arg) is int:
|
||||||
return ioctl_l(fd, op, arg)
|
return ioctl_l(fd, op, arg)
|
||||||
else:
|
else:
|
||||||
|
|
Ładowanie…
Reference in New Issue