]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: Always print basic info for nfs, just like tftp
authorJoe Hershberger <joe.hershberger@ni.com>
Wed, 4 Jul 2018 00:22:56 +0000 (19:22 -0500)
committerJoe Hershberger <joe.hershberger@ni.com>
Thu, 26 Jul 2018 19:08:19 +0000 (14:08 -0500)
nfs was only printing basic info about the transfer in the case of a
DEBUG build. Print the same level of detail as tftp always.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
net/nfs.c

index 7e8af28e9f564b7d6712fc3eedb156da0bd33a4d..86dfe9a494a79fbb61b94c22b96f17da92516fec 100644 (file)
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -533,7 +533,7 @@ static int nfs_lookup_reply(uchar *pkt, unsigned len)
                        switch (ntohl(rpc_pkt.u.reply.data[0])) {
                        /* Minimal supported NFS version */
                        case 3:
-                               debug("*** Waring: NFS version not supported: Requested: V%d, accepted: min V%d - max V%d\n",
+                               debug("*** Warning: NFS version not supported: Requested: V%d, accepted: min V%d - max V%d\n",
                                      (supported_nfs_versions & NFSV2_FLAG) ?
                                                2 : 3,
                                      ntohl(rpc_pkt.u.reply.data[0]),
@@ -855,7 +855,7 @@ void nfs_start(void)
 
        if (nfs_path == NULL) {
                net_set_state(NETLOOP_FAIL);
-               debug("*** ERROR: Fail allocate memory\n");
+               printf("*** ERROR: Fail allocate memory\n");
                return;
        }
 
@@ -866,8 +866,8 @@ void nfs_start(void)
                        (net_ip.s_addr >> 16) & 0xFF,
                        (net_ip.s_addr >> 24) & 0xFF);
 
-               debug("*** Warning: no boot file name; using '%s'\n",
-                     nfs_path);
+               printf("*** Warning: no boot file name; using '%s'\n",
+                      nfs_path);
        } else {
                char *p = net_boot_file_name;
 
@@ -885,10 +885,10 @@ void nfs_start(void)
        nfs_filename = basename(nfs_path);
        nfs_path     = dirname(nfs_path);
 
-       debug("Using %s device\n", eth_get_name());
+       printf("Using %s device\n", eth_get_name());
 
-       debug("File transfer via NFS from server %pI4; our IP address is %pI4",
-             &nfs_server_ip, &net_ip);
+       printf("File transfer via NFS from server %pI4; our IP address is %pI4",
+              &nfs_server_ip, &net_ip);
 
        /* Check if we need to send across this subnet */
        if (net_gateway.s_addr && net_netmask.s_addr) {
@@ -898,17 +898,17 @@ void nfs_start(void)
                our_net.s_addr = net_ip.s_addr & net_netmask.s_addr;
                server_net.s_addr = nfs_server_ip.s_addr & net_netmask.s_addr;
                if (our_net.s_addr != server_net.s_addr)
-                       debug("; sending through gateway %pI4",
-                             &net_gateway);
+                       printf("; sending through gateway %pI4",
+                              &net_gateway);
        }
-       debug("\nFilename '%s/%s'.", nfs_path, nfs_filename);
+       printf("\nFilename '%s/%s'.", nfs_path, nfs_filename);
 
        if (net_boot_file_expected_size_in_blocks) {
-               debug(" Size is 0x%x Bytes = ",
-                     net_boot_file_expected_size_in_blocks << 9);
+               printf(" Size is 0x%x Bytes = ",
+                      net_boot_file_expected_size_in_blocks << 9);
                print_size(net_boot_file_expected_size_in_blocks << 9, "");
        }
-       debug("\nLoad address: 0x%lx\nLoading: *\b", load_addr);
+       printf("\nLoad address: 0x%lx\nLoading: *\b", load_addr);
 
        net_set_timeout_handler(nfs_timeout, nfs_timeout_handler);
        net_set_udp_handler(nfs_handler);