From patchwork Mon May 30 02:32:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Patterson X-Patchwork-Id: 9140147 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 508ED60467 for ; Mon, 30 May 2016 02:35:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4294628187 for ; Mon, 30 May 2016 02:35:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 35DD028206; Mon, 30 May 2016 02:35:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9BACE28187 for ; Mon, 30 May 2016 02:35:20 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b7D0j-0003kb-B1; Mon, 30 May 2016 02:32:57 +0000 Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b7D0i-0003kO-7M for xen-devel@lists.xen.org; Mon, 30 May 2016 02:32:56 +0000 Received: from [85.158.143.35] by server-2.bemta-6.messagelabs.com id C9/46-06230-756AB475; Mon, 30 May 2016 02:32:55 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprEIsWRWlGSWpSXmKPExsVyMfSAo27YMu9 wgwVbzSyWfFzM4sDocXT3b6YAxijWzLyk/IoE1ozG7q9MBYfZK77PW83WwHiArYuRi0NIYAKj xKKnT9i7GDk5WAQusUjsXx0EkpAQeMci0XF+GytIQkIgRuL4pctsEHaVxPspJ8AahATkJf4em MIINYlJYtOGLqYuRg4ONgENiVM3XEBqRASkJa59vswIYjMLxEt8WL4YbKawgJ/EoZn3WCAWq0 rMPDCLGcTmFbCX6Ji/igVil5zE+eM/mScw8i1gZFjFqF6cWlSWWqRrpJdUlJmeUZKbmJmja2h gppebWlycmJ6ak5hUrJecn7uJERgmDECwg3HZX6dDjJIcTEqivG4c3uFCfEn5KZUZicUZ8UWl OanFhxhlODiUJHgLlgLlBItS01Mr0jJzgAELk5bg4FES4fUCSfMWFyTmFmemQ6ROMVpybPl9b S0Tx4Ift4Hktqn31jIJseTl56VKifMWgjQIgDRklObBjYNF1SVGWSlhXkagA4V4ClKLcjNLUO VfMYpzMCoJ83qCTOHJzCuB2/oK6CAmoIPMznmBHFSSiJCSamBs9nzWpBCyJl/q3G0F/nl3t/q Z6H34qR3M7+JYJhxcbL3c51Ri9tuHIiwG/17HrF0k4Ty9Y136kT2t189ufi+wS/zadFMVuc8h QYz2JRLfakI25j23vm9gsD/suXZ/gPH/Sy8VO7nn7A8y+St/7kXFDofryl+/36pb945np5aKw p8DQofuJ25SYinOSDTUYi4qTgQAcowr+aUCAAA= X-Env-Sender: cjp256@gmail.com X-Msg-Ref: server-7.tower-21.messagelabs.com!1464575573!16541143!1 X-Originating-IP: [209.85.192.65] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.46; banners=-,-,- X-VirusChecked: Checked Received: (qmail 52447 invoked from network); 30 May 2016 02:32:54 -0000 Received: from mail-qg0-f65.google.com (HELO mail-qg0-f65.google.com) (209.85.192.65) by server-7.tower-21.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 30 May 2016 02:32:54 -0000 Received: by mail-qg0-f65.google.com with SMTP id l75so7765498qgd.3 for ; Sun, 29 May 2016 19:32:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=xjPkePmtiG2gnaoi+faWI/ddldv+APCaJ1L1UCaUqGQ=; b=jWnIEZ/8vww9cpMqWCPTgM0QNVwRlkPBsUxn/qYIafo0teUiSpEoHme9TSvPExsHaz Jy8qk6xy0lj436msSCjm6JaPe8GvMpBwZ+rMlSkhbc0wb+1xtKyk6sF4VEMd8NR1k05N /+eBD88xMZBKUzJIMrRZm7C2vhqwMFMRtEF+0B//Vl4Mt5kqAVHxPBXxXSXIErZlC/du oUy9DQaTUFPxOfXfmjqyQlCuTkCBVUh5AmpxloFiEmduiBLkT1DWui7RLng+lQ4ex1ur iBnyV+gfaVPLFe0MemyUhY2OYyxOjOCy11SYj2qZuAQ9l9bbbn6jJcHctPLaLyHo8QjX oB2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=xjPkePmtiG2gnaoi+faWI/ddldv+APCaJ1L1UCaUqGQ=; b=Zij0s0O0Q1jNELdyFbSA0N6h2Geg+8Md4Z+qNd8UpQRQp9YrmG91AqypHXSPzRr2IM 8cNpJ1qKjs0GfCpxCirZnqAQa7KNpz4QRQb7PZsBJtR+YAFh30+iQMelZD9lePan+XwS vvVEOPmaZ1sEobQBFiadvPQJTOHDkIrGHG5ANXePQJZx3bF85sadWmyFbhp1k/wJaG82 2UX8Nejt+vGMc/gX7Wgg9JwS65cXf1Vju6FasllePNdqAu0FCXSUVNBSY6nutWhuoQ/+ EtaMhc73brwmVN9CEaTGMwRRxe1VtA3sJjfkQhHVANDjNyUJUuJoVWJO9g5iSglf7PUM DPZw== X-Gm-Message-State: ALyK8tIN7zzQm/WziM7qhLdFKkUzwv3qMQSamS8D4Qo9txbPuCgbpoCWKxRDH1x3nm0AGQ== X-Received: by 10.140.226.71 with SMTP id w68mr25212772qhb.51.1464575573566; Sun, 29 May 2016 19:32:53 -0700 (PDT) Received: from roost.members.linode.com (chrispatterson.net. [66.175.209.160]) by smtp.gmail.com with ESMTPSA id x107sm6185482qgx.6.2016.05.29.19.32.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 29 May 2016 19:32:53 -0700 (PDT) From: Chris Patterson To: xen-devel@lists.xen.org Date: Sun, 29 May 2016 22:32:46 -0400 Message-Id: <1464575567-3962-1-git-send-email-cjp256@gmail.com> X-Mailer: git-send-email 2.1.4 Cc: wei.liu2@citrix.com, Chris Patterson , ian.jackson@eu.citrix.com Subject: [Xen-devel] [PATCH 1/2] libfsimage: replace deprecated readdir_r() with readdir() X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Chris Patterson Replace the usage of readdir_r() with readdir() to address a compilation error due to the deprecation of readdir_r. glibc has deprecated this for their next release (2.24): https://sourceware.org/bugzilla/show_bug.cgi?id=19056 Signed-off-by: Chris Patterson --- tools/libfsimage/common/fsimage_plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libfsimage/common/fsimage_plugin.c b/tools/libfsimage/common/fsimage_plugin.c index 3fa06c7..03212e1 100644 --- a/tools/libfsimage/common/fsimage_plugin.c +++ b/tools/libfsimage/common/fsimage_plugin.c @@ -147,7 +147,7 @@ static int load_plugins(void) bzero(dp, sizeof (struct dirent) + name_max + 1); - while (readdir_r(dir, dp, &dpp) == 0 && dpp != NULL) { + while ((dpp = readdir(dir)) != NULL) { if (strcmp(dpp->d_name, ".") == 0) continue; if (strcmp(dpp->d_name, "..") == 0)