Index: /branches/libc-0.6/src/emx/include/InnoTekLIBC/backend.h
===================================================================
--- /branches/libc-0.6/src/emx/include/InnoTekLIBC/backend.h	(revision 3694)
+++ /branches/libc-0.6/src/emx/include/InnoTekLIBC/backend.h	(revision 3695)
@@ -157,4 +157,16 @@
  */
 void __libc_Back_fsSync(void);
+
+/**
+ * Query filesystem configuration information by path.
+ *
+ * @returns 0 on success.
+ * @returns Negative error code (errno.h) on failure.
+ * @param   pszPath     Path to query info about.
+ * @param   iName       Which path config variable to query.
+ * @param   plValue     Where to return the value.
+ * @sa      __libc_Back_ioPathConf, fpathconf, pathconf, sysconf.
+ */
+int __libc_Back_fsPathConf(const char *pszPath, int iName, long *plValue);
 
 /**
@@ -507,4 +519,16 @@
  */
 int __libc_Back_ioFHToPath(int fh, char *pszPath, size_t cchPath);
+
+/**
+ * Query filesystem configuration information by file handle.
+ *
+ * @returns 0 on success.
+ * @returns Negative error code (errno.h) on failure.
+ * @param   fh          The handle to query config info about.
+ * @param   iName       Which path config variable to query.
+ * @param   plValue     Where to return the configuration value.
+ * @sa      __libc_Back_fsPathConf, fpathconf, pathconf, sysconf.
+ */
+int __libc_Back_ioPathConf(int fh, int iName, long *plValue);
 
 /** @} */
Index: /branches/libc-0.6/src/emx/include/emx/io.h
===================================================================
--- /branches/libc-0.6/src/emx/include/emx/io.h	(revision 3694)
+++ /branches/libc-0.6/src/emx/include/emx/io.h	(revision 3695)
@@ -322,4 +322,34 @@
     /** Does the file system provide sufficient EA support for UNIX attributes? */
     unsigned            fUnixEAs : 1;
+    /** _PC_CHOWN_RESTRICTED - Is chown and chgrp restricted the typical unix way. */
+    unsigned            fChOwnRestricted : 1;
+    /** _PC_NO_TRUNC - Indicates whether too long names will cause errors or be truncated. */
+    unsigned            fNoNameTrunc : 1;
+    /** _PC_FILESIZEBITS - The bitsize of the type required to store the max file size. */
+    unsigned            cFileSizeBits : 7;
+    /** _PC_PATH_MAX - The maximum path length. */
+    unsigned short      cchMaxPath;
+    /** _PC_NAME_MAX - The maximum path length. */
+    unsigned short      cchMaxName;
+    /** _PC_SYMLINK_MAX - The maximum symlink length. */
+    unsigned short      cchMaxSymlink;
+    /** _PC_LINK_MAX - The maximum number of hard links per file. */
+    unsigned short      cMaxLinks;
+    /** _PC_MAX_CANON - The maximum number of bytes in a terminal canonical input queue. */
+    unsigned short      cchMaxTermCanon;
+    /** _PC_MAX_INPUT - The maximum number of bytes in a canonical input queue. */
+    unsigned short      cchMaxTermInput;
+    /** _PC_PIPE_BUF  - The maximum number of bytes that is guaranteed to be atomic when writing to a pipe. */
+    unsigned            cbPipeBuf;
+    /** _PC_ALLOC_SIZE_MIN - The (smallest) block allocation size of the file system.  */
+    unsigned            cbBlock;
+    /** _PC_REC_XFER_ALIGN - The recommended buffer alignment for transfers. */
+    unsigned short      uXferAlign;
+    /** _PC_REC_INCR_XFER_SIZE - The increments to walk between the min and max transfer sizes. */
+    unsigned short      cbXferIncr;
+    /** _PC_REC_MAX_XFER_SIZE  - The maximum recommended transfer size. */
+    unsigned long       cbXferMax;
+    /** _PC_REC_MIN_XFER_SIZE  - The minimum recommended transfer size. */
+    unsigned long       cbXferMin;
     /** Device number of the device the filesystem resides on.
      * On OS/2 the device number is derived from the driveletter. */
