From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:41438 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725883AbfAaUrh (ORCPT ); Thu, 31 Jan 2019 15:47:37 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 88199AC61E for ; Thu, 31 Jan 2019 20:47:37 +0000 (UTC) Date: Thu, 31 Jan 2019 14:47:30 -0600 From: Bill O'Donnell Subject: Re: [PATCH] xfs_repair: fix incorrect return value in namecheck() Message-ID: <20190131204730.GA21644@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-xfs-owner@vger.kernel.org List-ID: List-Id: xfs To: Eric Sandeen Cc: linux-xfs On Thu, Jan 31, 2019 at 02:20:58PM -0600, Eric Sandeen wrote: > Obviously a directory entry with a '/' in the name should return > 1, i.e. failure. This was just a dumb thinko. > > Fixes: 45571fd5885d ("xfs_repair: allow '/' in attribute names") > > Reported-by: Darrick J. Wong > Signed-off-by: Eric Sandeen > --- Makes sense. Reviewed-by: Bill O'Donnell > > diff --git a/repair/da_util.c b/repair/da_util.c > index c5e690c..4a258e5 100644 > --- a/repair/da_util.c > +++ b/repair/da_util.c > @@ -31,7 +31,7 @@ namecheck( > > for (c = name, i = 0; i < length; i++, c++) { > if (isadir && *c == '/') > - return 0; > + return 1; > if (*c == '\0') > return 1; > } >