summaryrefslogtreecommitdiff
path: root/src/cryptsetup/cryptsetup.c
diff options
context:
space:
mode:
authorShawn Landden <shawnlandden@gmail.com>2012-07-25 14:55:59 -0700
committerKay Sievers <kay@vrfy.org>2012-07-26 11:48:26 +0200
commit0d0f0c50d3a1d90f03972a6abb82e6413daaa583 (patch)
tree74f41c8455dbd78599f49300315a2569a8989992 /src/cryptsetup/cryptsetup.c
parente146e4516b9ea9907852e7ad609de39dca9e8769 (diff)
log.h: new log_oom() -> int -ENOMEM, use it
also a number of minor fixups and bug fixes: spelling, oom errors that didn't print errors, not properly forwarding error codes, few more consistency issues, et cetera
Diffstat (limited to 'src/cryptsetup/cryptsetup.c')
-rw-r--r--src/cryptsetup/cryptsetup.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c
index 9d4e77364d..cc30e50003 100644
--- a/src/cryptsetup/cryptsetup.c
+++ b/src/cryptsetup/cryptsetup.c
@@ -343,7 +343,7 @@ int main(int argc, char *argv[]) {
l = strcspn(opt_cipher, "-");
if (!(truncated_cipher = strndup(opt_cipher, l))) {
- log_error("Out of memory.");
+ log_oom();
goto finish;
}
@@ -365,7 +365,7 @@ int main(int argc, char *argv[]) {
char **p;
if (asprintf(&text, "Please enter passphrase for disk %s!", name) < 0) {
- log_error("Out of memory.");
+ log_oom();
goto finish;
}
@@ -383,7 +383,7 @@ int main(int argc, char *argv[]) {
assert(strv_length(passwords) == 1);
if (asprintf(&text, "Please enter passphrase for disk %s! (verification)", name) < 0) {
- log_error("Out of memory.");
+ log_oom();
goto finish;
}
@@ -416,7 +416,7 @@ int main(int argc, char *argv[]) {
/* Pad password if necessary */
if (!(c = new(char, opt_key_size))) {
- log_error("Out of memory.");
+ log_oom();
goto finish;
}