From 777129064b5a3863e8c7099f87053e8cd48d5f2a Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Wed, 24 Dec 2014 17:58:02 +0200 Subject: [PATCH] fcntl: fcntl/ioctl arg defaults to 0 per CPython. --- fcntl/fcntl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fcntl/fcntl.py b/fcntl/fcntl.py index ed46ce3c..152f5e3a 100644 --- a/fcntl/fcntl.py +++ b/fcntl/fcntl.py @@ -10,14 +10,14 @@ ioctl_l = libc.func("i", "ioctl", "iil") ioctl_s = libc.func("i", "ioctl", "iip") -def fcntl(fd, op, arg): +def fcntl(fd, op, arg=0): if type(arg) is int: return fcntl_l(fd, op, arg) else: return fcntl_s(fd, op, arg) -def ioctl(fd, op, arg): +def ioctl(fd, op, arg=0): if type(arg) is int: return ioctl_l(fd, op, arg) else: