]> rtime.felk.cvut.cz Git - l4.git/blobdiff - l4/pkg/libc_backends/lib/l4re_file/file.cc
update
[l4.git] / l4 / pkg / libc_backends / lib / l4re_file / file.cc
index 2495d61456d7ecfaca61d2c893d6b2a9e86373ff..fc4f2a8a01e0f5a8b1ead1393ed42fa29ca3a154 100644 (file)
@@ -193,6 +193,8 @@ extern "C" int ioctl(int fd, unsigned long request, ...) L4_NOTHROW
 
 extern "C" int fcntl64(int fd, int cmd, ...)
 {
+  Ops *o = L4Re::Vfs::vfs_ops;
+  Ref_ptr<File> f = o->get_file(fd);
   switch (cmd)
     {
     case F_DUPFD:
@@ -206,7 +208,7 @@ extern "C" int fcntl64(int fd, int cmd, ...)
       return 0;
 
     case F_GETFL:
-      return 0;
+      return f->get_status_flags();
     case F_SETFL:
       return 0;