* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 2012, Intel Corporation.
+ * Copyright (c) 2011, 2014, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
nids = convert_hostnames(optarg);
if (!nids)
return 1;
- rc = add_param(mop->mo_ldd.ldd_params, PARAM_FAILNODE,
- nids);
+ rc = append_param(mop->mo_ldd.ldd_params,
+ PARAM_FAILNODE, nids, ':');
free(nids);
if (rc)
return rc;
}
/* LU-2374: check whether it is OST/MDT later */
mop->mo_ldd.ldd_svindex = atol(optarg);
+ if (mop->mo_ldd.ldd_svindex >= INDEX_UNASSIGNED) {
+ fprintf(stderr, "%s: wrong index %u. "
+ "Target index must be less than %u.\n",
+ progname, mop->mo_ldd.ldd_svindex,
+ INDEX_UNASSIGNED);
+ return 1;
+ }
mop->mo_ldd.ldd_flags &= ~LDD_F_NEED_INDEX;
break;
case 'k':
char *nids = convert_hostnames(optarg);
if (!nids)
return 1;
- rc = add_param(mop->mo_ldd.ldd_params, PARAM_MGSNODE,
- nids);
+ rc = append_param(mop->mo_ldd.ldd_params,
+ PARAM_MGSNODE, nids, ':');
free(nids);
if (rc)
return rc;
goto out;
}
- /* Stand alone MGS doesn't need a index */
+ /* Stand alone MGS doesn't need an index */
if (!IS_MDT(ldd) && IS_MGS(ldd)) {
#ifndef TUNEFS /* mkfs.lustre */
/* But if --index was specified flag an error */