summaryrefslogtreecommitdiffstats
path: root/fs/nfs.c
Commit message (Collapse)AuthorAgeFilesLines
* move parseopt to lib/Antony Pavlov2018-01-171-2/+1
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: nfs: pick up network interface bootargs parameterEnrico Jorns2016-09-221-0/+8
| | | | | | | | | | | | This adds the linux.bootarg device parameter from the network device of the current nfs connection and adds it to the nfs bootargs line. This allows booting from nfs without manually setting a ip=dhcp or ip=<ipaddr> option. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* convert users to %pI4Sascha Hauer2016-09-221-3/+1
| | | | | | | Convert users of ip_to_string() and print_IPaddr() to %pI4 and remove the now unused functions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* string: Fix (v)asprintf prototypesSascha Hauer2016-04-151-5/+4
| | | | | | | | | | Our asprintf and vasprintf have different prototypes than the glibc functions. This causes trouble when we want to share barebox code with userspace code. Change the prototypes for (v)asprintf to match the glibc prototypes. Since the current (v)asprintf are convenient to use change the existing functions to b(v)asprintf. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nfs: forward filesystem options to the kernel command lineJuergen Borleis2016-02-081-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | Using NFS in conjunction with boot spec and the feature to let Barebox auto generate a kernel command line must keep the options the NFS filesystem was mounted in Barebox. This patch extends the kernel command line parameter on demand if something different than the defaults are used. The command: barebox:/ boot nfs://myhost//root expands to the kernel command line: nfsroot=myhost:/root,v3,tcp while the command: barebox:/ boot nfs://myhost:2049//root expands now to the kernel command line: nfsroot=myhost:/root,v3,tcp,mountport=2049,port=2049 Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs/nfs.c: use SUNRPC_PORT remote port by defaultAntony Pavlov2015-07-201-1/+1
| | | | | | | pico_socket_connect() needs remote_port != 0. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs/nfs.c: use uint16_t for port numbersAntony Pavlov2015-07-201-2/+2
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: nfs: Implement Linux rootargSascha Hauer2015-06-181-0/+24
| | | | | | | Add the root= parameter for NFS filesystems. We currently hardcode v3 and tcp which probably needs to become configurable at some point. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: rename inode member of struct filep to privSascha Hauer2015-03-091-4/+4
| | | | | | | Because that's what it is. 'inode' will become confusing once we support real inodes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sizes.h: move include/sizes.h to include/linux/sizes.hMasahiro Yamada2015-01-081-1/+1
| | | | | | | | | | | | | | This file originates in Linux. Linux has it under include/linux/ directory since commit dccd2304cc90. Let's move it to the same place as well in barebox. This commit was generated by the following commands: find -name '*.[chS]' | xargs sed -i -e 's:<sizes.h>:<linux/sizes.h>:' git mv include/sizes.h include/linux/ Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nfs: parse nfsport and mount port from file system optionsUwe Kleine-König2014-02-101-11/+21
| | | | | | | | | | | | | This allows to use unfs3 on the server side which doesn't integrate into portmap/rpcbind which results in the port not being impossible to lookup via rpc calls to the portmap program. Use it like: mount -t nfs -o port=2703,mountport=2703 192.168.77.157:/root /mnt/nfs Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nfs: switch to nfs3Uwe Kleine-König2014-02-101-269/+625
| | | | | | | This was tested against nfs-kernel-server and unfs3. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nfs: drop an unneeded variable from nfs_do_open()Uwe Kleine-König2014-02-101-10/+8
| | | | | | | | While at it also fix the type of flen holding a string length (int -> size_t). Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nfs: simplify rpc_lookup_reqUwe Kleine-König2014-02-101-18/+6
| | | | | | | | Instead of letting rpc_lookup_req set mount_port and nfs_port, let it return the port found and let the caller use that information. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nfs: shorten and simplify rpc_add_credentials a bitUwe Kleine-König2014-02-101-21/+5
| | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nfs: skip over stale rpc packetsUwe Kleine-König2014-02-101-1/+6
| | | | | | | | | | When a former transaction was aborted by hitting Ctrl-C the old reply might still hang in the ethernet controller making all further transactions fail. So just skip over old replies. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nfs: fix mount prog version in portmap lookupUwe Kleine-König2014-02-101-1/+1
| | | | | | | | We're speaking rpc mount version 2 (i.e. the same version as the implemented nfs protocol), so also specify that in the lookup. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-171-3/+0
| | | | | | | The FSF address has changed in the past. Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs/nfs: fix read when size < 1024Jean-Christophe PLAGNIOL-VILLARD2012-09-071-1/+5
| | | | | | | Currently we always request 1024. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* nfs: add readlink supportJean-Christophe PLAGNIOL-VILLARD2012-09-051-28/+58
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* use loff_t for file offsetsSascha Hauer2012-06-301-1/+1
| | | | | | | This is a first step for 64bit file support: Make the file sizes/offsets 64bit. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: Add NFS supportSascha Hauer2012-05-141-0/+1054
This patch adds readonly NFS support. Currently no links are supported. This is based on the previous U-Boot/NetBSD based code and some Kernel bits. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>