author | yippi |
Mon, 27 Sep 2010 21:07:51 +0000 | |
changeset 20108 | 51df67ca9307 |
parent 16839 | 24440eb39119 |
child 21756 | e0295789e7aa |
permissions | -rw-r--r-- |
16794
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
1 |
diff -ru /home/ml40262/gparted/gparted-0.4.5/compose/ucompose.hpp ./compose/ucompose.hpp |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
2 |
--- /home/ml40262/gparted/gparted-0.4.5/compose/ucompose.hpp 2009-04-18 13:38:05.000000000 -0700 |
16839
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
3 |
+++ ./compose/ucompose.hpp 2009-10-16 15:33:54.265337000 -0700 |
16560 | 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 |
|
16794
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
16 |
diff -ru /home/ml40262/gparted/gparted-0.4.5/configure ./configure |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
17 |
--- /home/ml40262/gparted/gparted-0.4.5/configure 2009-05-08 09:05:43.000000000 -0700 |
16839
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
18 |
+++ ./configure 2009-10-16 15:33:54.304150000 -0700 |
16560 | 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 ; |
|
16794
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
30 |
diff -ru /home/ml40262/gparted/gparted-0.4.5/configure.in ./configure.in |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
31 |
--- /home/ml40262/gparted/gparted-0.4.5/configure.in 2009-05-08 08:50:41.000000000 -0700 |
16839
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
32 |
+++ ./configure.in 2009-10-16 15:33:54.313587000 -0700 |
16560 | 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 ; |
|
16794
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
44 |
diff -ru /home/ml40262/gparted/gparted-0.4.5/gparted.desktop ./gparted.desktop |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
45 |
--- /home/ml40262/gparted/gparted-0.4.5/gparted.desktop 2009-05-08 09:05:53.000000000 -0700 |
16839
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
46 |
+++ ./gparted.desktop 2009-10-16 15:36:22.402991000 -0700 |
16560 | 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 |
|
16839
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
56 |
diff -ru /home/ml40262/gparted/gparted-0.4.5/include/Utils.h ./include/Utils.h |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
57 |
--- /home/ml40262/gparted/gparted-0.4.5/include/Utils.h 2009-04-19 11:05:13.000000000 -0700 |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
58 |
+++ ./include/Utils.h 2009-10-21 13:40:34.747259000 -0700 |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
59 |
@@ -71,7 +71,8 @@ |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
60 |
|
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
61 |
FS_BTRFS = 20, /* FIXME: Move this higher up list when full support added */ |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
62 |
FS_LVM2 = 21, |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
63 |
- FS_LUKS = 22 |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
64 |
+ FS_LUKS = 22, |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
65 |
+ FS_SOLARIS = 23 |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
66 |
} ; |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
67 |
|
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
68 |
enum SIZE_UNIT |
16794
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
69 |
diff -ru /home/ml40262/gparted/gparted-0.4.5/src/GParted_Core.cc ./src/GParted_Core.cc |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
70 |
--- /home/ml40262/gparted/gparted-0.4.5/src/GParted_Core.cc 2009-05-02 09:59:49.000000000 -0700 |
16839
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
71 |
+++ ./src/GParted_Core.cc 2009-10-21 15:10:07.784757000 -0700 |
16560 | 72 |
@@ -847,7 +847,11 @@ |
73 |
strncpy(magic, buf+0, 6) ; magic[6] = '\0' ; //set and terminate string |
|
74 |
ped_device_close( lp_device ); |
|
75 |
||
76 |
+#ifdef __sun |
|
77 |
+ if (strncmp("LUKS\xBA\xBE", magic, 6) == 0) |
|
78 |
+#else |
|
79 |
if ( Glib::ustring( magic ) == "LUKS\xBA\xBE" ) |
|
80 |
+#endif |
|
81 |
{ |
|
82 |
temp = _( "Linux Unified Key Setup encryption is not yet supported." ) ; |
|
83 |
temp += "\n" ; |
|
16839
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
84 |
@@ -900,6 +904,8 @@ |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
85 |
return GParted::FS_HFSPLUS ; |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
86 |
else if ( Glib::ustring( lp_partition ->fs_type ->name ) == "ufs" ) |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
87 |
return GParted::FS_UFS ; |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
88 |
+ else if ( Glib::ustring( lp_partition ->fs_type ->name ) == "solaris" ) |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
89 |
+ return GParted::FS_SOLARIS ; |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
90 |
} |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
91 |
|
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
92 |
|
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
93 |
@@ -911,7 +917,16 @@ |
16560 | 94 |
ped_geometry_read( & lp_partition ->geom, buf, 128, 1 ) ; |
95 |
ped_device_close( lp_device ); |
|
96 |
||
97 |
+#ifdef __sun |
|
98 |
+ /* |
|
99 |
+ * On Solaris, the Glib::ustring causes this message: |
|
100 |
+ * GLib-CRITICAL **: file gconvert.c: |
|
101 |
+ * line 734: assertion `str != NULL' failed |
|
102 |
+ */ |
|
103 |
+ if (strncmp("ReIsEr4", buf, 7) == 0) |
|
104 |
+#else |
|
105 |
if ( Glib::ustring( buf ) == "ReIsEr4" ) |
|
106 |
+#endif |
|
107 |
return GParted::FS_REISER4 ; |
|
108 |
||
109 |
//lvm2 |
|
16839
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
110 |
@@ -925,8 +940,13 @@ |
16560 | 111 |
strncpy(magic2, buf+24, 4) ; magic2[4] = '\0' ; //set and terminate string |
112 |
ped_device_close( lp_device ); |
|
113 |
||
114 |
+#ifdef __sun |
|
115 |
+ if (strncmp("LABELONE", magic1, 8) == 0 |
|
116 |
+ && strncmp("LVM2", magic2, 4) == 0) |
|
117 |
+#else |
|
118 |
if ( Glib::ustring( magic1 ) == "LABELONE" |
|
119 |
&& Glib::ustring( magic2 ) == "LVM2" ) |
|
120 |
+#endif |
|
121 |
{ |
|
122 |
temp = _( "Logical Volume Management is not yet supported." ) ; |
|
123 |
temp += "\n" ; |
|
16839
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
124 |
@@ -949,7 +969,11 @@ |
16560 | 125 |
strncpy(magic, buf_btrfs+64, BTRFS_SIGNATURE .size()) ; magic[BTRFS_SIGNATURE .size()] = '\0' ; //set and terminate string |
126 |
ped_device_close( lp_device ) ; |
|
127 |
||
128 |
+#ifdef __sun |
|
129 |
+ if (strncmp("_BHRfS_M", magic, 8) == 0) |
|
130 |
+#else |
|
131 |
if ( magic == BTRFS_SIGNATURE ) |
|
132 |
+#endif |
|
133 |
{ |
|
134 |
temp = _( "BTRFS is not yet supported." ) ; |
|
135 |
temp += "\n" ; |
|
16794
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
136 |
diff -ru /home/ml40262/gparted/gparted-0.4.5/src/Utils.cc ./src/Utils.cc |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
137 |
--- /home/ml40262/gparted/gparted-0.4.5/src/Utils.cc 2009-04-19 11:05:13.000000000 -0700 |
16839
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
138 |
+++ ./src/Utils.cc 2009-10-21 14:20:52.259713000 -0700 |
16560 | 139 |
@@ -19,6 +19,7 @@ |
140 |
||
141 |
#include <sstream> |
|
142 |
#include <iomanip> |
|
143 |
+#include <unistd.h> |
|
144 |
#include <regex.h> |
|
145 |
#include <locale.h> |
|
146 |
||
16839
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
147 |
@@ -87,6 +88,7 @@ |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
148 |
case FS_HFS : return "#E0B6AF" ; //red hilight |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
149 |
case FS_HFSPLUS : return "#C0A39E" ; // ~ serene red |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
150 |
case FS_UFS : return "#D1940C" ; //accent yellow dark |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
151 |
+ case FS_SOLARIS : return "#9933FF" ; //sun purple |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
152 |
case FS_USED : return "#F8F8BA" ; // ~ light tan yellow |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
153 |
case FS_UNUSED : return "#FFFFFF" ; //white |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
154 |
case FS_LVM2 : return "#CC9966" ; // ~ medium brown |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
155 |
@@ -135,6 +137,7 @@ |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
156 |
case FS_HFS : return "hfs" ; |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
157 |
case FS_HFSPLUS : return "hfs+" ; |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
158 |
case FS_UFS : return "ufs" ; |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
159 |
+ case FS_SOLARIS : return "solaris" ; |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
160 |
case FS_USED : return _("used") ; |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
161 |
case FS_UNUSED : return _("unused") ; |
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
162 |
case FS_LVM2 : return "lvm2" ; |
16794
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
163 |
diff -ru /home/ml40262/gparted/gparted-0.4.5/src/Win_GParted.cc ./src/Win_GParted.cc |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
164 |
--- /home/ml40262/gparted/gparted-0.4.5/src/Win_GParted.cc 2009-04-19 11:05:13.000000000 -0700 |
16839
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
165 |
+++ ./src/Win_GParted.cc 2009-10-16 15:33:54.349055000 -0700 |
16560 | 166 |
@@ -1690,9 +1690,14 @@ |
167 |
||
168 |
*succes = true ; |
|
169 |
for ( unsigned int t = 0 ; t < selected_partition .get_mountpoints() .size() ; t++ ) |
|
170 |
- if ( std::count( mountpoints .begin(), |
|
171 |
+ { |
|
172 |
+ size_t n = 0; |
|
173 |
+ |
|
174 |
+ std::count( mountpoints .begin(), |
|
175 |
mountpoints .end(), |
|
176 |
- selected_partition .get_mountpoints()[ t ] ) <= 1 ) |
|
177 |
+ selected_partition .get_mountpoints()[ t ], |
|
178 |
+ n ); |
|
179 |
+ if ( n <= 1 ) |
|
180 |
{ |
|
181 |
if ( Utils::execute_command( "umount -v \"" + selected_partition .get_mountpoints()[ t ] + "\"", |
|
182 |
dummy, |
|
183 |
@@ -1704,6 +1709,7 @@ |
|
184 |
} |
|
185 |
else |
|
186 |
failed_mountpoints .push_back( selected_partition .get_mountpoints()[ t ] ) ; |
|
187 |
+ } |
|
188 |
||
189 |
||
190 |
if ( *succes && failed_mountpoints .size() ) |
|
16794
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
191 |
diff -ru /home/ml40262/gparted/gparted-0.4.5/src/ext2.cc ./src/ext2.cc |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
192 |
--- /home/ml40262/gparted/gparted-0.4.5/src/ext2.cc 2009-04-18 13:38:05.000000000 -0700 |
16839
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
193 |
+++ ./src/ext2.cc 2009-10-16 15:33:54.360072000 -0700 |
16794
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
194 |
@@ -62,12 +62,12 @@ |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
195 |
{ |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
196 |
index = output .find( "Free blocks:" ) ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
197 |
if ( index >= output .length() || |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
198 |
- sscanf( output.substr( index ) .c_str(), "Free blocks: %Ld", &N ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
199 |
+ sscanf( output.substr( index ) .c_str(), "Free blocks: %lld", &N ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
200 |
N = -1 ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
201 |
|
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
202 |
index = output .find( "Block size:" ) ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
203 |
if ( index >= output.length() || |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
204 |
- sscanf( output.substr( index ) .c_str(), "Block size: %Ld", &S ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
205 |
+ sscanf( output.substr( index ) .c_str(), "Block size: %lld", &S ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
206 |
S = -1 ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
207 |
|
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
208 |
if ( N > -1 && S > -1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
209 |
diff -ru /home/ml40262/gparted/gparted-0.4.5/src/ext3.cc ./src/ext3.cc |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
210 |
--- /home/ml40262/gparted/gparted-0.4.5/src/ext3.cc 2009-04-18 13:38:05.000000000 -0700 |
16839
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
211 |
+++ ./src/ext3.cc 2009-10-16 15:33:54.368076000 -0700 |
16794
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
212 |
@@ -63,12 +63,12 @@ |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
213 |
{ |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
214 |
index = output .find( "Free blocks:" ) ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
215 |
if ( index >= output .length() || |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
216 |
- sscanf( output.substr( index ) .c_str(), "Free blocks: %Ld", &N ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
217 |
+ sscanf( output.substr( index ) .c_str(), "Free blocks: %lld", &N ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
218 |
N = -1 ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
219 |
|
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
220 |
index = output .find( "Block size:" ) ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
221 |
if ( index >= output.length() || |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
222 |
- sscanf( output.substr( index ) .c_str(), "Block size: %Ld", &S ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
223 |
+ sscanf( output.substr( index ) .c_str(), "Block size: %lld", &S ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
224 |
S = -1 ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
225 |
|
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
226 |
if ( N > -1 && S > -1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
227 |
diff -ru /home/ml40262/gparted/gparted-0.4.5/src/ext4.cc ./src/ext4.cc |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
228 |
--- /home/ml40262/gparted/gparted-0.4.5/src/ext4.cc 2009-04-19 11:05:13.000000000 -0700 |
16839
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
229 |
+++ ./src/ext4.cc 2009-10-16 15:33:54.375586000 -0700 |
16794
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
230 |
@@ -67,12 +67,12 @@ |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
231 |
{ |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
232 |
index = output .find( "Free blocks:" ) ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
233 |
if ( index >= output .length() || |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
234 |
- sscanf( output.substr( index ) .c_str(), "Free blocks: %Ld", &N ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
235 |
+ sscanf( output.substr( index ) .c_str(), "Free blocks: %lld", &N ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
236 |
N = -1 ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
237 |
|
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
238 |
index = output .find( "Block size:" ) ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
239 |
if ( index >= output.length() || |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
240 |
- sscanf( output.substr( index ) .c_str(), "Block size: %Ld", &S ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
241 |
+ sscanf( output.substr( index ) .c_str(), "Block size: %lld", &S ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
242 |
S = -1 ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
243 |
|
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
244 |
if ( N > -1 && S > -1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
245 |
diff -ru /home/ml40262/gparted/gparted-0.4.5/src/fat16.cc ./src/fat16.cc |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
246 |
--- /home/ml40262/gparted/gparted-0.4.5/src/fat16.cc 2009-04-18 13:38:05.000000000 -0700 |
16839
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
247 |
+++ ./src/fat16.cc 2009-10-16 15:33:54.382437000 -0700 |
16794
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
248 |
@@ -68,14 +68,14 @@ |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
249 |
{ |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
250 |
//free clusters |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
251 |
index = output .find( ",", output .find( partition .get_path() ) + partition .get_path() .length() ) +1 ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
252 |
- if ( index < output .length() && sscanf( output .substr( index ) .c_str(), "%Ld/%Ld", &S, &N ) == 2 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
253 |
+ if ( index < output .length() && sscanf( output .substr( index ) .c_str(), "%lld/%lld", &S, &N ) == 2 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
254 |
N -= S ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
255 |
else |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
256 |
N = -1 ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
257 |
|
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
258 |
//bytes per cluster |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
259 |
index = output .rfind( "\n", output .find( "bytes per cluster" ) ) +1 ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
260 |
- if ( index >= output .length() || sscanf( output .substr( index ) .c_str(), "%Ld", &S ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
261 |
+ if ( index >= output .length() || sscanf( output .substr( index ) .c_str(), "%lld", &S ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
262 |
S = -1 ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
263 |
|
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
264 |
if ( N > -1 && S > -1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
265 |
diff -ru /home/ml40262/gparted/gparted-0.4.5/src/fat32.cc ./src/fat32.cc |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
266 |
--- /home/ml40262/gparted/gparted-0.4.5/src/fat32.cc 2009-04-18 13:38:05.000000000 -0700 |
16839
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
267 |
+++ ./src/fat32.cc 2009-10-16 15:33:54.389232000 -0700 |
16794
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
268 |
@@ -68,14 +68,14 @@ |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
269 |
{ |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
270 |
//free clusters |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
271 |
index = output .find( ",", output .find( partition .get_path() ) + partition .get_path() .length() ) +1 ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
272 |
- if ( index < output .length() && sscanf( output .substr( index ) .c_str(), "%Ld/%Ld", &S, &N ) == 2 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
273 |
+ if ( index < output .length() && sscanf( output .substr( index ) .c_str(), "%lld/%lld", &S, &N ) == 2 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
274 |
N -= S ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
275 |
else |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
276 |
N = -1 ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
277 |
|
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
278 |
//bytes per cluster |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
279 |
index = output .rfind( "\n", output .find( "bytes per cluster" ) ) +1 ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
280 |
- if ( index >= output .length() || sscanf( output .substr( index ) .c_str(), "%Ld", &S ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
281 |
+ if ( index >= output .length() || sscanf( output .substr( index ) .c_str(), "%lld", &S ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
282 |
S = -1 ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
283 |
|
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
284 |
if ( N > -1 && S > -1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
285 |
diff -ru /home/ml40262/gparted/gparted-0.4.5/src/jfs.cc ./src/jfs.cc |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
286 |
--- /home/ml40262/gparted/gparted-0.4.5/src/jfs.cc 2009-04-18 13:38:05.000000000 -0700 |
16839
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
287 |
+++ ./src/jfs.cc 2009-10-16 15:33:54.396315000 -0700 |
16794
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
288 |
@@ -82,13 +82,13 @@ |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
289 |
//blocksize |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
290 |
index = output .find( "Block Size:" ) ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
291 |
if ( index >= output .length() || |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
292 |
- sscanf( output .substr( index ) .c_str(), "Block Size: %Ld", &S ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
293 |
+ sscanf( output .substr( index ) .c_str(), "Block Size: %lld", &S ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
294 |
S = -1 ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
295 |
|
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
296 |
//free blocks |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
297 |
index = output .find( "dn_nfree:" ) ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
298 |
if ( index >= output .length() || |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
299 |
- sscanf( output .substr( index ) .c_str(), "dn_nfree: %Lx", &N ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
300 |
+ sscanf( output .substr( index ) .c_str(), "dn_nfree: %llx", &N ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
301 |
N = -1 ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
302 |
|
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
303 |
if ( S > -1 && N > -1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
304 |
diff -ru /home/ml40262/gparted/gparted-0.4.5/src/main.cc ./src/main.cc |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
305 |
--- /home/ml40262/gparted/gparted-0.4.5/src/main.cc 2009-04-18 13:38:05.000000000 -0700 |
16839
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
306 |
+++ ./src/main.cc 2009-10-16 15:33:54.403171000 -0700 |
16560 | 307 |
@@ -20,8 +20,16 @@ |
308 |
#include <gtkmm/messagedialog.h> |
|
309 |
#include <gtkmm/main.h> |
|
310 |
||
311 |
+#ifdef __sun |
|
312 |
+char *program_name; |
|
313 |
+#endif |
|
314 |
+ |
|
315 |
int main( int argc, char *argv[] ) |
|
316 |
{ |
|
317 |
+#ifdef __sun |
|
318 |
+ program_name = argv[0]; |
|
319 |
+#endif |
|
320 |
+ |
|
321 |
//initialize thread system |
|
322 |
Glib::thread_init() ; |
|
323 |
||
16794
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
324 |
diff -ru /home/ml40262/gparted/gparted-0.4.5/src/ntfs.cc ./src/ntfs.cc |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
325 |
--- /home/ml40262/gparted/gparted-0.4.5/src/ntfs.cc 2009-04-19 11:05:13.000000000 -0700 |
16839
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
326 |
+++ ./src/ntfs.cc 2009-10-16 15:33:54.410077000 -0700 |
16794
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
327 |
@@ -66,9 +66,8 @@ |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
328 |
{ |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
329 |
index = output .find( "resize at" ) ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
330 |
if ( index >= output .length() || |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
331 |
- sscanf( output .substr( index ) .c_str(), "resize at %Ld", &N ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
332 |
+ sscanf( output .substr( index ) .c_str(), "resize at %lld", &N ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
333 |
N = -1 ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
334 |
- |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
335 |
if ( N > -1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
336 |
partition .set_used( Utils::round( N / 512.0 ) ) ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
337 |
} |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
338 |
diff -ru /home/ml40262/gparted/gparted-0.4.5/src/reiser4.cc ./src/reiser4.cc |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
339 |
--- /home/ml40262/gparted/gparted-0.4.5/src/reiser4.cc 2009-04-18 13:38:05.000000000 -0700 |
16839
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
340 |
+++ ./src/reiser4.cc 2009-10-16 15:33:54.416591000 -0700 |
16794
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
341 |
@@ -59,12 +59,12 @@ |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
342 |
{ |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
343 |
index = output .find( "free blocks" ) ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
344 |
if ( index >= output .length() || |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
345 |
- sscanf( output.substr( index ) .c_str(), "free blocks: %Ld", &N ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
346 |
+ sscanf( output.substr( index ) .c_str(), "free blocks: %lld", &N ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
347 |
N = -1 ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
348 |
|
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
349 |
index = output .find( "blksize" ) ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
350 |
if ( index >= output.length() || |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
351 |
- sscanf( output.substr( index ) .c_str(), "blksize: %Ld", &S ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
352 |
+ sscanf( output.substr( index ) .c_str(), "blksize: %lld", &S ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
353 |
S = -1 ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
354 |
|
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
355 |
if ( N > -1 && S > -1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
356 |
diff -ru /home/ml40262/gparted/gparted-0.4.5/src/reiserfs.cc ./src/reiserfs.cc |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
357 |
--- /home/ml40262/gparted/gparted-0.4.5/src/reiserfs.cc 2009-04-18 13:38:05.000000000 -0700 |
16839
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
358 |
+++ ./src/reiserfs.cc 2009-10-16 15:33:54.423380000 -0700 |
16794
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
359 |
@@ -67,12 +67,12 @@ |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
360 |
{ |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
361 |
index = output .find( "Blocksize" ) ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
362 |
if ( index >= output .length() || |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
363 |
- sscanf( output .substr( index ) .c_str(), "Blocksize: %Ld", &S ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
364 |
+ sscanf( output .substr( index ) .c_str(), "Blocksize: %lld", &S ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
365 |
S = -1 ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
366 |
|
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
367 |
index = output .find( ":", output .find( "Free blocks" ) ) +1 ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
368 |
if ( index >= output .length() || |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
369 |
- sscanf( output .substr( index ) .c_str(), "%Ld", &N ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
370 |
+ sscanf( output .substr( index ) .c_str(), "%lld", &N ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
371 |
N = -1 ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
372 |
|
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
373 |
if ( N > -1 && S > -1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
374 |
diff -ru /home/ml40262/gparted/gparted-0.4.5/src/xfs.cc ./src/xfs.cc |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
375 |
--- /home/ml40262/gparted/gparted-0.4.5/src/xfs.cc 2009-04-18 13:38:05.000000000 -0700 |
16839
24440eb39119
Bugzilla 12065 - GParted should recognize Solaris partitions
marklo
parents:
16794
diff
changeset
|
376 |
+++ ./src/xfs.cc 2009-10-16 15:33:54.431044000 -0700 |
16794
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
377 |
@@ -85,13 +85,13 @@ |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
378 |
true ) ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
379 |
{ |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
380 |
//blocksize |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
381 |
- if ( sscanf( output .c_str(), "blocksize = %Ld", &S ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
382 |
+ if ( sscanf( output .c_str(), "blocksize = %lld", &S ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
383 |
S = -1 ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
384 |
|
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
385 |
//free blocks |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
386 |
index = output .find( "fdblocks" ) ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
387 |
if ( index > output .length() || |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
388 |
- sscanf( output .substr( index ) .c_str(), "fdblocks = %Ld", &N ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
389 |
+ sscanf( output .substr( index ) .c_str(), "fdblocks = %lld", &N ) != 1 ) |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
390 |
N = -1 ; |
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
391 |
|
4ca993a3ff31
GNUC supports %Ld in sscanf, but SUNWspro requires %lld
marklo
parents:
16560
diff
changeset
|
392 |
if ( N > -1 && S > -1 ) |