Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include <stdio.h>
00025 #include <unistd.h>
00026 #include <stdlib.h>
00027 #include <glib.h>
00028
00029
00030 #include <sys/param.h>
00031 #include <sys/mount.h>
00032
00033 #include "xmms/xmms_log.h"
00034 #include "xmmspriv/xmms_statfs.h"
00035
00036
00037
00038
00039
00040
00041
00042
00043 gboolean
00044 xmms_statfs_is_remote (const gchar *path)
00045 {
00046 struct statvfs st;
00047
00048 if (statvfs (path, &st) == -1) {
00049 xmms_log_error ("Failed to run statfs, will not guess.");
00050 return FALSE;
00051 }
00052
00053 if ((g_ascii_strcasecmp (st.f_fstypename, "nfs") == 0) ||
00054 (g_ascii_strcasecmp (st.f_fstypename, "smb") == 0)) {
00055 return TRUE;
00056 }
00057
00058 return FALSE;
00059 }