Index: /branches/libc-0.6/src/emx/src/lib/libc.def
===================================================================
--- /branches/libc-0.6/src/emx/src/lib/libc.def	(revision 3694)
+++ /branches/libc-0.6/src/emx/src/lib/libc.def	(revision 3695)
@@ -1961,2 +1961,4 @@
 
 
+    "___libc_Back_fsPathConf" @1959
+    "___libc_Back_ioPathConf" @1960
Index: anches/libc-0.6/src/emx/src/lib/misc/fpathcon.c
===================================================================
--- /branches/libc-0.6/src/emx/src/lib/misc/fpathcon.c	(revision 3694)
+++ 	(revision )
@@ -1,45 +1,0 @@
-/* fpathcon.c (emx+gcc) -- Copyright (c) 1994-1995 by Eberhard Mattes */
-
-#include "libc-alias.h"
-#include <unistd.h>
-#include <limits.h>
-#include <errno.h>
-
-/* Return the POSIX.1  minimum values, for now. */
-
-long _STD(fpathconf) (int handle, int name)
-{
-  switch (name)
-    {
-    case _PC_LINK_MAX:
-      return _POSIX_LINK_MAX;
-
-    case _PC_MAX_CANON:
-      return _POSIX_MAX_CANON;
-
-    case _PC_MAX_INPUT:
-      return _POSIX_MAX_INPUT;
-
-    case _PC_NAME_MAX:
-      return _POSIX_NAME_MAX;
-
-    case _PC_PATH_MAX:
-      return _POSIX_PATH_MAX;
-
-    case _PC_PIPE_BUF:
-      return _POSIX_PIPE_BUF;
-
-    case _PC_CHOWN_RESTRICTED:
-      return 1;
-
-    case _PC_NO_TRUNC:
-      return 1;                 /* TODO */
-
-    case _PC_VDISABLE:
-      return 0;
-
-    default:
-      errno = EINVAL;
-      return -1;
-    }
-}
Index: /branches/libc-0.6/src/emx/src/lib/misc/fpathconf.c
===================================================================
--- /branches/libc-0.6/src/emx/src/lib/misc/fpathconf.c	(revision 3695)
+++ /branches/libc-0.6/src/emx/src/lib/misc/fpathconf.c	(revision 3695)
@@ -0,0 +1,49 @@
+/* $Id$ */
+/** @file
+ *
+ * LIBC - fpathconf().
+ *
+ * Copyright (c) 2011 knut st. osmundsen <bird@innotek.de>
+ *
+ *
+ * This file is part of InnoTek LIBC.
+ *
+ * InnoTek LIBC is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * InnoTek LIBC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with InnoTek LIBC; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+
+/*******************************************************************************
+*   Header Files                                                               *
+*******************************************************************************/
+#include "libc-alias.h"
+#include <errno.h>
+#include <unistd.h>
+#include <InnoTekLIBC/backend.h>
+#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_FS
+#include <InnoTekLIBC/logstrict.h>
+
+
+long _STD(fpathconf)(int fh, int iName)
+{
+    LIBCLOG_ENTER("fh=%d iName=%d\n", fh, iName);
+    long lValue;
+    int rc = __libc_Back_ioPathConf(fh, iName, &lValue);
+    if (!rc)
+        LIBCLOG_RETURN_LONG(lValue);
+    errno = -rc;
+    LIBCLOG_ERROR_RETURN_LONG(-1L);
+}
+
Index: /branches/libc-0.6/src/emx/src/lib/misc/pathconf.c
===================================================================
--- /branches/libc-0.6/src/emx/src/lib/misc/pathconf.c	(revision 3694)
+++ /branches/libc-0.6/src/emx/src/lib/misc/pathconf.c	(revision 3695)
@@ -1,45 +1,49 @@
-/* pathconf.c (emx+gcc) -- Copyright (c) 1994-1995 by Eberhard Mattes */
+/* $Id: $ */
+/** @file
+ *
+ * LIBC - pathconf().
+ *
+ * Copyright (c) 2011 knut st. osmundsen <bird@innotek.de>
+ *
+ *
+ * This file is part of InnoTek LIBC.
+ *
+ * InnoTek LIBC is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * InnoTek LIBC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with InnoTek LIBC; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
 
+
+/*******************************************************************************
+*   Header Files                                                               *
+*******************************************************************************/
 #include "libc-alias.h"
+#include <errno.h>
 #include <unistd.h>
