From patchwork Thu Mar 10 15:43:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 624931 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2AFhPC5003202 for ; Thu, 10 Mar 2011 15:43:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753158Ab1CJPnY (ORCPT ); Thu, 10 Mar 2011 10:43:24 -0500 Received: from opensource.wolfsonmicro.com ([80.75.67.52]:45576 "EHLO opensource2.wolfsonmicro.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753017Ab1CJPnX (ORCPT ); Thu, 10 Mar 2011 10:43:23 -0500 Received: from rakim.wolfsonmicro.main (unknown [87.246.78.26]) by opensource2.wolfsonmicro.com (Postfix) with ESMTPSA id B6936110100; Thu, 10 Mar 2011 15:43:22 +0000 (GMT) Received: by rakim.wolfsonmicro.main (Postfix, from userid 1000) id 04BFC1ED24B9; Thu, 10 Mar 2011 15:43:21 +0000 (GMT) From: Mark Brown To: Trond Myklebust , Chuck Lever Cc: linux-nfs@vger.kernel.org, patches@opensource.wolfsonmicro.com, Mark Brown Subject: [PATCH] NFS: Fix handling of commmand line options for NFSROOT Date: Thu, 10 Mar 2011 15:43:18 +0000 Message-Id: <1299771798-29285-1-git-send-email-broonie@opensource.wolfsonmicro.com> X-Mailer: git-send-email 1.7.2.3 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 10 Mar 2011 15:43:25 +0000 (UTC) diff --git a/fs/nfs/nfsroot.c b/fs/nfs/nfsroot.c index 0bc654f..309df59 100644 --- a/fs/nfs/nfsroot.c +++ b/fs/nfs/nfsroot.c @@ -193,10 +193,15 @@ static int __init root_nfs_parse_options(char *incoming, char *exppath, * @incoming now points to the rest of the string; if it * contains something, append it to our root options buffer */ - if (incoming != NULL && *incoming != '\0') + if (incoming != NULL && *incoming != '\0') { + if (nfs_root_options[0] != '\0' && + root_nfs_cat(nfs_root_options, ",", + sizeof(nfs_root_options))) + return -1; if (root_nfs_cat(nfs_root_options, incoming, sizeof(nfs_root_options))) return -1; + } /* * Possibly prepare for more options to be appended