From patchwork Tue Dec 17 07:04:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 3359471 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D25E79F314 for ; Tue, 17 Dec 2013 07:07:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 078BC20375 for ; Tue, 17 Dec 2013 07:07:53 +0000 (UTC) Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com [209.132.183.25]) by mail.kernel.org (Postfix) with ESMTP id 25A5320348 for ; Tue, 17 Dec 2013 07:07:52 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id rBH74CRL017211; Tue, 17 Dec 2013 02:04:13 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id rBH74Bwm012924 for ; Tue, 17 Dec 2013 02:04:11 -0500 Received: from mx1.redhat.com (ext-mx15.extmail.prod.ext.phx2.redhat.com [10.5.110.20]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rBH74BXT024335 for ; Tue, 17 Dec 2013 02:04:11 -0500 Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rBH749MY024036 for ; Tue, 17 Dec 2013 02:04:10 -0500 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 4C3A3AC09; Tue, 17 Dec 2013 07:04:09 +0000 (UTC) From: Hannes Reinecke To: Christophe Varoqui Date: Tue, 17 Dec 2013 08:04:06 +0100 Message-Id: <1387263848-73945-4-git-send-email-hare@suse.de> In-Reply-To: <1387263848-73945-1-git-send-email-hare@suse.de> References: <1387263848-73945-1-git-send-email-hare@suse.de> X-RedHat-Spam-Score: -7.834 (BAYES_00, DCC_REPUT_00_12, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, URIBL_BLOCKED) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Scanned-By: MIMEDefang 2.68 on 10.5.110.20 X-loop: dm-devel@redhat.com Cc: dm-devel@redhat.com Subject: [dm-devel] [PATCH 3/5] libmultipath: remove 'remove_trailing_chars' X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Unused; superseded by strchop(). Signed-off-by: Hannes Reinecke --- libmultipath/util.c | 9 --------- libmultipath/util.h | 1 - 2 files changed, 10 deletions(-) diff --git a/libmultipath/util.c b/libmultipath/util.c index 2b41e7a..93ab08b 100644 --- a/libmultipath/util.c +++ b/libmultipath/util.c @@ -142,15 +142,6 @@ size_t strlcat(char *dst, const char *src, size_t size) return bytes; } -void remove_trailing_chars(char *path, char c) -{ - size_t len; - - len = strlen(path); - while (len > 0 && path[len-1] == c) - path[--len] = '\0'; -} - extern int devt2devname (char *devname, int devname_len, char *devt) { diff --git a/libmultipath/util.h b/libmultipath/util.h index 4eafe6e..257912c 100644 --- a/libmultipath/util.h +++ b/libmultipath/util.h @@ -7,7 +7,6 @@ int filepresent (char * run); int get_word (char * sentence, char ** word); size_t strlcpy(char *dst, const char *src, size_t size); size_t strlcat(char *dst, const char *src, size_t size); -void remove_trailing_chars(char *path, char c); int devt2devname (char *, int, char *); dev_t parse_devt(const char *dev_t); char *convert_dev(char *dev, int is_path_device);