From patchwork Sat Dec 4 04:28:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 74247 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 1A4651007D1 for ; Sat, 4 Dec 2010 15:30:08 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BF3E628173; Sat, 4 Dec 2010 05:29:49 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aKB7a6ymPDC4; Sat, 4 Dec 2010 05:29:49 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3943C281B5; Sat, 4 Dec 2010 05:29:40 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 16D75281AB for ; Sat, 4 Dec 2010 05:29:37 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VJxhSL5rvVYr for ; Sat, 4 Dec 2010 05:29:34 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-yw0-f44.google.com (mail-yw0-f44.google.com [209.85.213.44]) by theia.denx.de (Postfix) with ESMTP id 052FD2817D for ; Sat, 4 Dec 2010 05:29:25 +0100 (CET) Received: by ywi6 with SMTP id 6so996340ywi.3 for ; Fri, 03 Dec 2010 20:29:24 -0800 (PST) Received: by 10.150.140.15 with SMTP id n15mr5040363ybd.366.1291436964666; Fri, 03 Dec 2010 20:29:24 -0800 (PST) Received: from localhost.localdomain (static-74-41-60-154.dsl1.pco.ca.frontiernet.net [74.41.60.154]) by mx.google.com with ESMTPS id p30sm1748541ybk.8.2010.12.03.20.29.22 (version=SSLv3 cipher=RC4-MD5); Fri, 03 Dec 2010 20:29:24 -0800 (PST) From: Steve Sakoman To: u-boot@lists.denx.de Date: Fri, 3 Dec 2010 20:28:53 -0800 Message-Id: <1291436933-26861-4-git-send-email-steve@sakoman.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1291436933-26861-1-git-send-email-steve@sakoman.com> References: <1291436933-26861-1-git-send-email-steve@sakoman.com> MIME-Version: 1.0 Cc: =?UTF-8?q?Lo=C3=AFc=20Minier?= Subject: [U-Boot] [RFC 3/3] tools/env: Bump devname length to PATH_MAX for filenames X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Loïc Minier This patch increases the devname length to 4096 in order to support writing to normal files in addition to mtd devices. Signed-off-by: Loïc Minier Tested-by: Steve Sakoman --- tools/env/fw_env.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c index d2f9748..a75b73b 100644 --- a/tools/env/fw_env.c +++ b/tools/env/fw_env.c @@ -53,8 +53,12 @@ (void) (&_min1 == &_min2); \ _min1 < _min2 ? _min1 : _min2; }) +#ifndef PATH_MAX +#define PATH_MAX 4096 +#endif + struct envdev_s { - char devname[16]; /* Device name */ + char devname[PATH_MAX]; /* Device name */ ulong devoff; /* Device offset */ ulong env_size; /* environment size */ ulong erase_size; /* device erase size */