From patchwork Wed Jan 9 09:43:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Kim_B=C3=B8ndergaard?= X-Patchwork-Id: 210669 X-Patchwork-Delegate: esben@haabendal.dk Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hugin.dotsrc.org (hugin.dotsrc.org [IPv6:2001:878:346::102]) by ozlabs.org (Postfix) with ESMTP id CA3662C00DC for ; Wed, 9 Jan 2013 20:43:53 +1100 (EST) Received: from hugin.dotsrc.org (localhost [127.0.0.1]) by hugin.dotsrc.org (Postfix) with ESMTP id 158963F9CA for ; Wed, 9 Jan 2013 10:43:49 +0100 (CET) X-Original-To: dev@oe-lite.org Delivered-To: dev@oe-lite.org Received: from mail01.prevas.se (mail01.prevas.se [62.95.78.3]) by hugin.dotsrc.org (Postfix) with ESMTPS id 90ACF3F9CA for ; Wed, 9 Jan 2013 10:43:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=prevas.dk; i=@prevas.dk; l=964; q=dns/txt; s=ironport1; t=1357724627; x=1389260627; h=from:to:subject:date:message-id:in-reply-to:references: mime-version; bh=cyyq7leMiYSsrLG05Qk7Ik7ngjryOFaPu+ciO8i9ABQ=; b=fxJANbnflh5OWUl3sPH4DIL6yQWEDuyHPF8WN5VUDD0E127saVG5dm2c ocrf+XITZoqg3cVwqysaMZWtBM0nCj5oogHhgQZgzBP9rJhe+Shk6MPz7 4Anmc31KyGnGfvasMNxk8Hc8IvB4B62oaflzO4k5RN4obth20FCiCMram o=; X-IronPort-AV: E=Sophos;i="4.84,436,1355094000"; d="scan'208";a="2676208" Received: from vmprevas3.prevas.se (HELO smtp.prevas.se) ([172.16.8.103]) by ironport1.prevas.se with ESMTP/TLS/AES128-SHA; 09 Jan 2013 10:43:25 +0100 Received: from localhost (172.16.10.102) by smtp.prevas.se (172.16.8.105) with Microsoft SMTP Server id 14.2.318.4; Wed, 9 Jan 2013 10:43:24 +0100 Received: by localhost (Postfix, from userid 30019) id 5FAA320D5B; Wed, 9 Jan 2013 09:43:18 +0000 (UTC) From: =?UTF-8?q?Kim=20B=C3=B8ndergaard?= To: Subject: [PATCH 1/1] makedevs: Fixed error introduced in previous commit Date: Wed, 9 Jan 2013 09:43:15 +0000 Message-ID: <8284518232696c8cb23dbaeb8cb502ba8183c853.1357723114.git.kibo@prevas.dk> X-Mailer: git-send-email 1.8.0.3 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: dev@oe-lite.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: OE-lite development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dev-bounces@oe-lite.org Errors-To: dev-bounces@oe-lite.org --- recipes/makedevs/makedevs-1.0.0/makedevs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/recipes/makedevs/makedevs-1.0.0/makedevs.c b/recipes/makedevs/makedevs-1.0.0/makedevs.c index 4953d79..5a017c5 100644 --- a/recipes/makedevs/makedevs-1.0.0/makedevs.c +++ b/recipes/makedevs/makedevs-1.0.0/makedevs.c @@ -196,7 +196,7 @@ static int interpret_table_entry(char *line) if (0 > sscanf(line, "%40s %c %lo %lu %lu %lu %lu %lu %lu %20s", path, &type, &mode, &uid, &gid, &major, &minor, &start, - &increment, &countstr)) + &increment, countstr)) { return 1; } @@ -205,9 +205,8 @@ static int interpret_table_entry(char *line) pcountstr++; do_hex = 1; } - if (0 > sscanf(pcountstr,"%lu", &count)) { - return 1; - } + sscanf(pcountstr,"%lu", &count); + if (!strcmp(path, "/")) { error_msg_and_die("Device table entries require absolute paths"); }