From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WBsys-00006T-9z for barebox@lists.infradead.org; Fri, 07 Feb 2014 21:29:04 +0000 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Fri, 7 Feb 2014 22:28:13 +0100 Message-Id: <1391808493-27328-11-git-send-email-u.kleine-koenig@pengutronix.de> In-Reply-To: <1391808493-27328-1-git-send-email-u.kleine-koenig@pengutronix.de> References: <1391808493-27328-1-git-send-email-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH v2 11/11] nfs: parse nfsport and mount port from file system options To: barebox@lists.infradead.org VGhpcyBhbGxvd3MgdG8gdXNlIHVuZnMzIG9uIHRoZSBzZXJ2ZXIgc2lkZSB3aGljaCBkb2Vzbid0 IGludGVncmF0ZSBpbnRvCnBvcnRtYXAvcnBjYmluZCB3aGljaCByZXN1bHRzIGluIHRoZSBwb3J0 IG5vdCBiZWluZyBpbXBvc3NpYmxlIHRvIGxvb2t1cAp2aWEgcnBjIGNhbGxzIHRvIHRoZSBwb3J0 bWFwIHByb2dyYW0uCgpVc2UgaXQgbGlrZToKCgltb3VudCAtdCBuZnMgLW8gcG9ydD0yNzAzLG1v dW50cG9ydD0yNzAzIDE5Mi4xNjguNzcuMTU3Oi9yb290IC9tbnQvbmZzCgpTaWduZWQtb2ZmLWJ5 OiBVd2UgS2xlaW5lLUvDtm5pZyA8dS5rbGVpbmUta29lbmlnQHBlbmd1dHJvbml4LmRlPgotLS0K Ck5vdGVzOgogICAgbW92ZSBwYXJzZW9wdF9odSBpbnRv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