From patchwork Fri May 10 01:24:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 163804 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:142:0:0:0:0 with SMTP id j2csp1730236ilr; Thu, 9 May 2019 18:38:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqzrlL8p1O+UOihZs3KUK/UCHLUnUZWnYZC6qHU3ZWQrITUZ8/HdYDuCTnzN66kciwlBNgMB X-Received: by 2002:a5d:6912:: with SMTP id t18mr5655516wru.17.1557452324717; Thu, 09 May 2019 18:38:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557452324; cv=none; d=google.com; s=arc-20160816; b=WZ6TaYyfzz3OsfM7eK6sNaPQv0dMzHMlJfsyifnymMh1td3Fc+K9C13rizWQUS5Zqu LnhMBuRuNQ2xRIpeCdPwOL0ylZqAAizFv2n00CB1aD0GNLqv67qhYEdkgJAc4Keu9NiD kjQlmmp+CkHNLdJrOgk/Hp5wWWTuj062ymZYstoUn5R4igJZHYDx42GFa5j+E+Si5OCZ OgZKcaEkS0OfteokTObTp3+B5Gkbz74XTsnzr7zn/kNHA2FNkHDykbrP37fH8LZda2BY a9in70sxtGwdCpQTCM09sDxuqaEQ3k1MIegTO2y8amWQySSl6p7qSNkSEPLbFP4EOjUO iHpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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=m8x2+ISq8VDA34RGun8yoxuib+WCd51kzqEMsPfii4Q=; b=NQpotJa3nlGjuAFBemzdIP3mXAusOuBneoU7rl6mSeGNpKzlUhmFRHk+h+mrJluLd0 RhL+I8KcTjkwWT+IhQnb0X7qnO0NiB5fO/ghvG4ZbSSZVuB0CsjDqU4Sf22j6OX94uK3 p6X0tQxpyLq+U/UCnDP+abKhfPrbBHlRZVU34c3doW32e+1iZjHno2upkS4K04FuFxZD WgOzED1IXXShsggVL40AGsPfBgmfyN4un3vPBI1DXi86KNkGiAqJ70yhK+37j/IfXQFU x4EMoUyjt4850tD0bElFyh2qE5IDRt9I39H86v+aq3jm75308RLkuYcNXkHVdnR4NIWQ 4Zpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=QTSz4jph; 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 u7si3126899wri.426.2019.05.09.18.38.44 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 09 May 2019 18:38:44 -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=QTSz4jph; 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]:35176 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOuUl-0001cn-KQ for patch@linaro.org; Thu, 09 May 2019 21:38:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58795) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOuHq-0006LA-FJ for qemu-devel@nongnu.org; Thu, 09 May 2019 21:25:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOuHp-0001G1-HM for qemu-devel@nongnu.org; Thu, 09 May 2019 21:25:22 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]:44626) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOuHp-0001En-BN for qemu-devel@nongnu.org; Thu, 09 May 2019 21:25:21 -0400 Received: by mail-pf1-x42b.google.com with SMTP id g9so2244589pfo.11 for ; Thu, 09 May 2019 18:25:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=m8x2+ISq8VDA34RGun8yoxuib+WCd51kzqEMsPfii4Q=; b=QTSz4jph9S4OEHX0O5EabZ5iXAOs0H+CP+JG+4vlE6qvDaDaYukMygwb5yWkxD3Sax FJi9MaYsQV9JwwOvNWLtSPayMkZVVhwNTf8khaebgPdJlsVX5F0L8r9ofTib/ppupl1D DKZDdVwqi/zGHdZ3TWpmhoZ3BiWNeMFQPHjAw4iGbDrrXHWzdBBF2Aca0xQtmnwJN5ry HNwqYQpqqnH6OV8jGEJCHE4m2Mg6xUf679MlFzlkyZAn6/r+6tog+oQpY4OZOHRiP36J NcfUAB5jMyfs/6ct014j2Ac9u8hCIhhSlUfX6wVSvIhlbX5SzBp3TPm1eMa72pH+DCT6 BmPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=m8x2+ISq8VDA34RGun8yoxuib+WCd51kzqEMsPfii4Q=; b=iHY4DwWiMfuE2a0hPnHmhUQ1l7IuWmh++/jFW3QaIaPqQR00Q04i2rIu2X0pBNnUyf qnCYXSHNMXM+vjNlSjYhdumzI/ohTL+BlSvtvtjACbRhPTxW6wHtYi4lvsAYWZDLZZQv eo1OQ9Xbw9w6V1/x1f6jpkQTNI26bt/omfdW/Dgbusupi5sechxQu28tGxbGYpR1gYSh 8/lE0TrlaYMJg6hT27u+CGDCvaLWXdSOpLKLLOmJ3jcbAdrYtybzhuC2PlirgPEiFbKN 3YmWOEe11/jFanrj/u1/VzKELos6rdZ3ASnHide+8NF3WJSd7Xggb+gQ1CYbzKiRo2WP UwSQ== X-Gm-Message-State: APjAAAWiTJoEgkgjY6Ds/gMOJhpvuS8UO/9fIWPwnXRkegK8HzpdApLw oglJLd5M6BjvsDYE6duAR4khsXD/kb8= X-Received: by 2002:a62:579b:: with SMTP id i27mr10077584pfj.205.1557451519977; Thu, 09 May 2019 18:25:19 -0700 (PDT) Received: from localhost.localdomain (97-113-13-231.tukw.qwest.net. [97.113.13.231]) by smtp.gmail.com with ESMTPSA id n18sm8252700pfi.48.2019.05.09.18.25.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 May 2019 18:25:19 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 9 May 2019 18:24:50 -0700 Message-Id: <20190510012458.22706-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190510012458.22706-1-richard.henderson@linaro.org> References: <20190510012458.22706-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::42b Subject: [Qemu-devel] [PATCH v5 16/24] 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: , Cc: Laurent Vivier Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We no longer use rand() within linux-user. Cc: 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 Reviewed-by: Laurent Vivier 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. */