Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-1943 osd: ldiskfs osd to set param.ddp_inodespace
[fs/lustre-release.git]
/
lustre
/
utils
/
lustre_cfg.c
diff --git
a/lustre/utils/lustre_cfg.c
b/lustre/utils/lustre_cfg.c
index
4390b3e
..
d5edad2
100644
(file)
--- a/
lustre/utils/lustre_cfg.c
+++ b/
lustre/utils/lustre_cfg.c
@@
-1,6
+1,4
@@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@
-673,7
+671,7
@@
static void lprocfs_param_pattern(const char *cmd, const char *path, char *buf,
if (!warned) {
fprintf(stderr, "%s: specifying parameters via "
"full paths is deprecated.\n", cmd);
if (!warned) {
fprintf(stderr, "%s: specifying parameters via "
"full paths is deprecated.\n", cmd);
-#if LUSTRE_VERSION_CODE >= OBD_OCD_VERSION(2,
6,50,
0)
+#if LUSTRE_VERSION_CODE >= OBD_OCD_VERSION(2,
6, 50,
0)
#warning "remove deprecated full path tunable access"
#endif
warned = 1;
#warning "remove deprecated full path tunable access"
#endif
warned = 1;
@@
-902,22
+900,24
@@
int jt_lcfg_getparam(int argc, char **argv)
if (rc < 0 || rc >= argc)
return CMD_HELP;
if (rc < 0 || rc >= argc)
return CMD_HELP;
-
for (i = rc
; i < argc; i++) {
-
path = argv[i]
;
+
for (i = rc, rc = 0
; i < argc; i++) {
+
int rc2
;
-
clean_path(path)
;
+
path = argv[i]
;
-
lprocfs_param_pattern(argv[0], path, pattern, sizeof(pattern)
);
+
clean_path(path
);
- if (popt.only_path)
- rc = listparam_display(&popt, pattern);
- else
- rc = getparam_display(&popt, pattern);
- if (rc < 0)
- return rc;
- }
+ lprocfs_param_pattern(argv[0], path, pattern, sizeof(pattern));
- return 0;
+ if (popt.only_path)
+ rc2 = listparam_display(&popt, pattern);
+ else
+ rc2 = getparam_display(&popt, pattern);
+ if (rc2 < 0 && rc == 0)
+ rc = rc2;
+ }
+
+ return rc;
}
static int setparam_cmdline(int argc, char **argv, struct param_opts *popt)
}
static int setparam_cmdline(int argc, char **argv, struct param_opts *popt)
@@
-996,7
+996,9
@@
int jt_lcfg_setparam(int argc, char **argv)
if (rc < 0 || rc >= argc)
return CMD_HELP;
if (rc < 0 || rc >= argc)
return CMD_HELP;
- for (i = rc; i < argc; i++) {
+ for (i = rc, rc = 0; i < argc; i++) {
+ int rc2;
+
if ((value = strchr(argv[i], '=')) != NULL) {
/* format: set_param a=b */
*value = '\0';
if ((value = strchr(argv[i], '=')) != NULL) {
/* format: set_param a=b */
*value = '\0';
@@
-1016,13
+1018,13
@@
int jt_lcfg_setparam(int argc, char **argv)
lprocfs_param_pattern(argv[0], path, pattern, sizeof(pattern));
lprocfs_param_pattern(argv[0], path, pattern, sizeof(pattern));
- rc = setparam_display(&popt, pattern, value);
+ rc
2
= setparam_display(&popt, pattern, value);
path = NULL;
value = NULL;
path = NULL;
value = NULL;
-
if (rc <
0)
-
return rc
;
-
}
+
if (rc2 < 0 && rc ==
0)
+
rc = rc2
;
+ }
-
return 0
;
+
return rc
;
}
}