/*
 * tools/lib/debug.c
 *
 * Copyright (C) 1997 - 2000  Heinz Mauelshagen, Germany
 *
 * June 1997
 *
 *
 * This LVM library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This LVM library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this LVM library; if not, write to the Free
 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
 * MA 02111-1307, USA
 *
 */

#ifdef DEBUG
#include <liblvm.h>

void debug ( const char *fmt, ...) {

   if ( opt_d > 0) {
      char buf[NAME_LEN];
      va_list val;

      va_start ( val, fmt);
      vsprintf ( buf, fmt, val);
      va_end ( val);
      printf ( buf);
      fflush ( stdout);
   }
   
   return;
}
#endif