-#include <limits.h>
-#include <errno.h>
+#include <InnoTekLIBC/backend.h>
+#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_FS
+#include <InnoTekLIBC/logstrict.h>
 
-/* Return the POSIX.1  minimum values, for now. */
 
-long _STD(pathconf) (const char *path, int name)
+long _STD(pathconf)(const char *pszPath, int iName)
 {
-  switch (name)
-    {
-    case _PC_LINK_MAX:
-      return _POSIX_LINK_MAX;
+    LIBCLOG_ENTER("pszPath=%p:{%s} iName=%d\n", pszPath, pszPath, iName);
+    long lValue;
+    int rc = __libc_Back_fsPathConf(pszPath, iName, &lValue);
+    if (!rc)
+        LIBCLOG_RETURN_LONG(lValue);
+    errno = -rc;
+    LIBCLOG_ERROR_RETURN_LONG(-1L);
+}
 
-    case _PC_MAX_CANON:
-      return _POSIX_MAX_CANON;
-
-    case _PC_MAX_INPUT:
-      return _POSIX_MAX_INPUT;
-
-    case _PC_NAME_MAX:
-      return _POSIX_NAME_MAX;
-
-    case _PC_PATH_MAX:
-      return _POSIX_PATH_MAX;
-
-    case _PC_PIPE_BUF:
-      return _POSIX_PIPE_BUF;
-
-    case _PC_CHOWN_RESTRICTED:
-      return 1;
-
-    case _PC_NO_TRUNC:
-      return 1;                 /* TODO */
-
-    case _PC_VDISABLE:
-      return 0;
-
-    default:
-      errno = EINVAL;
-      return -1;
-    }
-}
Index: /branches/libc-0.6/src/emx/src/lib/sys/b_fs.h
===================================================================
--- /branches/libc-0.6/src/emx/src/lib/sys/b_fs.h	(revision 3694)
+++ /branches/libc-0.6/src/emx/src/lib/sys/b_fs.h	(revision 3695)
@@ -466,4 +466,6 @@
 int __libc_back_fsInfoSupportUnixEAs(const char *pszNativePath);
 
+int __libc_back_fsInfoPathConf(__LIBC_PFSINFO pFsInfo, int iName, long *plValue);
+
 __END_DECLS
 
