From 32437d76db1580a10456e63f5cd27f0175138fbf Mon Sep 17 00:00:00 2001 From: rread Date: Fri, 7 Nov 2003 06:19:32 +0000 Subject: [PATCH] Remind the user to use 'cfg_device' to set target device for config commands. --- lustre/utils/lustre_cfg.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lustre/utils/lustre_cfg.c b/lustre/utils/lustre_cfg.c index 6709552..0be3b3f 100644 --- a/lustre/utils/lustre_cfg.c +++ b/lustre/utils/lustre_cfg.c @@ -146,6 +146,13 @@ int jt_lcfg_setup(int argc, char **argv) struct lustre_cfg lcfg; int rc; + if (lcfg_devname == NULL) { + fprintf(stderr, "%s: please use 'cfg_device name' to set the " + "device name for config commands.\n", + jt_cmdname(argv[0])); + return -EINVAL; + } + LCFG_INIT(lcfg, LCFG_SETUP, lcfg_devname); if (argc > 5) @@ -181,6 +188,13 @@ int jt_obd_detach(int argc, char **argv) struct lustre_cfg lcfg; int rc; + if (lcfg_devname == NULL) { + fprintf(stderr, "%s: please use 'cfg_device name' to set the " + "device name for config commands.\n", + jt_cmdname(argv[0])); + return -EINVAL; + } + LCFG_INIT(lcfg, LCFG_DETACH, lcfg_devname); if (argc != 1) @@ -203,6 +217,13 @@ int jt_obd_cleanup(int argc, char **argv) int flag_cnt = 0, n; int rc; + if (lcfg_devname == NULL) { + fprintf(stderr, "%s: please use 'cfg_device name' to set the " + "device name for config commands.\n", + jt_cmdname(argv[0])); + return -EINVAL; + } + LCFG_INIT(lcfg, LCFG_CLEANUP, lcfg_devname); if (argc < 1 || argc > 3) -- 1.8.3.1