From patchwork Wed Sep 12 11:56:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 1443161 Return-Path: X-Original-To: patchwork-cifs-client@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 450AADF28C for ; Wed, 12 Sep 2012 11:56:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753551Ab2ILL4t (ORCPT ); Wed, 12 Sep 2012 07:56:49 -0400 Received: from mail-yw0-f46.google.com ([209.85.213.46]:36807 "EHLO mail-yw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753257Ab2ILL4s (ORCPT ); Wed, 12 Sep 2012 07:56:48 -0400 Received: by yhmm54 with SMTP id m54so359793yhm.19 for ; Wed, 12 Sep 2012 04:56:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=nR3F5Bdsa2nam7az4lyvbzouuwQmdPyQ+S9jx+EeHl4=; b=e4Z8uAA5wgwpSPJtGS4t9kAWAIactPIPoDgzuRt63UYQV5p62ZPS6Qboy7Ig8eNDxG QlDiyG/sy2FJaq21JSdy1iZA3/GuO4zHnwcMLW8Z4YDun90s4p/oKfhRjeA9g3rIGl+2 zdCwHb/9lJm1jcAIhcGPXJkPXhIFRnGVbpEEydWRw/bwZ0ZFBp0LqLebKYGVBNwhN8Bx UqSuv6QA1KFqJheDvnTCEzFIDETCV1xMHIz8C188UApLkCos1/d6vhM0Y8kXR0F8aXBi FrxtyAVzXb3bcfizB/NoDcXOXEYDYarY73o9M8V8WJ8wSRUu8Zl7Ke0iMiypwpNY94kj bsRQ== Received: by 10.100.200.3 with SMTP id x3mr6075315anf.29.1347451007474; Wed, 12 Sep 2012 04:56:47 -0700 (PDT) Received: from salusa.poochiereds.net (cpe-069-134-145-027.nc.res.rr.com. [69.134.145.27]) by mx.google.com with ESMTPS id l25sm35516811yhk.8.2012.09.12.04.56.45 (version=SSLv3 cipher=OTHER); Wed, 12 Sep 2012 04:56:46 -0700 (PDT) From: Jeff Layton To: linux-cifs@vger.kernel.org Cc: azelinka@redhat.com Subject: [PATCH] mount.cifs: running out of addresses is not a system error Date: Wed, 12 Sep 2012 07:56:39 -0400 Message-Id: <1347450999-25309-1-git-send-email-jlayton@samba.org> X-Mailer: git-send-email 1.7.11.4 X-Gm-Message-State: ALoCoQm3frDjThUYKVFgLW6zedHiwN1d5h09K7YmjsvamG6AZ3X/P4Cf5lhpbv7fffbmDsiEZZD4 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org This patch fixes a minor regression. It used to be that when the mount helper would run out of addresses that it would return EX_FAIL to userspace. It now returns EX_SYSERR which is incorrect. Reinstate the correct error code. Reported-by: Ales Zelinka Signed-off-by: Jeff Layton --- mount.cifs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mount.cifs.c b/mount.cifs.c index 3fd472a..7ee859b 100644 --- a/mount.cifs.c +++ b/mount.cifs.c @@ -2119,7 +2119,7 @@ int main(int argc, char **argv) mount_retry: if (!currentaddress) { fprintf(stderr, "Unable to find suitable address.\n"); - rc = EX_SYSERR; + rc = EX_FAIL; goto mount_exit; } strlcpy(options, "ip=", options_size);