VirtualBox

Changeset 30281 in vbox for trunk


Ignore:
Timestamp:
Jun 17, 2010 10:25:10 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
62807
Message:

Runtime: added Darwin support to RTFsQueryType

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/fs.h

    r30278 r30281  
    194194#define RTFS_FS_TYPE_NTFS              11
    195195#define RTFS_FS_TYPE_ZFS               12
     196#define RTFS_FS_TYPE_XFS               13
     197#define RTFS_FS_TYPE_AUTOFS            14
     198#define RTFS_FS_TYPE_DEVFS             15
    196199
    197200
  • trunk/src/VBox/Runtime/r3/posix/fs-posix.cpp

    r30254 r30281  
    3535#ifdef RT_OS_LINUX
    3636# include <mntent.h>
     37#endif
     38#ifdef RT_OS_DARWIN
     39# include <sys/mount.h>
    3740#endif
    3841
     
    228231            if (!strcmp("zfs", Stat.st_fstype))
    229232                *pu32Type = RTFS_FS_TYPE_ZFS;
     233#elif defined(RT_OS_DARWIN)
     234            struct statfs statfsBuf;
     235            if (!statfs(pszNativeFsPath, &statfsBuf))
     236            {
     237                if (!strcmp("hfs", statfsBuf.f_fstypename))
     238                    *pu32Type = RTFS_FS_TYPE_HFS;
     239                else if (   !strcmp("fat", statfsBuf.f_fstypename)
     240                         || !strcmp("msdos", statfsBuf.f_fstypename))
     241                    *pu32Type = RTFS_FS_TYPE_FAT;
     242                else if (!strcmp("ntfs", statfsBuf.f_fstypename))
     243                    *pu32Type = RTFS_FS_TYPE_NTFS;
     244                else if (!strcmp("autofs", statfsBuf.f_fstypename))
     245                    *pu32Type = RTFS_FS_TYPE_AUTOFS;
     246                else if (!strcmp("devfs", statfsBuf.f_fstypename))
     247                    *pu32Type = RTFS_FS_TYPE_DEVFS;
     248                else if (!strcmp("nfs", statfsBuf.f_fstypename))
     249                    *pu32Type = RTFS_FS_TYPE_NFS;
     250            }
    230251#endif
    231252        }
  • trunk/src/VBox/Runtime/testcase/tstRTFsQueries.cpp

    r30274 r30281  
    9999                "cifs",
    100100                "fat",
    101                 "ntfs"
     101                "ntfs",
     102                "zfs",
     103                "xfs",
     104                "autofs",
     105                "devfs"
    102106            };
    103107
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette