From patchwork Fri Oct 26 14:24:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 194491 X-Patchwork-Delegate: trini@ti.com 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 8F5E12C0080 for ; Sat, 27 Oct 2012 01:24:22 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 60BC14A1E0; Fri, 26 Oct 2012 16:24:18 +0200 (CEST) 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 ocgt4UXnMLwF; Fri, 26 Oct 2012 16:24:18 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CFE014A1B7; Fri, 26 Oct 2012 16:24:16 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A48A34A1B7 for ; Fri, 26 Oct 2012 16:24:15 +0200 (CEST) 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 1E7ah81ZrLdD for ; Fri, 26 Oct 2012 16:24:13 +0200 (CEST) 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 mo-p05-ob.rzone.de (mo-p05-ob.rzone.de [81.169.146.181]) by theia.denx.de (Postfix) with ESMTPS id 9DD8C4A1A7 for ; Fri, 26 Oct 2012 16:24:12 +0200 (CEST) X-RZG-AUTH: :IW0NeWC7b/q2i6W/qstXb1SBUuFnrGohdvpEkce+Ub4+ReKfHD+mB0eMru/SvA== X-RZG-CLASS-ID: mo05 Received: from ubuntu-2012.fritz.box (p57B9567C.dip.t-dialin.net [87.185.86.124]) by smtp.strato.de (jorabe mo25) (RZmta 30.20 DYNA|AUTH) with ESMTPA id 205d55o9QD8I2X ; Fri, 26 Oct 2012 16:24:04 +0200 (CEST) From: Stefan Roese To: u-boot@lists.denx.de Date: Fri, 26 Oct 2012 16:24:01 +0200 Message-Id: <1351261441-3799-2-git-send-email-sr@denx.de> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1351261441-3799-1-git-send-email-sr@denx.de> References: <1351261441-3799-1-git-send-email-sr@denx.de> Subject: [U-Boot] [PATCH 2/2] ZFS: Fix compile warning in fs/zfs/zfs.c (GCC 4.6.4 from ELDK 5.2.1) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de This patch fixes the following compile warning: zfs.c:2006:1: warning: 'zfs_label' defined but not used [-Wunused-function] zfs.c:2029:1: warning: 'zfs_uuid' defined but not used [-Wunused-function] Signed-off-by: Stefan Roese Cc: Jorgen Lundman --- fs/zfs/zfs.c | 51 --------------------------------------------------- 1 file changed, 51 deletions(-) diff --git a/fs/zfs/zfs.c b/fs/zfs/zfs.c index 360f723..2db45b1 100644 --- a/fs/zfs/zfs.c +++ b/fs/zfs/zfs.c @@ -2002,49 +2002,6 @@ zfs_fetch_nvlist(device_t dev, char **nvlist) return err; } -static int -zfs_label(device_t device, char **label) -{ - char *nvlist; - int err; - struct zfs_data *data; - - data = zfs_mount(device); - if (!data) - return ZFS_ERR_BAD_FS; - - err = int_zfs_fetch_nvlist(data, &nvlist); - if (err) { - zfs_unmount(data); - return err; - } - - *label = zfs_nvlist_lookup_string(nvlist, ZPOOL_CONFIG_POOL_NAME); - free(nvlist); - zfs_unmount(data); - return ZFS_ERR_NONE; -} - -static int -zfs_uuid(device_t device, char **uuid) -{ - struct zfs_data *data; - - data = zfs_mount(device); - if (!data) - return ZFS_ERR_BAD_FS; - - *uuid = malloc(17); /* %016llx + nil */ - if (!*uuid) - return ZFS_ERR_OUT_OF_MEMORY; - - /* *uuid = xasprintf ("%016llx", (long long unsigned) data->pool_guid);*/ - snprintf(*uuid, 17, "%016llx", (long long unsigned) data->pool_guid); - zfs_unmount(data); - - return ZFS_ERR_NONE; -} - /* * zfs_open() locates a file in the rootpool by following the * MOS and places the dnode of the file in the memory address DNODE. @@ -2325,14 +2282,6 @@ zfs_ls(device_t device, const char *path, struct zfs_data *data; int err; int isfs; -#if 0 - char *label = NULL; - - zfs_label(device, &label); - if (label) - printf("ZPOOL label '%s'\n", - label); -#endif data = zfs_mount(device); if (!data)