summaryrefslogtreecommitdiff
path: root/src/bin/eet
diff options
context:
space:
mode:
authorAndrii Kroitor <an.kroitor@samsung.com>2015-03-26 02:55:40 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-03-26 02:57:09 +0900
commit72dae98be8e5763ba0c846e5c54740c498a54259 (patch)
tree703c201daaef17122c5d31596bae4a6e23af1895 /src/bin/eet
parent3e2b104cabc1c50ec422faf7430f8b0d38301517 (diff)
eet: fix variable naming
Summary: this file name is used for input, not for output. Reviewers: cedric, seoz, Hermet, raster Subscribers: cedric, reutskiy.v.v Differential Revision: https://phab.enlightenment.org/D2243
Diffstat (limited to 'src/bin/eet')
-rw-r--r--src/bin/eet/eet_main.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/bin/eet/eet_main.c b/src/bin/eet/eet_main.c
index dc493ef..5036d04 100644
--- a/src/bin/eet/eet_main.c
+++ b/src/bin/eet/eet_main.c
@@ -241,7 +241,7 @@ do_eet_decode(const char *file,
241static void 241static void
242do_eet_insert(const char *file, 242do_eet_insert(const char *file,
243 const char *key, 243 const char *key,
244 const char *out, 244 const char *in,
245 int compress, 245 int compress,
246 const char *crypto_key) 246 const char *crypto_key)
247{ 247{
@@ -260,10 +260,10 @@ do_eet_insert(const char *file,
260 exit(-1); 260 exit(-1);
261 } 261 }
262 262
263 f = fopen(out, "rb"); 263 f = fopen(in, "rb");
264 if (!f) 264 if (!f)
265 { 265 {
266 ERR("cannot open %s", out); 266 ERR("cannot open %s", in);
267 exit(-1); 267 exit(-1);
268 } 268 }
269 269
@@ -271,7 +271,7 @@ do_eet_insert(const char *file,
271 size = ftell(f); 271 size = ftell(f);
272 if (size < 0) 272 if (size < 0)
273 { 273 {
274 ERR("cannot obtain current file position %s", out); 274 ERR("cannot obtain current file position %s", in);
275 fclose(f); 275 fclose(f);
276 exit(-1); 276 exit(-1);
277 } 277 }
@@ -286,7 +286,7 @@ do_eet_insert(const char *file,
286 286
287 if (fread(data, size, 1, f) != 1) 287 if (fread(data, size, 1, f) != 1)
288 { 288 {
289 ERR("cannot read file %s", out); 289 ERR("cannot read file %s", in);
290 exit(-1); 290 exit(-1);
291 } 291 }
292 292
@@ -299,7 +299,7 @@ do_eet_insert(const char *file,
299static void 299static void
300do_eet_encode(const char *file, 300do_eet_encode(const char *file,
301 const char *key, 301 const char *key,
302 const char *out, 302 const char *in,
303 int compress, 303 int compress,
304 const char *crypto_key) 304 const char *crypto_key)
305{ 305{
@@ -319,10 +319,10 @@ do_eet_encode(const char *file,
319 exit(-1); 319 exit(-1);
320 } 320 }
321 321
322 f = fopen(out, "rb"); 322 f = fopen(in, "rb");
323 if (!f) 323 if (!f)
324 { 324 {
325 ERR("cannot open %s", out); 325 ERR("cannot open %s", in);
326 exit(-1); 326 exit(-1);
327 } 327 }
328 328
@@ -330,7 +330,7 @@ do_eet_encode(const char *file,
330 textlen = ftell(f); 330 textlen = ftell(f);
331 if (textlen < 0) 331 if (textlen < 0)
332 { 332 {
333 ERR("cannot obtain current file position %s", out); 333 ERR("cannot obtain current file position %s", in);
334 fclose(f); 334 fclose(f);
335 exit(-1); 335 exit(-1);
336 } 336 }
@@ -345,14 +345,14 @@ do_eet_encode(const char *file,
345 345
346 if (fread(text, textlen, 1, f) != 1) 346 if (fread(text, textlen, 1, f) != 1)
347 { 347 {
348 ERR("cannot read file %s", out); 348 ERR("cannot read file %s", in);
349 exit(-1); 349 exit(-1);
350 } 350 }
351 351
352 fclose(f); 352 fclose(f);
353 if (!eet_data_undump_cipher(ef, key, crypto_key, text, textlen, compress)) 353 if (!eet_data_undump_cipher(ef, key, crypto_key, text, textlen, compress))
354 { 354 {
355 ERR("cannot parse %s", out); 355 ERR("cannot parse %s", in);
356 exit(-1); 356 exit(-1);
357 } 357 }
358 358