16560
|
1 |
diff -ru ../gparted-0.4.5/compose/ucompose.hpp ./compose/ucompose.hpp
|
|
2 |
--- ../gparted-0.4.5/compose/ucompose.hpp 2009-04-18 13:38:05.000000000 -0700
|
|
3 |
+++ ./compose/ucompose.hpp 2009-08-28 13:37:02.167527000 -0700
|
|
4 |
@@ -127,7 +127,11 @@
|
|
5 |
|
|
6 |
return Glib::convert(std::string(reinterpret_cast<const char *>(str.data()),
|
|
7 |
str.size() * sizeof(wchar_t)),
|
|
8 |
+#ifdef __sun
|
|
9 |
+ "UTF-8", "UCS-4LE");
|
|
10 |
+#else
|
|
11 |
"UTF-8", "WCHAR_T");
|
|
12 |
+#endif
|
|
13 |
}
|
|
14 |
|
|
15 |
// specialisations for the common string types
|
|
16 |
diff -ru ../gparted-0.4.5/configure ./configure
|
|
17 |
--- ../gparted-0.4.5/configure 2009-05-08 09:05:43.000000000 -0700
|
|
18 |
+++ ./configure 2009-06-12 10:12:27.781410000 -0700
|
|
19 |
@@ -22031,6 +22031,10 @@
|
|
20 |
#include <stdio.h>
|
|
21 |
#include <parted/parted.h>
|
|
22 |
|
|
23 |
+#ifdef __sun
|
|
24 |
+char *program_name = "test";
|
|
25 |
+#endif
|
|
26 |
+
|
|
27 |
int main ()
|
|
28 |
{
|
|
29 |
int min_major ;
|
|
30 |
diff -ru ../gparted-0.4.5/configure.in ./configure.in
|
|
31 |
--- ../gparted-0.4.5/configure.in 2009-05-08 08:50:41.000000000 -0700
|
|
32 |
+++ ./configure.in 2009-06-12 10:12:05.631528000 -0700
|
|
33 |
@@ -49,6 +49,10 @@
|
|
34 |
#include <stdio.h>
|
|
35 |
#include <parted/parted.h>
|
|
36 |
|
|
37 |
+#ifdef __sun
|
|
38 |
+char *program_name = "test";
|
|
39 |
+#endif
|
|
40 |
+
|
|
41 |
int main ()
|
|
42 |
{
|
|
43 |
int min_major ;
|
|
44 |
diff -ru ../gparted-0.4.5/gparted.desktop ./gparted.desktop
|
|
45 |
--- ../gparted-0.4.5/gparted.desktop 2009-05-08 09:05:53.000000000 -0700
|
|
46 |
+++ ./gparted.desktop 2009-06-12 10:44:28.470185000 -0700
|
|
47 |
@@ -58,7 +58,7 @@
|
|
48 |
Comment[zh_CN]=创建、重新组织或删除分区
|
|
49 |
Comment[zh_HK]=建立、編輯或刪除分割區
|
|
50 |
Comment[zh_TW]=建立、編輯或刪除分割區
|
|
51 |
-Exec=gksu /usr/local/sbin/gparted %f
|
|
52 |
+Exec=gksu /usr/sbin/gparted %f
|
|
53 |
Icon=gparted
|
|
54 |
Terminal=false
|
|
55 |
Type=Application
|
|
56 |
diff -ru ../gparted-0.4.5/src/GParted_Core.cc ./src/GParted_Core.cc
|
|
57 |
--- ../gparted-0.4.5/src/GParted_Core.cc 2009-05-02 09:59:49.000000000 -0700
|
|
58 |
+++ ./src/GParted_Core.cc 2009-06-10 15:19:53.573670000 -0700
|
|
59 |
@@ -847,7 +847,11 @@
|
|
60 |
strncpy(magic, buf+0, 6) ; magic[6] = '\0' ; //set and terminate string
|
|
61 |
ped_device_close( lp_device );
|
|
62 |
|
|
63 |
+#ifdef __sun
|
|
64 |
+ if (strncmp("LUKS\xBA\xBE", magic, 6) == 0)
|
|
65 |
+#else
|
|
66 |
if ( Glib::ustring( magic ) == "LUKS\xBA\xBE" )
|
|
67 |
+#endif
|
|
68 |
{
|
|
69 |
temp = _( "Linux Unified Key Setup encryption is not yet supported." ) ;
|
|
70 |
temp += "\n" ;
|
|
71 |
@@ -911,7 +915,16 @@
|
|
72 |
ped_geometry_read( & lp_partition ->geom, buf, 128, 1 ) ;
|
|
73 |
ped_device_close( lp_device );
|
|
74 |
|
|
75 |
+#ifdef __sun
|
|
76 |
+ /*
|
|
77 |
+ * On Solaris, the Glib::ustring causes this message:
|
|
78 |
+ * GLib-CRITICAL **: file gconvert.c:
|
|
79 |
+ * line 734: assertion `str != NULL' failed
|
|
80 |
+ */
|
|
81 |
+ if (strncmp("ReIsEr4", buf, 7) == 0)
|
|
82 |
+#else
|
|
83 |
if ( Glib::ustring( buf ) == "ReIsEr4" )
|
|
84 |
+#endif
|
|
85 |
return GParted::FS_REISER4 ;
|
|
86 |
|
|
87 |
//lvm2
|
|
88 |
@@ -925,8 +938,13 @@
|
|
89 |
strncpy(magic2, buf+24, 4) ; magic2[4] = '\0' ; //set and terminate string
|
|
90 |
ped_device_close( lp_device );
|
|
91 |
|
|
92 |
+#ifdef __sun
|
|
93 |
+ if (strncmp("LABELONE", magic1, 8) == 0
|
|
94 |
+ && strncmp("LVM2", magic2, 4) == 0)
|
|
95 |
+#else
|
|
96 |
if ( Glib::ustring( magic1 ) == "LABELONE"
|
|
97 |
&& Glib::ustring( magic2 ) == "LVM2" )
|
|
98 |
+#endif
|
|
99 |
{
|
|
100 |
temp = _( "Logical Volume Management is not yet supported." ) ;
|
|
101 |
temp += "\n" ;
|
|
102 |
@@ -949,7 +967,11 @@
|
|
103 |
strncpy(magic, buf_btrfs+64, BTRFS_SIGNATURE .size()) ; magic[BTRFS_SIGNATURE .size()] = '\0' ; //set and terminate string
|
|
104 |
ped_device_close( lp_device ) ;
|
|
105 |
|
|
106 |
+#ifdef __sun
|
|
107 |
+ if (strncmp("_BHRfS_M", magic, 8) == 0)
|
|
108 |
+#else
|
|
109 |
if ( magic == BTRFS_SIGNATURE )
|
|
110 |
+#endif
|
|
111 |
{
|
|
112 |
temp = _( "BTRFS is not yet supported." ) ;
|
|
113 |
temp += "\n" ;
|
|
114 |
diff -ru ../gparted-0.4.5/src/Utils.cc ./src/Utils.cc
|
|
115 |
--- ../gparted-0.4.5/src/Utils.cc 2009-04-19 11:05:13.000000000 -0700
|
|
116 |
+++ ./src/Utils.cc 2009-06-10 15:02:38.660042000 -0700
|
|
117 |
@@ -19,6 +19,7 @@
|
|
118 |
|
|
119 |
#include <sstream>
|
|
120 |
#include <iomanip>
|
|
121 |
+#include <unistd.h>
|
|
122 |
#include <regex.h>
|
|
123 |
#include <locale.h>
|
|
124 |
|
|
125 |
diff -ru ../gparted-0.4.5/src/Win_GParted.cc ./src/Win_GParted.cc
|
|
126 |
--- ../gparted-0.4.5/src/Win_GParted.cc 2009-04-19 11:05:13.000000000 -0700
|
|
127 |
+++ ./src/Win_GParted.cc 2009-06-10 15:04:57.634572000 -0700
|
|
128 |
@@ -1690,9 +1690,14 @@
|
|
129 |
|
|
130 |
*succes = true ;
|
|
131 |
for ( unsigned int t = 0 ; t < selected_partition .get_mountpoints() .size() ; t++ )
|
|
132 |
- if ( std::count( mountpoints .begin(),
|
|
133 |
+ {
|
|
134 |
+ size_t n = 0;
|
|
135 |
+
|
|
136 |
+ std::count( mountpoints .begin(),
|
|
137 |
mountpoints .end(),
|
|
138 |
- selected_partition .get_mountpoints()[ t ] ) <= 1 )
|
|
139 |
+ selected_partition .get_mountpoints()[ t ],
|
|
140 |
+ n );
|
|
141 |
+ if ( n <= 1 )
|
|
142 |
{
|
|
143 |
if ( Utils::execute_command( "umount -v \"" + selected_partition .get_mountpoints()[ t ] + "\"",
|
|
144 |
dummy,
|
|
145 |
@@ -1704,6 +1709,7 @@
|
|
146 |
}
|
|
147 |
else
|
|
148 |
failed_mountpoints .push_back( selected_partition .get_mountpoints()[ t ] ) ;
|
|
149 |
+ }
|
|
150 |
|
|
151 |
|
|
152 |
if ( *succes && failed_mountpoints .size() )
|
|
153 |
diff -ru ../gparted-0.4.5/src/main.cc ./src/main.cc
|
|
154 |
--- ../gparted-0.4.5/src/main.cc 2009-04-18 13:38:05.000000000 -0700
|
|
155 |
+++ ./src/main.cc 2009-06-12 10:38:31.131138000 -0700
|
|
156 |
@@ -20,8 +20,16 @@
|
|
157 |
#include <gtkmm/messagedialog.h>
|
|
158 |
#include <gtkmm/main.h>
|
|
159 |
|
|
160 |
+#ifdef __sun
|
|
161 |
+char *program_name;
|
|
162 |
+#endif
|
|
163 |
+
|
|
164 |
int main( int argc, char *argv[] )
|
|
165 |
{
|
|
166 |
+#ifdef __sun
|
|
167 |
+ program_name = argv[0];
|
|
168 |
+#endif
|
|
169 |
+
|
|
170 |
//initialize thread system
|
|
171 |
Glib::thread_init() ;
|
|
172 |
|