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
- a trivial comment update.
[fs/lustre-release.git]
/
lnet
/
utils
/
ptlctl.c
diff --git
a/lnet/utils/ptlctl.c
b/lnet/utils/ptlctl.c
index
f6b7f40
..
7c4c0cf
100644
(file)
--- a/
lnet/utils/ptlctl.c
+++ b/
lnet/utils/ptlctl.c
@@
-1,7
+1,7
@@
/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
* vim:expandtab:shiftwidth=8:tabstop=8:
*
/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
* vim:expandtab:shiftwidth=8:tabstop=8:
*
- * Copyright
(C) 2001, 2002 Cluster File Systems, Inc.
+ * Copyright
2008 Sun Microsystems, Inc. All rights reserved
*
* This file is part of Portals, http://www.sf.net/projects/lustre/
*
*
* This file is part of Portals, http://www.sf.net/projects/lustre/
*
@@
-22,10
+22,8
@@
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
-#include <lnet/api-support.h>
#include <lnet/lnetctl.h>
#include <lnet/lnetctl.h>
-
-#include "parser.h"
+#include <libcfs/libcfsutil.h>
command_t list[] = {
command_t list[] = {
@@
-63,14
+61,25
@@
command_t list[] = {
int main(int argc, char **argv)
{
int main(int argc, char **argv)
{
- if (ptl_initialize(argc, argv) < 0)
- exit(1);
+ int rc = 0;
+
+ rc = libcfs_arch_init();
+ if (rc < 0)
+ return rc;
+
+ rc = ptl_initialize(argc, argv);
+ if (rc < 0)
+ goto errorout;
Parser_init("ptlctl > ", list);
Parser_init("ptlctl > ", list);
- if (argc > 1)
- return Parser_execarg(argc - 1, &argv[1], list);
+ if (argc > 1) {
+ rc = Parser_execarg(argc - 1, &argv[1], list);
+ goto errorout;
+ }
Parser_commands();
Parser_commands();
- return 0;
+errorout:
+ libcfs_arch_cleanup();
+ return rc;
}
}