Make a thorough pass through all variables and function names contained
within nfs.c and remove CamelCase and improve naming.
Signed-off-by: Joe Hershberger
---
Changes in v2: None
net/net.c | 4 +-
net/nfs.c | 173 +++---
net/nfs.h | 2 +-
3 files changed, 79 insertions(+), 100 deletions(-)
diff --git a/net/net.c b/net/net.c
index f740052..bb67884 100644
--- a/net/net.c
+++ b/net/net.c
@@ -235,7 +235,7 @@ void net_auto_load(void)
/*
* Use NFS to load the bootfile.
*/
- NfsStart();
+ nfs_start();
return;
}
#endif
@@ -407,7 +407,7 @@ restart:
#endif
#if defined(CONFIG_CMD_NFS)
case NFS:
- NfsStart();
+ nfs_start();
break;
#endif
#if defined(CONFIG_CMD_CDP)
diff --git a/net/nfs.c b/net/nfs.c
index 6899265..4357cc3 100644
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -52,11 +52,11 @@ static char filefh[NFS_FHSIZE]; /* file handle of kernel
image */
static enum net_loop_state nfs_download_state;
static struct in_addr nfs_server_ip;
-static int NfsSrvMountPort;
-static int NfsSrvNfsPort;
-static int NfsOurPort;
-static int NfsTimeoutCount;
-static int NfsState;
+static int nfs_server_mount_port;
+static int nfs_server_port;
+static int nfs_our_port;
+static int nfs_timeout_count;
+static int nfs_state;
#define STATE_PRCLOOKUP_PROG_MOUNT_REQ 1
#define STATE_PRCLOOKUP_PROG_NFS_REQ 2
#define STATE_MOUNT_REQ3
@@ -70,8 +70,7 @@ static char *nfs_filename;
static char *nfs_path;
static char nfs_path_buff[2048];
-static inline int
-store_block(uchar *src, unsigned offset, unsigned len)
+static inline int store_block(uchar *src, unsigned offset, unsigned len)
{
ulong newsize = offset + len;
#ifdef CONFIG_SYS_DIRECT_FLASH_NFS
@@ -105,8 +104,7 @@ store_block(uchar *src, unsigned offset, unsigned len)
return 0;
}
-static char*
-basename(char *path)
+static char *basename(char *path)
{
char *fname;
@@ -121,8 +119,7 @@ basename(char *path)
return fname;
}
-static char*
-dirname(char *path)
+static char *dirname(char *path)
{
char *fname;
@@ -178,8 +175,7 @@ static long *rpc_add_credentials(long *p)
/**
RPC_LOOKUP - Lookup RPC Port numbers
**/
-static void
-rpc_req(int rpc_prog, int rpc_proc, uint32_t *data, int datalen)
+static void rpc_req(int rpc_prog, int rpc_proc, uint32_t *data, int datalen)
{
struct rpc_t pkt;
unsigned long id;
@@ -207,19 +203,18 @@ rpc_req(int rpc_prog, int rpc_proc, uint32_t *data, int
datalen)
if (rpc_prog == PROG_PORTMAP)
sport = SUNRPC_PORT;
else if (rpc_prog == PROG_MOUNT)
- sport = NfsSrvMountPort;
+ sport = nfs_server_mount_port;
else
- sport = NfsSrvNfsPort;
+ sport = nfs_server_port;
net_send_udp_packet(net_server_ethaddr, nfs_server_ip, sport,
- NfsOurPort, pktlen);
+ nfs_our_port, pktlen);
}
/**
RPC_LOOKUP - Lookup RPC Port numbers
**/
-static void
-rpc_lookup_req(int prog, int ver)
+static void rpc_lookup_req(int prog, int ver)
{
uint32_t data[16];
@@ -236,8 +231,7 @@ rpc_lookup_req(int prog, int ver)
/**
NFS_MOUNT - Mount an NFS Filesystem
**/
-static void
-nfs_mount_req(char *path)
+static void nfs_mount_req(char *path)
{
uint32_t data[1024];
uint32_t *p;
@@ -263,14 +257,13 @@ nfs_mount_req(char *path)
/**
NFS_UMOUNTALL - Unmount all our NFS Filesystems on the Server
**/
-static void
-nfs_umountall_req(void)
+static void nfs_umountall_req(void)
{
uint32_t data[1024];
uint32_t *p;
int len;
- if ((NfsSrvMountPort == -1) || (!fs_mounted))
+ if ((nfs_server_mount_port == -1) || (!fs_mounted))
/* Nothing mounted, nothing to umount */
return;
@@ -289,8 +282,7 @@ nfs_umountall_req(void)
* In case of successful readlink(), the dirname is manipulated,
* so that inside the nfs() function a recursion can be done.
**/
-static void
-nfs_readlink_req(void)
+static void nfs_readlink_req(void)
{
uint32_t data[1024];