aboutsummaryrefslogtreecommitdiff
path: root/util-linux/seedrng.c
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux/seedrng.c')
-rw-r--r--util-linux/seedrng.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/util-linux/seedrng.c b/util-linux/seedrng.c
index 978860bbd..74bf633a7 100644
--- a/util-linux/seedrng.c
+++ b/util-linux/seedrng.c
@@ -136,7 +136,7 @@ static void seed_from_file_if_exists(const char *filename, bool credit, sha256_c
136 seed_len = open_read_close(filename, seed, sizeof(seed)); 136 seed_len = open_read_close(filename, seed, sizeof(seed));
137 if (seed_len < 0) { 137 if (seed_len < 0) {
138 if (errno != ENOENT) 138 if (errno != ENOENT)
139 bb_perror_msg_and_die("can't%s seed", " read"); 139 bb_perror_msg_and_die("can't read '%s'", filename);
140 return; 140 return;
141 } 141 }
142 xunlink(filename); 142 xunlink(filename);
@@ -178,10 +178,10 @@ int seedrng_main(int argc UNUSED_PARAM, char *argv[])
178 bb_simple_error_msg_and_die(bb_msg_you_must_be_root); 178 bb_simple_error_msg_and_die(bb_msg_you_must_be_root);
179 179
180 if (mkdir(seed_dir, 0700) < 0 && errno != EEXIST) 180 if (mkdir(seed_dir, 0700) < 0 && errno != EEXIST)
181 bb_perror_msg_and_die("can't %s seed directory", "create"); 181 bb_perror_msg_and_die("can't create directory '%s'", seed_dir);
182 dfd = xopen(seed_dir, O_DIRECTORY | O_RDONLY); 182 dfd = xopen(seed_dir, O_DIRECTORY | O_RDONLY);
183 if (flock(dfd, LOCK_EX) < 0) 183 if (flock(dfd, LOCK_EX) < 0)
184 bb_perror_msg_and_die("can't %s seed directory", "lock"); 184 bb_perror_msg_and_die("can't lock seed directory");
185 xfchdir(dfd); 185 xfchdir(dfd);
186 186
187 sha256_begin(&hash); 187 sha256_begin(&hash);