1 |
darkside 09/10/05 21:04:18 |
2 |
|
3 |
Added: exo-0.3.4-interix.patch |
4 |
Log: |
5 |
Port Gentoo Prefix ebuild to gentoo-x86 |
6 |
(Portage version: 2.1.6.13/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 xfce-base/exo/files/exo-0.3.4-interix.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/xfce-base/exo/files/exo-0.3.4-interix.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/xfce-base/exo/files/exo-0.3.4-interix.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: exo-0.3.4-interix.patch |
15 |
=================================================================== |
16 |
diff -ru -x '*.P[l]o' exo-0.3.4.orig/exo/exo-mount-point.c exo-0.3.4/exo/exo-mount-point.c |
17 |
--- exo-0.3.4.orig/exo/exo-mount-point.c 2008-03-13 08:08:55 +0100 |
18 |
+++ exo-0.3.4/exo/exo-mount-point.c 2008-03-13 08:58:10 +0100 |
19 |
@@ -72,7 +72,10 @@ |
20 |
#include <exo/exo-string.h> |
21 |
#include <exo/exo-alias.h> |
22 |
|
23 |
- |
24 |
+#if defined(__INTERIX) |
25 |
+#include <dirent.h> |
26 |
+#include <sys/statvfs.h> |
27 |
+#endif |
28 |
|
29 |
/* define _PATH_FSTAB if undefined */ |
30 |
#ifndef _PATH_FSTAB |
31 |
@@ -309,6 +312,45 @@ |
32 |
/* release the buffer */ |
33 |
free (mntbuf); |
34 |
} |
35 |
+#elif defined(__INTERIX) |
36 |
+ DIR* dirp = opendir("/dev/fs"); |
37 |
+ if(dirp == NULL) { |
38 |
+ g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno), |
39 |
+ _("Failed to open file \"%s\": %s"), "/dev/fs", |
40 |
+ g_strerror (errno)); |
41 |
+ return NULL; |
42 |
+ } else { |
43 |
+ char file_name[9 + NAME_MAX]; |
44 |
+ int saved_errno; |
45 |
+ |
46 |
+ while(1) { |
47 |
+ struct statvfs stat_buf; |
48 |
+ struct dirent entry; |
49 |
+ struct dirent *result; |
50 |
+ |
51 |
+ if (readdir_r (dirp, &entry, &result) || result == NULL) |
52 |
+ break; |
53 |
+ |
54 |
+ strcpy (file_name, "/dev/fs/"); |
55 |
+ strcat (file_name, entry.d_name); |
56 |
+ |
57 |
+ if(statvfs(file_name, &stat_buf) == 0) |
58 |
+ { |
59 |
+ exo_mount_point_add_if_matches(mask, device, folder, fstype, |
60 |
+ stat_buf.f_mntfromname, |
61 |
+ stat_buf.f_mntonname, |
62 |
+ stat_buf.f_fstypename, |
63 |
+ ((stat_buf.f_flag & ST_RDONLY) != 0), |
64 |
+ &mount_points); |
65 |
+ } |
66 |
+ else |
67 |
+ { |
68 |
+ /* this is ok for now... */ |
69 |
+ } |
70 |
+ } |
71 |
+ |
72 |
+ closedir (dirp); |
73 |
+ } |
74 |
#else |
75 |
#error "Add support for your operating system here." |
76 |
#endif |
77 |
@@ -413,6 +455,46 @@ |
78 |
|
79 |
/* close the file handle */ |
80 |
endfsent (); |
81 |
+#elif defined(__INTERIX) |
82 |
+ DIR* dirp = opendir("/dev/fs"); |
83 |
+ if(dirp == NULL) { |
84 |
+ g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno), |
85 |
+ _("Failed to open file \"%s\": %s"), "/dev/fs", |
86 |
+ g_strerror (errno)); |
87 |
+ return NULL; |
88 |
+ } else { |
89 |
+ char file_name[9 + NAME_MAX]; |
90 |
+ int saved_errno; |
91 |
+ |
92 |
+ while(1) { |
93 |
+ struct statvfs stat_buf; |
94 |
+ struct dirent entry; |
95 |
+ struct dirent *result; |
96 |
+ |
97 |
+ if (readdir_r (dirp, &entry, &result) || result == NULL) |
98 |
+ break; |
99 |
+ |
100 |
+ strcpy (file_name, "/dev/fs/"); |
101 |
+ strcat (file_name, entry.d_name); |
102 |
+ |
103 |
+ if(statvfs(file_name, &stat_buf) == 0) |
104 |
+ { |
105 |
+ exo_mount_point_add_if_matches(mask, device, folder, fstype, |
106 |
+ stat_buf.f_mntfromname, |
107 |
+ stat_buf.f_mntonname, |
108 |
+ stat_buf.f_fstypename, |
109 |
+ ((stat_buf.f_flag & ST_RDONLY) != 0), |
110 |
+ &mount_points); |
111 |
+ } |
112 |
+ else |
113 |
+ { |
114 |
+ /* this is ok for now... */ |
115 |
+ } |
116 |
+ } |
117 |
+ |
118 |
+ closedir (dirp); |
119 |
+ } |
120 |
+ |
121 |
#else |
122 |
#error "Add support for your operating system here." |
123 |
#endif |