It's nice to be able to run the informational commands that don't talk to
fcoemon, even if fcoemon isn't running.  For instance, checking to see
which connects were left active after stopping fcoemon.  The commands that
need fcoemon will still fail if it's not running because there will not be
a listening client interface socket.

Plus, this just checks for the existence of a pid file.  It doesn't even
make sure there's a running process with that pid.  If fcoemon doesn't exit
cleanly, fcoeadm will still pass these checks.

Signed-off-by: Chris Leech <[email protected]>
---

 fcoeadm.c |   18 ------------------
 1 files changed, 0 insertions(+), 18 deletions(-)

diff --git a/fcoeadm.c b/fcoeadm.c
index 0498e27..ed8d433 100644
--- a/fcoeadm.c
+++ b/fcoeadm.c
@@ -65,19 +65,6 @@ static void fcoeadm_help(void)
               "\t [-h|--help]\n\n", progname);
 }
 
-static enum fcoe_err fcoeadm_check_fcoemon()
-{
-       int fd;
-
-       fd = open(CLIF_PID_FILE, O_RDWR, S_IRUSR | S_IWUSR);
-       if (fd < 0)
-               return ENOMONCONN;
-
-       close(fd);
-
-       return NOERR;
-}
-
 static enum fcoe_err fcoeadm_clif_request(struct clif_sock_info *clif_info,
                                          const struct clif_data *cmd,
                                          size_t cmd_len, char *reply,
@@ -237,11 +224,6 @@ int main(int argc, char *argv[])
                goto err;
        }
 
-       /* Check if fcoemon is running */
-       rc = fcoeadm_check_fcoemon();
-       if (rc)
-               goto err;
-
        opt = getopt_long(argc, argv, optstring, fcoeadm_opts, NULL);
        if (opt != -1) {
                switch (opt) {

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

Reply via email to