* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 2013, Intel Corporation.
+ * Copyright (c) 2011, 2014, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
}
/* write the lcfg in all logs for the given fs */
-int mgs_write_log_direct_all(const struct lu_env *env, struct mgs_device *mgs,
- struct fs_db *fsdb, struct mgs_target_info *mti,
- struct llog_cfg_rec *lcr, char *devname,
- char *comment, int server_only)
+static int mgs_write_log_direct_all(const struct lu_env *env,
+ struct mgs_device *mgs,
+ struct fs_db *fsdb,
+ struct mgs_target_info *mti,
+ struct llog_cfg_rec *lcr, char *devname,
+ char *comment, int server_only)
{
struct list_head log_list;
struct mgs_direntry *dirent, *n;
if (server_only && strstr(dirent->mde_name, "-client") != NULL)
goto next;
- if (strncmp(fsname, dirent->mde_name, len) != 0)
+ if (strlen(dirent->mde_name) <= len ||
+ strncmp(fsname, dirent->mde_name, len) != 0 ||
+ dirent->mde_name[len] != '-')
goto next;
CDEBUG(D_MGS, "Changing log %s\n", dirent->mde_name);
int mgs_nodemap_cmd(const struct lu_env *env, struct mgs_device *mgs,
enum lcfg_command_type cmd, const char *nodemap_name,
- const char *param)
+ char *param)
{
lnet_nid_t nid[2];
__u32 idmap[2];