* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 2014, Intel Corporation.
+ * Copyright (c) 2011, 2015, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
struct sptlrpc_rule *r;
char dirbuf[10];
char flvrbuf[40];
- char *net;
+ char net[LNET_NIDSTR_SIZE] = "default";
int i;
for (i = 0; i < rset->srs_nrule; i++) {
r = &rset->srs_rules[i];
- if (r->sr_netid == LNET_NIDNET(LNET_NID_ANY))
- net = "default";
- else
- net = libcfs_net2str(r->sr_netid);
+ if (r->sr_netid != LNET_NIDNET(LNET_NID_ANY))
+ libcfs_net2str_r(r->sr_netid, net, sizeof(net));
if (r->sr_from == LUSTRE_SP_ANY && r->sr_to == LUSTRE_SP_ANY)
dirbuf[0] = '\0';
return 0;
}
-static ssize_t mgs_live_seq_write(struct file *file, const char *buf,
+static ssize_t mgs_live_seq_write(struct file *file, const char __user *buf,
size_t len, loff_t *off)
{
struct seq_file *seq = file->private_data;