return 0;
}
- strlcpy(buf, str, sizeof(buf));
+ strscpy(buf, str, sizeof(buf));
bulk = strchr(buf, '-');
if (bulk)
OBD_ALLOC_PTR(conf_tgt);
if (conf_tgt) {
- strlcpy(conf_tgt->sct_name, name, sizeof(conf_tgt->sct_name));
+ strscpy(conf_tgt->sct_name, name, sizeof(conf_tgt->sct_name));
sptlrpc_rule_set_init(&conf_tgt->sct_rset);
list_add(&conf_tgt->sct_list, &conf->sc_tgts);
}
OBD_ALLOC_PTR(conf);
if (conf == NULL)
return NULL;
-
- if (strlcpy(conf->sc_fsname, fsname, sizeof(conf->sc_fsname)) >=
- sizeof(conf->sc_fsname)) {
+ if (strscpy(conf->sc_fsname, fsname, sizeof(conf->sc_fsname)) < 0) {
OBD_FREE_PTR(conf);
return NULL;
}
* is a actual filesystem.
*/
if (server_name2fsname(target, fsname, NULL))
- strlcpy(fsname, target, sizeof(fsname));
+ strscpy(fsname, target, sizeof(fsname));
rc = sptlrpc_parse_rule(param, &rule);
if (rc)