cluster/dlm/tool main.c
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL4
Changes by: teigland at sourceware.org 2007-07-02 20:07:17
Modified files:
dlm/tool : main.c
Log message:
Separate lockdump (compact, one lock per line) from lockdebug (verbose output as seen from proc).
dlm/tool/main.c +9 -2
@@ -31,6 +31,7 @@#define OP_LEAVE 2#define OP_SPACES 3#define OP_LOCKDUMP 4 +#define OP_LOCKDEBUG 5static char *prog_name;static char *lsname;
@@ -44,7 +45,7 @@ {printf ("Usage:\n" );printf ("\n" ); -printf ("%s [options] [join|leave|spaces|lockdump]\n" , prog_name); +printf ("%s [options] [join|leave|spaces|lockdump|lockdebug]\n" , prog_name);printf ("\n" );printf ("Options:\n" );printf (" -v Verbose output, extra event information\n" );
@@ -131,6 +132,11 @@ operation =OP_LOCKDUMP ; opt_ind = optind +1 ;break ; + }else if (!strncmp (argv[optind],"lockdebug" ,9 ) && + (strlen (argv[optind]) ==9 )) { + operation =OP_LOCKDEBUG ; + opt_ind = optind +1 ; +break ; } optind++; }
@@ -343,7 +349,7 @@ file =fopen (path,"r" );while (fgets (line,PROC_LINE_MAX , file)) { -if (verbose) { +if (operation ==OP_LOCKDEBUG ) {printf ("%s" , line);continue ; }
@@ -411,6 +417,7 @@break ;case OP_LOCKDUMP : +case OP_LOCKDEBUG :do_lockdump (lsname);break ; }