aboutsummaryrefslogtreecommitdiff
path: root/sys/src/infofd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/src/infofd.c')
-rw-r--r--sys/src/infofd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/src/infofd.c b/sys/src/infofd.c
new file mode 100644
index 0000000..8b2973b
--- /dev/null
+++ b/sys/src/infofd.c
@@ -0,0 +1,10 @@
+#include "internal.h"
+#include <linux/stat.h>
+
+int
+sys·infofd(int fd, sys·Info *file)
+{
+ if(fd < 0)
+ return sys·ErrorBadFd;
+ return sys·infoat(fd, "", sys·AtEmptyPath, sys·InfoAll, file);
+}