static int run(int argc, char *argv[]) {
_cleanup_(crypt_freep) struct crypt_device *cd = NULL;
+ char *verb, *volume;
int r;
- char *action, *volume;
if (argv_looks_like_help(argc, argv))
return help();
if (argc < 3)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "This program requires at least two arguments.");
- action = argv[1];
+ verb = argv[1];
volume = argv[2];
log_setup();
umask(0022);
- if (streq(action, "attach")) {
+ if (streq(verb, "attach")) {
/* attach name device optional_key_file optional_options */
crypt_status_info status;
if (r < 0)
return log_error_errno(r, "Failed to set up integrity device: %m");
- } else if (streq(action, "detach")) {
+ } else if (streq(verb, "detach")) {
if (argc > 3)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "detach has a maximum of two arguments.");
return log_error_errno(r, "Failed to deactivate: %m");
} else
- return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Unknown verb %s.", action);
+ return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Unknown verb %s.", verb);
return 0;
}