parent
8354ded7e0
commit
0b710dd86a
@ -949,6 +949,28 @@ class Linux(Platform):
|
|||||||
def _is_open(self, fd):
|
def _is_open(self, fd):
|
||||||
return fd >= 0 and fd < len(self.files) and self.files[fd] is not None
|
return fd >= 0 and fd < len(self.files) and self.files[fd] is not None
|
||||||
|
|
||||||
|
def sys_umask(self, mask):
|
||||||
|
'''
|
||||||
|
umask - Set file creation mode mask
|
||||||
|
|
||||||
|
:param int mask: New mask
|
||||||
|
'''
|
||||||
|
logger.debug("umask({:o})".format(mask))
|
||||||
|
return os.umask(mask)
|
||||||
|
|
||||||
|
def sys_chdir(self, path):
|
||||||
|
'''
|
||||||
|
chdir - Change current working directory
|
||||||
|
:param int path: Pointer to path
|
||||||
|
'''
|
||||||
|
path_str = self.current.read_string(path)
|
||||||
|
logger.debug("chdir({})".format(path_str))
|
||||||
|
try:
|
||||||
|
os.chdir(path_str)
|
||||||
|
return 0
|
||||||
|
except OSError as e:
|
||||||
|
return e.errno
|
||||||
|
|
||||||
def sys_lseek(self, fd, offset, whence):
|
def sys_lseek(self, fd, offset, whence):
|
||||||
'''
|
'''
|
||||||
lseek - reposition read/write file offset
|
lseek - reposition read/write file offset
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user