Index: /branches/libc-0.6/src/emx/src/lib/sys/b_fsInfoPathConf.c
===================================================================
--- /branches/libc-0.6/src/emx/src/lib/sys/b_fsInfoPathConf.c	(revision 3695)
+++ /branches/libc-0.6/src/emx/src/lib/sys/b_fsInfoPathConf.c	(revision 3695)
@@ -0,0 +1,121 @@
+/* $Id$ */
+/** @file
+ *
+ * kNIX - fpathconf and pathconf.
+ *
+ * Copyright (c) 2011 knut st. osmundsen <bird-src-spam@anduin.net>
+ *
+ *
+ * This file is part of kLIBC.
+ *
+ * kLIBC is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * kLIBC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with kLIBC; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include <unistd.h>
+#include <limits.h>
+#include <errno.h>
+#include "syscalls.h"
+#include "b_fs.h"
+#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_FS
+#include <InnoTekLIBC/logstrict.h>
+
+/**
+ * Filesystem info to pathconf/fpathconf.
+ *
+ * @returns 0 on success.
+ * @returns Negative error code (errno.h) on failure.
+ * @param   pFsInfo     The file system info object. Can be NULL.
+ * @param   iName       Which path config variable to query.
+ * @param   plValue     Where to return the configuration value.
+ */
+int __libc_back_fsInfoPathConf(__LIBC_PFSINFO pFsInfo, int iName, long *plValue)
+{
+    LIBCLOG_ENTER("pFsInfo=%p iName=%d\n", pFsInfo, iName);
+
+    switch (iName)
+    {
+        case _PC_FILESIZEBITS:
+            *plValue = pFsInfo ? pFsInfo->cFileSizeBits   : 32;
+            break;
+        case _PC_LINK_MAX:
+            *plValue = pFsInfo ? pFsInfo->cMaxLinks       : 1;
+            break;
+        case _PC_MAX_CANON:
+            *plValue = pFsInfo ? pFsInfo->cchMaxTermCanon : MAX_CANON;
+            break;
+        case _PC_MAX_INPUT:
+            *plValue = pFsInfo ? pFsInfo->cchMaxTermInput : MAX_INPUT;
+            break;
+        case _PC_NAME_MAX:
+            *plValue = pFsInfo ? pFsInfo->cchMaxName      : _POSIX_NAME_MAX;
+            break;
+        case _PC_PATH_MAX:
+            *plValue = pFsInfo ? pFsInfo->cchMaxPath      : _POSIX_NAME_MAX;
+            break;
+        case _PC_PIPE_BUF:
+            *plValue = pFsInfo ? pFsInfo->cbPipeBuf       : _POSIX_PIPE_BUF;
+            break;
+        case _PC_ALLOC_SIZE_MIN:
+            *plValue = pFsInfo ? pFsInfo->cbBlock         : 512;
+            break;
+        case _PC_REC_INCR_XFER_SIZE:
+            *plValue = pFsInfo ? pFsInfo->cbXferIncr      : 512;
+            break;
+        case _PC_REC_MAX_XFER_SIZE:
+            *plValue = pFsInfo ? pFsInfo->cbXferMax       : (LONG_MAX / 512 * 512);
+            break;
+        case _PC_REC_MIN_XFER_SIZE:
+            *plValue = pFsInfo ? pFsInfo->cbXferMin       : 512;
+            break;
+        case _PC_REC_XFER_ALIGN:
+            *plValue = pFsInfo ? pFsInfo->uXferAlign      : 4096;
+            break;
+        case _PC_SYMLINK_MAX:
+            *plValue = pFsInfo ? pFsInfo->cchMaxSymlink   : _POSIX_SYMLINK_MAX;
+            break;
+        case _PC_CHOWN_RESTRICTED:
+            *plValue = pFsInfo ? pFsInfo->fChOwnRestricted: 1;
+            break;
+        case _PC_NO_TRUNC:
+            *plValue = pFsInfo ? pFsInfo->fNoNameTrunc    : 1;
+            break;
+        case _PC_VDISABLE:
+            *plValue = _POSIX_VDISABLE;
+            break;
+        case _PC_CAP_PRESENT:
+            *plValue = 0;
+            break;
+        case _PC_INF_PRESENT:
+            *plValue = 0;
+            break;
+        case _PC_MAC_PRESENT:
+            *plValue = 0;
+            break;
+
+        /* not implemented */
+        case _PC_ACL_EXTENDED:
+        case _PC_ACL_PATH_MAX:
+        case _PC_ASYNC_IO:
+        case _PC_PRIO_IO:
+        case _PC_SYNC_IO:
+        default:
+            LIBCLOG_ERROR_RETURN_INT(-EINVAL);
+    }
+
+    LIBCLOG_RETURN_INT(0);
+}
+
+
Index: /branches/libc-0.6/src/emx/src/lib/sys/b_fsPathConf.c
===================================================================
--- /branches/libc-0.6/src/emx/src/lib/sys/b_fsPathConf.c	(revision 3695)
+++ /branches/libc-0.6/src/emx/src/lib/sys/b_fsPathConf.c	(revision 3695)
@@ -0,0 +1,63 @@
+/* $Id$ */
+/** @file
+ *
+ * kNIX - fpathconf.
+ *
+ * Copyright (c) 2011 knut st. osmundsen <bird-src-spam@anduin.net>
+ *
+ *
+ * This file is part of kLIBC.
+ *
+ * kLIBC is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * kLIBC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with kLIBC; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include "syscalls.h"
+#include "b_fs.h"
+#include <InnoTekLIBC/backend.h>
+#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_FS
+#include <InnoTekLIBC/logstrict.h>
+
+/**
+ * Query filesystem configuration information by path.
+ *
+ * @returns 0 on success.
+ * @returns Negative error code (errno.h) on failure.
+ * @param   pszPath     Path to query info about.
+ * @param   iName       Which path config variable to query.
+ * @param   plValue     Where to return the value.
+ */
+int __libc_Back_fsPathConf(const char *pszPath, int iName, long *plValue)
+{
+    LIBCLOG_ENTER("pszPath=%p:{%s} iName=%d plValue=%p\n", (void *)pszPath, pszPath, iName, plValue);
+
+    *plValue = 0;
+
+    /*
+     * Resolve the path into an fsinfo structure and hand it on to the common
+     * function.
+     */
+    char szNativePath[PATH_MAX];
+    int rc = __libc_back_fsResolve(pszPath, BACKFS_FLAGS_RESOLVE_FULL, &szNativePath[0], NULL);
+    if (!rc)
+    {
+        __LIBC_PFSINFO pFsInfo = __libc_back_fsInfoObjByPath(szNativePath);
+        rc = __libc_back_fsInfoPathConf(pFsInfo, iName, plValue);
+        __libc_back_fsInfoObjRelease(pFsInfo);
+    }
+
+    LIBCLOG_MIX_RETURN_INT(rc);
+}
+
Index: /branches/libc-0.6/src/emx/src/lib/sys/b_ioPathConf.c
===================================================================
--- /branches/libc-0.6/src/emx/src/lib/sys/b_ioPathConf.c	(revision 3695)
+++ /branches/libc-0.6/src/emx/src/lib/sys/b_ioPathConf.c	(revision 3695)
@@ -0,0 +1,57 @@
+/* $Id$ */
+/** @file
+ *
+ * kNIX - fpathconf.
+ *
+ * Copyright (c) 2011 knut st. osmundsen <bird-src-spam@anduin.net>
+ *
+ *
+ * This file is part of kLIBC.
+ *
+ * kLIBC is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * kLIBC is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with kLIBC; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include "syscalls.h"
+#include <InnoTekLIBC/backend.h>
+#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_FS
+#include <InnoTekLIBC/logstrict.h>
+#include "b_fs.h"
+
+/**
+ * Query filesystem configuration information by file handle.
+ *
+ * @returns 0 on success.
+ * @returns Negative error code (errno.h) on failure.
+ * @param   fh          The handle to query config info about.
+ * @param   iName       Which path config variable to query.
+ * @param   plValue     Where to return the configuration value.
+ * @sa      __libc_Back_fsPathConf, fpathconf, pathconf, sysconf.
+ */
+int __libc_Back_ioPathConf(int fh, int iName, long *plValue)
+{
+    LIBCLOG_ENTER("fh=%d iName=%d pvValue=%p\n", fh, iName, plValue);
+
+    /*
+     * Resolve the file handle and let the FS code we have in common with
+     * __libc_back_fsNativePathConf do the job.
+     */
+    __LIBC_PFH pFH;
+    int rc = __libc_FHEx(fh, &pFH);
+    if (rc == 0)
+        rc = __libc_back_fsInfoPathConf(pFH->pFsInfo, iName, plValue);
+    LIBCLOG_MIX_RETURN_INT(rc);
+}
+
Index: /branches/libc-0.6/src/emx/src/lib/sys/fs.c
===================================================================
--- /branches/libc-0.6/src/emx/src/lib/sys/fs.c	(revision 3694)
+++ /branches/libc-0.6/src/emx/src/lib/sys/fs.c	(revision 3695)
@@ -337,12 +337,12 @@
      * Setup the the executable path rewrite rule.
      */
