If a user executed the following command "fcoeadm -i ethX" when ethX is not
currently created as an fcoe device the following message will be returned:

# fcoeadm -i eth2
fcoeadm: No fc_host found for eth2
fcoeadm: Invalid command options!
Usage: fcoeadm
         [-c|--create] <ethX>
         [-d|--destroy] <ethX>
         [-r|--reset] <ethX>
         [-i|--interface] [<ethX>]
         [-t|--target] [<ethX>]
         [-l|--lun] [<target port_id> [<lun_id>]]
         [-s|--stats] <ethX> [-n <interval>]
         [-h|--help]

The user may be confused by the inclusion of the text "invalid command 
options!".
If the output is "No fc_host found for eth2". It is sufficient and would
not confuse a user.

Signed-off-by: Steve Ma <[email protected]>
---

 fcoeadm.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fcoeadm.c b/fcoeadm.c
index 3ad2505..507592d 100644
--- a/fcoeadm.c
+++ b/fcoeadm.c
@@ -494,7 +494,7 @@ int main(int argc, char *argv[])
                                if (fcoeadm_validate_interface(
                                            opt_info->ifname,
                                            fchost, FCHOSTBUFLEN))
-                                       goto error;
+                                       goto done;
                        }
                        opt_info->a_flag = 1;
                        rc = fcoeadm_display_adapter_info(opt_info);
@@ -524,7 +524,7 @@ int main(int argc, char *argv[])
                                if (fcoeadm_validate_interface(
                                            opt_info->ifname,
                                            fchost, FCHOSTBUFLEN))
-                                       goto error;
+                                       goto done;
                        }
                        opt_info->t_flag = 1;
                        rc = fcoeadm_display_target_info(opt_info);
@@ -555,7 +555,7 @@ int main(int argc, char *argv[])
                                if (fcoeadm_validate_interface(
                                            opt_info->ifname,
                                            fchost, FCHOSTBUFLEN))
-                                       goto error;
+                                       goto done;
                        }
                        opt_info->s_flag = 1;
                        if (argv[optind] && !strncmp(argv[optind], "-n", 2))

_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel

Reply via email to