1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Revert _init_rand() to reset errno - restores original init behavior.

This commit is contained in:
Dave Wysochanski 2010-06-01 21:47:57 +00:00
parent e3a1fc8af3
commit e9a87f2e16
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.67 -
===============================
Do not fail lvm_init() if init_logging() or _init_rand() generates an errno.
Don't merge unchanged persistent cache file before dumping if tool scanned.
Fix incorrect memory pool deallocation while using vg_read for files.
Add --type parameter description to the lvcreate man page.

View File

@ -1084,10 +1084,13 @@ static int _init_backup(struct cmd_context *cmd)
static void _init_rand(struct cmd_context *cmd)
{
if (read_urandom(&cmd->rand_seed, sizeof(cmd->rand_seed)))
if (read_urandom(&cmd->rand_seed, sizeof(cmd->rand_seed))) {
reset_lvm_errno(1);
return;
}
cmd->rand_seed = (unsigned) time(NULL) + (unsigned) getpid();
reset_lvm_errno(1);
}
static void _init_globals(struct cmd_context *cmd)