-    PTIB pTib; 
+    PTIB pTib;
     PPIB pPib;
     DosGetInfoBlocks(&pTib, &pPib);
     rc = DosQueryModuleName(pPib->pib_hmte, sizeof(__libc_gszExecPath), &__libc_gszExecPath[0]);
-    if (!rc) 
+    if (!rc)
     {
         char *psz = strchr(&__libc_gszExecPath[0], '\0');
-        while (     psz > &__libc_gszExecPath[0] 
+        while (     psz > &__libc_gszExecPath[0]
                &&   *psz != '\\'
                &&   *psz != '/'
@@ -365,5 +365,5 @@
     if (DosQuerySysInfo(QSV_BOOT_DRIVE, QSV_BOOT_DRIVE, &ulBootDrive, sizeof(ulBootDrive)))
         ulBootDrive = 'C' - 'A' - 1; /* A = 1 */
-    __libc_gszTmpDir[0] = __libc_gszSystemRoot[0] = __libc_gszSystemDrive[0] 
+    __libc_gszTmpDir[0] = __libc_gszSystemRoot[0] = __libc_gszSystemDrive[0]
         = (char)ulBootDrive + 'A' - 1;
 
@@ -1800,13 +1800,28 @@
     PFSQBUFFER2 pfsqb = (PFSQBUFFER2)achBuffer;
 
-    /* init the structure */
-    pFsInfo->fZeroNewBytes = 0;
-    pFsInfo->fUnixEAs = 0;
-    pFsInfo->Dev = Dev;
-    pFsInfo->szName[0] = '\0';
-    pFsInfo->szMountpoint[0] = minor(Dev);
-    pFsInfo->szMountpoint[1] = ':';
-    pFsInfo->szMountpoint[2] = '\0';
-    pFsInfo->szMountpoint[3] = '\0';
+    /* init the structure with defaults. */
+    pFsInfo->fZeroNewBytes      = 0;
+    pFsInfo->fUnixEAs           = 0;
+    pFsInfo->fChOwnRestricted   = 1;
+    pFsInfo->fNoNameTrunc       = 1;
+    pFsInfo->cFileSizeBits      = 64;
+    pFsInfo->cchMaxPath         = CCHMAXPATH;
+    pFsInfo->cchMaxName         = CCHMAXPATHCOMP;
+    pFsInfo->cchMaxSymlink      = CCHMAXPATH;
+    pFsInfo->cMaxLinks          = 1;
+    pFsInfo->cchMaxTermCanon    = MAX_CANON;
+    pFsInfo->cchMaxTermInput    = MAX_INPUT;
+    pFsInfo->cbPipeBuf          = _POSIX_PIPE_BUF;
+    pFsInfo->cbBlock            = 512;
+    pFsInfo->cbXferIncr         = 0x1000;
+    pFsInfo->cbXferMax          = 0xf000;
+    pFsInfo->cbXferMin          = 0x1000;
+    pFsInfo->uXferAlign         = 0x1000;
+    pFsInfo->Dev                = Dev;
+    pFsInfo->szName[0]          = '\0';
+    pFsInfo->szMountpoint[0]    = minor(Dev);
+    pFsInfo->szMountpoint[1]    = ':';
+    pFsInfo->szMountpoint[2]    = '\0';
+    pFsInfo->szMountpoint[3]    = '\0';
 
     /* query fs info */
@@ -1816,10 +1831,20 @@
     if (!rc)
         strncat(pFsInfo->szName, (const char *)&pfsqb->szName[pfsqb->cbName + 1], sizeof(pFsInfo->szName) - 1);
-    if (    !strcmp(pFsInfo->szName, "JFS")
-        ||  !strcmp(pFsInfo->szName, "HPFS")
-        ||  !strcmp(pFsInfo->szName, "FAT"))
+    if (!strcmp(pFsInfo->szName, "HPFS"))
     {
         pFsInfo->fZeroNewBytes  = 1;
         pFsInfo->fUnixEAs       = 1;
+        /** @todo detect HPFS386? */
+    }
+    else if (!strcmp(pFsInfo->szName, "JFS"))
+    {
+        pFsInfo->fZeroNewBytes  = 1;
+        pFsInfo->fUnixEAs       = 1;
+    }
+    else if (!strcmp(pFsInfo->szName, "FAT"))
+    {
+        pFsInfo->fZeroNewBytes  = 1;
+        pFsInfo->fUnixEAs       = 1;
+        pFsInfo->cchMaxName     = 8+1+3;
     }
     else if (!strcmp(pFsInfo->szName, "LAN"))
@@ -1827,21 +1852,11 @@
         /* should find a way of getting the remote fs... */
         pFsInfo->fZeroNewBytes  = 1;    /* for performance reasons, assume it zeros. */
-        pFsInfo->fUnixEAs       = 0;
+        pFsInfo->cbXferMin      = 0x200;
+        pFsInfo->cbXferIncr     = 0x200;
     }
     else if (!strcmp(pFsInfo->szName, "RAMFS"))
-    {
         pFsInfo->fZeroNewBytes  = 0;
-        pFsInfo->fUnixEAs       = 1; /* but it doesn't zero */
-    }
     /*else if (!strcmp(pFsInfo->szName, "FAT32"))
-    {
-        pFsInfo->fZeroNewBytes  = 0;
-        pFsInfo->fUnixEAs       = 0;
-    }*/
-    else
-    {
-        pFsInfo->fZeroNewBytes  = 0;
-        pFsInfo->fUnixEAs       = 0;
-    }
+    { } */
 
     LIBCLOG_MSG2("fsInfoObjUpdate: dev:%#x mp:%s fsd:%s fZeroNewBytes=%d fUnixEAs=%d\n",
