aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/dns_resolve.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-05-19 02:01:55 -0400
committerDavid S. Miller <davem@davemloft.net>2010-05-19 02:01:55 -0400
commit2ec8c6bb5d8f3a62a79f463525054bae1e3d4487 (patch)
treefa7f8400ac685fb52e96f64997c7c682fc2aa021 /fs/cifs/dns_resolve.c
parent7b39f90fabcf9e2af0cd79d0a60440d821e22b56 (diff)
parent537b60d17894b7c19a6060feae40299d7109d6e7 (diff)
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts: include/linux/mod_devicetable.h scripts/mod/file2alias.c
Diffstat (limited to 'fs/cifs/dns_resolve.c')
-rw-r--r--fs/cifs/dns_resolve.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/cifs/dns_resolve.c b/fs/cifs/dns_resolve.c
index 6f8a0e3fb25b..4db2c5e7283f 100644
--- a/fs/cifs/dns_resolve.c
+++ b/fs/cifs/dns_resolve.c
@@ -106,14 +106,14 @@ dns_resolve_server_name_to_ip(const char *unc, char **ip_addr)
106 /* search for server name delimiter */ 106 /* search for server name delimiter */
107 len = strlen(unc); 107 len = strlen(unc);
108 if (len < 3) { 108 if (len < 3) {
109 cFYI(1, ("%s: unc is too short: %s", __func__, unc)); 109 cFYI(1, "%s: unc is too short: %s", __func__, unc);
110 return -EINVAL; 110 return -EINVAL;
111 } 111 }
112 len -= 2; 112 len -= 2;
113 name = memchr(unc+2, '\\', len); 113 name = memchr(unc+2, '\\', len);
114 if (!name) { 114 if (!name) {
115 cFYI(1, ("%s: probably server name is whole unc: %s", 115 cFYI(1, "%s: probably server name is whole unc: %s",
116 __func__, unc)); 116 __func__, unc);
117 } else { 117 } else {
118 len = (name - unc) - 2/* leading // */; 118 len = (name - unc) - 2/* leading // */;
119 } 119 }
@@ -127,8 +127,8 @@ dns_resolve_server_name_to_ip(const char *unc, char **ip_addr)
127 name[len] = 0; 127 name[len] = 0;
128 128
129 if (is_ip(name)) { 129 if (is_ip(name)) {
130 cFYI(1, ("%s: it is IP, skipping dns upcall: %s", 130 cFYI(1, "%s: it is IP, skipping dns upcall: %s",
131 __func__, name)); 131 __func__, name);
132 data = name; 132 data = name;
133 goto skip_upcall; 133 goto skip_upcall;
134 } 134 }
@@ -138,7 +138,7 @@ dns_resolve_server_name_to_ip(const char *unc, char **ip_addr)
138 len = rkey->type_data.x[0]; 138 len = rkey->type_data.x[0];
139 data = rkey->payload.data; 139 data = rkey->payload.data;
140 } else { 140 } else {
141 cERROR(1, ("%s: unable to resolve: %s", __func__, name)); 141 cERROR(1, "%s: unable to resolve: %s", __func__, name);
142 goto out; 142 goto out;
143 } 143 }
144 144
@@ -148,10 +148,10 @@ skip_upcall:
148 if (*ip_addr) { 148 if (*ip_addr) {
149 memcpy(*ip_addr, data, len + 1); 149 memcpy(*ip_addr, data, len + 1);
150 if (!IS_ERR(rkey)) 150 if (!IS_ERR(rkey))
151 cFYI(1, ("%s: resolved: %s to %s", __func__, 151 cFYI(1, "%s: resolved: %s to %s", __func__,
152 name, 152 name,
153 *ip_addr 153 *ip_addr
154 )); 154 );
155 rc = 0; 155 rc = 0;
156 } else { 156 } else {
157 rc = -ENOMEM; 157 rc = -ENOMEM;