diff --git a/exo/exo-mount-point.c b/exo/exo-mount-point.c index 1b805ff..a98896c 100644 --- a/exo/exo-mount-point.c +++ b/exo/exo-mount-point.c @@ -309,6 +309,9 @@ exo_mount_point_list_match_active (ExoMountPointMatchMask mask, /* release the buffer */ free (mntbuf); } +#elif defined(__INTERIX) + /* there is no difference between active and configured file systems on interix */ + mount_points = exo_mount_point_list_match_configured (mask, device, folder, fstype, error); #else #error "Add support for your operating system here." #endif @@ -413,6 +416,38 @@ exo_mount_point_list_match_configured (ExoMountPointMatchMask mask, /* close the file handle */ endfsent (); +#elif defined(__INTERIX) + GDir *dir; + const gchar *name; + gchar *filename; + struct statvfs stat_buf; + + dir = g_dir_open ("/dev/fs", 0, error); + if (G_UNLIKELY (dir == NULL)) + return NULL; + + for (;;) + { + name = g_dir_read_name (dir); + if (G_UNLIKELY (name == NULL)) + break; + + filename = g_build_filename ("/dev/fs", name, NULL); + + if (statvfs (filename, &stat_buf) == 0) + { + exo_mount_point_add_if_matches (mask, device, folder, fstype, + stat_buf.f_mntfromname, + stat_buf.f_fstypename, + stat_buf.f_fstypename, + ((stat_buf.f_flag & ST_RDONLY) != 0), + &mount_points); + } + + g_free (filename); + } + + g_dir_close (dir); #else #error "Add support for your operating system here." #endif