summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhpa <hpa>2005-01-10 02:44:17 +0000
committerhpa <hpa>2005-01-10 02:44:17 +0000
commitf8edb0e82019cd36dc20abafda23ca523ccc0c13 (patch)
tree5a05bf13f7a02fdf589a1f29ba62a5358c6af8c8
parent8e1e02217fdefffc00be9d444d94f0f2c8ebdc6e (diff)
downloadsyslinux-3.06-pre1.tar.gz
ftell() operationsyslinux-3.06-pre1
-rw-r--r--com32/lib/sys/ftell.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/com32/lib/sys/ftell.c b/com32/lib/sys/ftell.c
new file mode 100644
index 00000000..3db2814f
--- /dev/null
+++ b/com32/lib/sys/ftell.c
@@ -0,0 +1,18 @@
+/*
+ * sys/ftell.c
+ *
+ * We can't seek, but we can at least tell...
+ */
+
+#include <stdio.h>
+#include "sys/file.h"
+
+long ftell(FILE *stream)
+{
+ int fd = fileno(stream);
+ struct file_info *fp = &__file_info[fd];
+
+ return fp->i.offset;
+}
+
+