summaryrefslogtreecommitdiffstats
path: root/mdadm.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2005-06-07 23:03:48 +0000
committerNeil Brown <neilb@suse.de>2005-06-07 23:03:48 +0000
commitdfe47e008e10d5640c6b3d0ae6de7ef6cefcb7b2 (patch)
tree0fd6aa40bd1559c813eab17392936bdaf2514a1f /mdadm.c
parent892debc8200517e8b00750367acd890199f9f4de (diff)
downloadmdadm-dfe47e008e10d5640c6b3d0ae6de7ef6cefcb7b2.tar.gz
mdadm-dfe47e008e10d5640c6b3d0ae6de7ef6cefcb7b2.tar.xz
mdadm-dfe47e008e10d5640c6b3d0ae6de7ef6cefcb7b2.zip
Make sure to seed the random number generator for uuids
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Diffstat (limited to 'mdadm.c')
-rw-r--r--mdadm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mdadm.c b/mdadm.c
index d8d46ee..c8b8e47 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -93,6 +93,8 @@ int main(int argc, char *argv[])
int mdfd = -1;
+ srandom(time(0) ^ getpid());
+
ident.uuid_set=0;
ident.level = UnSet;
ident.raid_disks = UnSet;