Skip to content

Commit

Permalink
minor API cleanup around hidden/hidden_size_bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
bwalex committed Jan 20, 2014
1 parent d2b3cf2 commit 4f72e29
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 1 addition & 4 deletions tcplay_api.c
Expand Up @@ -234,9 +234,6 @@ tc_api_task_set(tc_api_task task, const char *key, ...)
} else if (_match(key, "weak_keys_and_salt")) {
i = va_arg(ap, int);
opts->weak_keys_and_salt = i;
} else if (_match(key, "hidden")) {
i = va_arg(ap, int);
opts->hidden = i;
} else if (_match(key, "secure_erase")) {
i = va_arg(ap, int);
opts->secure_erase = i;
Expand Down Expand Up @@ -264,6 +261,7 @@ tc_api_task_set(tc_api_task task, const char *key, ...)
} else if (_match(key, "hidden_size_bytes")) {
i64 = va_arg(ap, int64_t);
opts->hidden_size_bytes = (disksz_t)i64;
opts->hidden = (i64 > 0);
} else if (_match(key, "retries")) {
i = va_arg(ap, int);
opts->retries = i;
Expand Down Expand Up @@ -420,7 +418,6 @@ tc_api_task_set(tc_api_task task, const char *key, ...)
} else if (_match(key, "state_change_fn")) {
sc_fn = va_arg(ap, tc_api_state_change_fn);
opts->state_change_fn = sc_fn;
} else if (_match(key, "ctx")) {
vp = va_arg(ap, void *);
opts->api_ctx = vp;
} else {
Expand Down
2 changes: 0 additions & 2 deletions test/features/step_definitions/libtcplay_steps.rb
Expand Up @@ -84,8 +84,6 @@
end

if ParseHelper.is_yes(s['create_hidden'])
r = TCplayLib.tc_api_task_set(task, "hidden", :int, 1)
r.should == TCplayLib::TC_OK
r = TCplayLib.tc_api_task_set(task, "hidden_size_bytes", :int64,
1024*1024*s['hidden_mb'].to_i)
r.should == TCplayLib::TC_OK
Expand Down

0 comments on commit 4f72e29

Please sign in to comment.