From patchwork Fri May 10 17:30:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 163928 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:142:0:0:0:0 with SMTP id j2csp2687779ilr; Fri, 10 May 2019 10:52:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqxslN4ST1jwGujbYgp9nELI3MzIFK0ESdtx3iU0Pvk/6TJStnEeLUAxLzGnFx4M+7j1vBXD X-Received: by 2002:a17:906:264a:: with SMTP id i10mr9021093ejc.294.1557510721344; Fri, 10 May 2019 10:52:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557510721; cv=none; d=google.com; s=arc-20160816; b=aOev8FmB7tmfQW9uCCiorekN7AmB4aCA4EOSDttjbjzGAU7NRUCTejcJMlOJPywjx4 kU+ZhzF+GtIYeX4RUzxvUo9DY7hoHeEvXmsfPJ9xtLkLIydQv375CW4TM3WSyfvG2+9u No19CySthPNLE+DeagxanSjPRLGmqXIWFmsHE51mPtyL1jbW9BmRqEqqEWU1Iv9TIh/q r8/2ubRfdUx97hTajK+W1jVvlGqXq86gffeytwl+PYECDe4c1ckV6AxGeM4EY/r+HyiC 3YIp4hiWfpwIOa7aMGNiB9dT92P8PR40AtOny57dinwp71IoU+uqUHkgQ5hrbP3UOeOn OA4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=V+gOkII+X0gMY90Is6MzBXqbkDPGTCzHgSN8abaUrU8=; b=d4yYN3j2qbqF4NRzFyjF0XuUaJYjGi7YOrB2rUOaYcqC3s9YMNehdLc4HGVmdRAkIa 3wRxT45xoZEVD6GAcevjdLXEWRGSOIXQ1CYsTZwHemnicSs2DEWd8bLIA1QvXIWeDBGs M8/FDnBYwBNsD3aLN6PnWHE7qFf/OGI2Fs02fnScC9lUZII7ePNKCObAtN7Bs0iaS3lQ e+DsrV63XfqnK6lhle/7T38A7f9tKpfejRFmb8CJq490lPKf7yop/YT6QDCidOtWeaUq 71FDpOWTdv8ibw8xRfWl9fRBmpA2KKErEwlsDP9uTCUJrFN7Ft7cmbjNAVKNdKeP62/I JnMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=h6HYYZDw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id p38si3186249edc.348.2019.05.10.10.52.01 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 10 May 2019 10:52:01 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=h6HYYZDw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:47789 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP9ge-0002Vg-7z for patch@linaro.org; Fri, 10 May 2019 13:52:00 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59164) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP9MX-0007Ud-LK for qemu-devel@nongnu.org; Fri, 10 May 2019 13:31:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hP9MW-000690-Pn for qemu-devel@nongnu.org; Fri, 10 May 2019 13:31:13 -0400 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]:35796) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hP9MW-00068j-Jt for qemu-devel@nongnu.org; Fri, 10 May 2019 13:31:12 -0400 Received: by mail-pf1-x441.google.com with SMTP id t87so3591573pfa.2 for ; Fri, 10 May 2019 10:31:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=V+gOkII+X0gMY90Is6MzBXqbkDPGTCzHgSN8abaUrU8=; b=h6HYYZDwby2Pv5b/wP2xRw4m1mLD22hQYqzLyORS/nCjrEUlf246slfhBflJpEF7nr jPNkP0YJmfO7j7a0EiDGVc91JuLdDrdkzJlkuYiI6ntDcDk00L9d9Vj9okUXvlpiuT4+ qQY/BEp8Ij6EZIUGBrMbBhIGsYrzgDOTdoq9fJSlG9ybNZRvlqnYmDwCBOG45OPHvepP oJRD4z+klAmTUe0pweO+so1/0c3U6yFZbAo1VtFC2/DyFMpB5/f17ZdL4xj7xis/4B6+ wi5xBIiE1tAULX18AdDiT4uzaXAJzmMU3i0WR24YLnCZ+x16j1PkCXzU8g8MuqAZ7EiJ YNUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=V+gOkII+X0gMY90Is6MzBXqbkDPGTCzHgSN8abaUrU8=; b=HwRILyFyT8lMhBisgbodvPmdJuj12WldkYIPdZbVxIvzFabeiLCuC8jG8EZTd/AKnu tLsocysjQfwXjuxO820lxa35v2wtWaYZ6DGbr4aVsCuTl46KJPGDLKo4pUrxYhfIIWjD /rzdfgSuHvubTSWwZ7nxa4ZvueeSqKs6QSeUQMiBqPqrZHW72XZZrDBxDtykHO/YGu6y UzHZLdxKUeAB30sSe6Sow9tAmqfNvov/gEnjzynK6Sr3r9+nn9JYgdBDyHKpVlUh3Dod MxOi2CwQ86lax6ry9zo3q0UYunCj4cs57vIvK7EbiGaNwDs6Q+5nbOmqdJ3SWVyhLEhI VdtA== X-Gm-Message-State: APjAAAVmt39VYtpLalBOKPLMqWfL1/dzKb1YIr6paLgx2ZEjuJEqpsRl qDyu+QmkFtSB/q3WFv4d9Wip+adbjTE= X-Received: by 2002:a63:6a41:: with SMTP id f62mr15367573pgc.392.1557509471274; Fri, 10 May 2019 10:31:11 -0700 (PDT) Received: from localhost.localdomain (97-113-13-231.tukw.qwest.net. [97.113.13.231]) by smtp.gmail.com with ESMTPSA id v64sm7936792pfv.106.2019.05.10.10.31.10 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 May 2019 10:31:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 10 May 2019 10:30:40 -0700 Message-Id: <20190510173049.28171-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190510173049.28171-1-richard.henderson@linaro.org> References: <20190510173049.28171-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::441 Subject: [Qemu-devel] [PATCH v6 16/25] linux-user: Remove srand call X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We no longer use rand() within linux-user. Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/main.c | 11 ----------- 1 file changed, 11 deletions(-) -- 2.17.1 diff --git a/linux-user/main.c b/linux-user/main.c index e455bff1b7..5d1c6a115b 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -623,8 +623,6 @@ int main(int argc, char **argv, char **envp) cpu_model = NULL; - srand(time(NULL)); - qemu_add_opts(&qemu_trace_opts); optind = parse_args(argc, argv); @@ -692,15 +690,6 @@ int main(int argc, char **argv, char **envp) { Error *err = NULL; if (seed_optarg != NULL) { - unsigned long long seed; - - /* This will go away with the last user of rand(). */ - if (parse_uint_full(seed_optarg, &seed, 0) != 0) { - fprintf(stderr, "Invalid seed number: %s\n", seed_optarg); - exit(EXIT_FAILURE); - } - srand(seed); - qemu_guest_random_seed_main(seed_optarg, &err); } else { /* ??? Assumes qcrypto is only used by qemu_guest_getrandom. */