summaryrefslogtreecommitdiff
path: root/legacy/eet/src/bin
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2010-10-07 23:53:16 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2010-10-07 23:53:16 +0000
commit3236d249fc2f2f9308437b590632d48eac874580 (patch)
tree16530de1edfdd137fd5ff90ac60143d244eacfb7 /legacy/eet/src/bin
parent9d9b87b411a1cf8ce9b8c3307a742cc5a06d08bb (diff)
logs don't need trailing newline.
SVN revision: 53177
Diffstat (limited to 'legacy/eet/src/bin')
-rw-r--r--legacy/eet/src/bin/eet_main.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/legacy/eet/src/bin/eet_main.c b/legacy/eet/src/bin/eet_main.c
index 567fb108b9..e55a300d90 100644
--- a/legacy/eet/src/bin/eet_main.c
+++ b/legacy/eet/src/bin/eet_main.c
@@ -52,7 +52,7 @@ do_eet_list(const char * file)
52 ef = eet_open(file, EET_FILE_MODE_READ); 52 ef = eet_open(file, EET_FILE_MODE_READ);
53 if (!ef) 53 if (!ef)
54 { 54 {
55 ERR("cannot open for reading: %s\n", file); 55 ERR("cannot open for reading: %s", file);
56 exit(-1); 56 exit(-1);
57 } 57 }
58 58
@@ -81,27 +81,27 @@ do_eet_extract(const char * file,
81 ef = eet_open(file, EET_FILE_MODE_READ); 81 ef = eet_open(file, EET_FILE_MODE_READ);
82 if (!ef) 82 if (!ef)
83 { 83 {
84 ERR("cannot open for reading: %s\n", file); 84 ERR("cannot open for reading: %s", file);
85 exit(-1); 85 exit(-1);
86 } 86 }
87 87
88 data = eet_read_cipher(ef, key, &size, crypto_key); 88 data = eet_read_cipher(ef, key, &size, crypto_key);
89 if (!data) 89 if (!data)
90 { 90 {
91 ERR("cannot read key %s\n", key); 91 ERR("cannot read key %s", key);
92 exit(-1); 92 exit(-1);
93 } 93 }
94 94
95 f = fopen(out, "wb"); 95 f = fopen(out, "wb");
96 if (!f) 96 if (!f)
97 { 97 {
98 ERR("cannot open %s\n", out); 98 ERR("cannot open %s", out);
99 exit(-1); 99 exit(-1);
100 } 100 }
101 101
102 if (fwrite(data, size, 1, f) != 1) 102 if (fwrite(data, size, 1, f) != 1)
103 { 103 {
104 ERR("cannot write to %s\n", out); 104 ERR("cannot write to %s", out);
105 exit(-1); 105 exit(-1);
106 } 106 }
107 107
@@ -128,20 +128,20 @@ do_eet_decode(const char * file,
128 ef = eet_open(file, EET_FILE_MODE_READ); 128 ef = eet_open(file, EET_FILE_MODE_READ);
129 if (!ef) 129 if (!ef)
130 { 130 {
131 ERR("cannot open for reading: %s\n", file); 131 ERR("cannot open for reading: %s", file);
132 exit(-1); 132 exit(-1);
133 } 133 }
134 134
135 f = fopen(out, "wb"); 135 f = fopen(out, "wb");
136 if (!f) 136 if (!f)
137 { 137 {
138 ERR("cannot open %s\n", out); 138 ERR("cannot open %s", out);
139 exit(-1); 139 exit(-1);
140 } 140 }
141 141
142 if (!eet_data_dump_cipher(ef, key, crypto_key, do_eet_decode_dump, f)) 142 if (!eet_data_dump_cipher(ef, key, crypto_key, do_eet_decode_dump, f))
143 { 143 {
144 ERR("cannot write to %s\n", out); 144 ERR("cannot write to %s", out);
145 exit(-1); 145 exit(-1);
146 } 146 }
147 147
@@ -167,14 +167,14 @@ do_eet_insert(const char * file,
167 167
168 if (!ef) 168 if (!ef)
169 { 169 {
170 ERR("cannot open for read+write: %s\n", file); 170 ERR("cannot open for read+write: %s", file);
171 exit(-1); 171 exit(-1);
172 } 172 }
173 173
174 f = fopen(out, "rb"); 174 f = fopen(out, "rb");
175 if (!f) 175 if (!f)
176 { 176 {
177 ERR("cannot open %s\n", out); 177 ERR("cannot open %s", out);
178 exit(-1); 178 exit(-1);
179 } 179 }
180 180
@@ -184,13 +184,13 @@ do_eet_insert(const char * file,
184 data = malloc(size); 184 data = malloc(size);
185 if (!data) 185 if (!data)
186 { 186 {
187 ERR("cannot allocate %i bytes\n", size); 187 ERR("cannot allocate %i bytes", size);
188 exit(-1); 188 exit(-1);
189 } 189 }
190 190
191 if (fread(data, size, 1, f) != 1) 191 if (fread(data, size, 1, f) != 1)
192 { 192 {
193 ERR("cannot read file %s\n", out); 193 ERR("cannot read file %s", out);
194 exit(-1); 194 exit(-1);
195 } 195 }
196 196
@@ -219,14 +219,14 @@ do_eet_encode(const char * file,
219 219
220 if (!ef) 220 if (!ef)
221 { 221 {
222 ERR("cannot open for read+write: %s\n", file); 222 ERR("cannot open for read+write: %s", file);
223 exit(-1); 223 exit(-1);
224 } 224 }
225 225
226 f = fopen(out, "rb"); 226 f = fopen(out, "rb");
227 if (!f) 227 if (!f)
228 { 228 {
229 ERR("cannot open %s\n", out); 229 ERR("cannot open %s", out);
230 exit(-1); 230 exit(-1);
231 } 231 }
232 232
@@ -236,20 +236,20 @@ do_eet_encode(const char * file,
236 text = malloc(textlen); 236 text = malloc(textlen);
237 if (!text) 237 if (!text)
238 { 238 {
239 ERR("cannot allocate %i bytes\n", size); 239 ERR("cannot allocate %i bytes", size);
240 exit(-1); 240 exit(-1);
241 } 241 }
242 242
243 if (fread(text, textlen, 1, f) != 1) 243 if (fread(text, textlen, 1, f) != 1)
244 { 244 {
245 ERR("cannot read file %s\n", out); 245 ERR("cannot read file %s", out);
246 exit(-1); 246 exit(-1);
247 } 247 }
248 248
249 fclose(f); 249 fclose(f);
250 if (!eet_data_undump_cipher(ef, key, crypto_key, text, textlen, compress)) 250 if (!eet_data_undump_cipher(ef, key, crypto_key, text, textlen, compress))
251 { 251 {
252 ERR("cannot parse %s\n", out); 252 ERR("cannot parse %s", out);
253 exit(-1); 253 exit(-1);
254 } 254 }
255 255
@@ -265,7 +265,7 @@ do_eet_remove(const char * file, const char * key)
265 ef = eet_open(file, EET_FILE_MODE_READ_WRITE); 265 ef = eet_open(file, EET_FILE_MODE_READ_WRITE);
266 if (!ef) 266 if (!ef)
267 { 267 {
268 ERR("cannot open for read+write: %s\n", file); 268 ERR("cannot open for read+write: %s", file);
269 exit(-1); 269 exit(-1);
270 } 270 }
271 271
@@ -284,7 +284,7 @@ do_eet_check(const char * file)
284 ef = eet_open(file, EET_FILE_MODE_READ); 284 ef = eet_open(file, EET_FILE_MODE_READ);
285 if (!ef) 285 if (!ef)
286 { 286 {
287 ERR("checking signature of `%s` failed\n", file); 287 ERR("checking signature of `%s` failed", file);
288 exit(-1); 288 exit(-1);
289 } 289 }
290 290
@@ -308,14 +308,14 @@ do_eet_sign(const char * file, const char * private_key, const char * public_key
308 ef = eet_open(file, EET_FILE_MODE_READ_WRITE); 308 ef = eet_open(file, EET_FILE_MODE_READ_WRITE);
309 if (!ef) 309 if (!ef)
310 { 310 {
311 ERR("cannot open for read+write: %s.\n", file); 311 ERR("cannot open for read+write: %s.", file);
312 exit(-1); 312 exit(-1);
313 } 313 }
314 314
315 key = eet_identity_open(public_key, private_key, NULL); 315 key = eet_identity_open(public_key, private_key, NULL);
316 if (!key) 316 if (!key)
317 { 317 {
318 ERR("cannot open key '%s:%s'.\n", public_key, private_key); 318 ERR("cannot open key '%s:%s'.", public_key, private_key);
319 exit(-1); 319 exit(-1);
320 } 320 }
321 321
@@ -336,7 +336,7 @@ main(int argc, char ** argv)
336 _eet_main_log_dom = eina_log_domain_register("eet_main", EINA_COLOR_CYAN); 336 _eet_main_log_dom = eina_log_domain_register("eet_main", EINA_COLOR_CYAN);
337 if(_eet_main_log_dom < -1) 337 if(_eet_main_log_dom < -1)
338 { 338 {
339 EINA_LOG_ERR("Impossible to create a log domain for eet_main.\n"); 339 EINA_LOG_ERR("Impossible to create a log domain for eet_main.");
340 eet_shutdown(); 340 eet_shutdown();
341 return(-1); 341 return(-1);
342 } 342 }