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 #include <stdio.h>
00023 #include <unistd.h>
00024 #include <stdlib.h>
00025 #include <glib.h>
00026
00027
00028 #include <sys/vfs.h>
00029
00030 #include "xmms/xmms_log.h"
00031 #include "xmmspriv/xmms_statfs.h"
00032
00033
00034
00035
00036
00037
00038
00039
00040 gboolean
00041 xmms_statfs_is_remote (const gchar *path)
00042 {
00043 struct statfs st;
00044
00045 if (statfs (path, &st) == -1) {
00046 xmms_log_error ("Failed to run statfs, will not guess.");
00047 return FALSE;
00048 }
00049
00050 if (st.f_type == 0xFF534D42 ||
00051 st.f_type == 0x6969 ||
00052 st.f_type == 0x517B) {
00053 return TRUE;
00054 }
00055
00056 return FALSE;
00057 }