diff options
Diffstat (limited to 'winsup/cygwin/fhandler_fifo.cc')
-rw-r--r-- | winsup/cygwin/fhandler_fifo.cc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index 8f5e793f7..9143be741 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -1,6 +1,6 @@ /* fhandler_fifo.cc - See fhandler.h for a description of the fhandler classes. - Copyright 2002, 2003, 2004, 2005, 2006 Red Hat, Inc. + Copyright 2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc. This file is part of Cygwin. @@ -12,6 +12,7 @@ #include <errno.h> #include <unistd.h> #include <stdlib.h> +#include <sys/statvfs.h> #include "cygerrno.h" #include "perprocess.h" @@ -238,3 +239,18 @@ fhandler_fifo::dup (fhandler_base *child) } return res; } + +int __stdcall +fhandler_fifo::fstatvfs (struct statvfs *sfs) +{ + /* Call statvfs on parent dir. */ + char *c, dir[CYG_MAX_PATH]; + strcpy (dir, get_name ()); + if ((c = strrchr (dir, '/'))) + { + *c = '\0'; + return statvfs (dir, sfs); + } + set_errno (EBADF); + return -1; +} |