ceph_common.c (d0034a7a4ac7fae708146ac0059b9c47a1543f0d) | ceph_common.c (2d7c86a8f9cdce1408c4f3c69d94d007eff2f179) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2 3#include <linux/ceph/ceph_debug.h> 4#include <linux/backing-dev.h> 5#include <linux/ctype.h> 6#include <linux/fs.h> 7#include <linux/inet.h> 8#include <linux/in6.h> --- 408 unchanged lines hidden (view full) --- 417 418out_key: 419 key_put(ukey); 420out: 421 return err; 422} 423 424int ceph_parse_mon_ips(const char *buf, size_t len, struct ceph_options *opt, | 1// SPDX-License-Identifier: GPL-2.0-only 2 3#include <linux/ceph/ceph_debug.h> 4#include <linux/backing-dev.h> 5#include <linux/ctype.h> 6#include <linux/fs.h> 7#include <linux/inet.h> 8#include <linux/in6.h> --- 408 unchanged lines hidden (view full) --- 417 418out_key: 419 key_put(ukey); 420out: 421 return err; 422} 423 424int ceph_parse_mon_ips(const char *buf, size_t len, struct ceph_options *opt, |
425 struct fc_log *l) | 425 struct fc_log *l, char delim) |
426{ 427 struct p_log log = {.prefix = "libceph", .log = l}; 428 int ret; 429 | 426{ 427 struct p_log log = {.prefix = "libceph", .log = l}; 428 int ret; 429 |
430 /* ip1[:port1][,ip2[:port2]...] */ | 430 /* ip1[:port1][<delim>ip2[:port2]...] */ |
431 ret = ceph_parse_ips(buf, buf + len, opt->mon_addr, CEPH_MAX_MON, | 431 ret = ceph_parse_ips(buf, buf + len, opt->mon_addr, CEPH_MAX_MON, |
432 &opt->num_mon); | 432 &opt->num_mon, delim); |
433 if (ret) { 434 error_plog(&log, "Failed to parse monitor IPs: %d", ret); 435 return ret; 436 } 437 438 return 0; 439} 440EXPORT_SYMBOL(ceph_parse_mon_ips); --- 9 unchanged lines hidden (view full) --- 450 dout("%s fs_parse '%s' token %d\n", __func__, param->key, token); 451 if (token < 0) 452 return token; 453 454 switch (token) { 455 case Opt_ip: 456 err = ceph_parse_ips(param->string, 457 param->string + param->size, | 433 if (ret) { 434 error_plog(&log, "Failed to parse monitor IPs: %d", ret); 435 return ret; 436 } 437 438 return 0; 439} 440EXPORT_SYMBOL(ceph_parse_mon_ips); --- 9 unchanged lines hidden (view full) --- 450 dout("%s fs_parse '%s' token %d\n", __func__, param->key, token); 451 if (token < 0) 452 return token; 453 454 switch (token) { 455 case Opt_ip: 456 err = ceph_parse_ips(param->string, 457 param->string + param->size, |
458 &opt->my_addr, 459 1, NULL); | 458 &opt->my_addr, 1, NULL, ','); |
460 if (err) { 461 error_plog(&log, "Failed to parse ip: %d", err); 462 return err; 463 } 464 opt->flags |= CEPH_OPT_MYIP; 465 break; 466 467 case Opt_fsid: --- 469 unchanged lines hidden --- | 459 if (err) { 460 error_plog(&log, "Failed to parse ip: %d", err); 461 return err; 462 } 463 opt->flags |= CEPH_OPT_MYIP; 464 break; 465 466 case Opt_fsid: --- 469 unchanged lines hidden --- |