Ticket #8306: 0001-Conditionally-define-DEBUG-if-it-s-not-already-defin.patch

File 0001-Conditionally-define-DEBUG-if-it-s-not-already-defin.patch, 1.5 KB (added by umccullough, 12 years ago)
  • src/add-ons/kernel/bus_managers/firewire/fwdebug.h

    From 4c07ec695fcc24d67a0d095827a34cb7f5a1f5e1 Mon Sep 17 00:00:00 2001
    From: Urias McCullough <umccullough@gmail.com>
    Date: Sat, 28 Jan 2012 17:37:31 -0800
    Subject: [PATCH 1/5] Conditionally define DEBUG if it's not already defined in NBD
    
    * This allows building with DEBUG=2 and avoiding warnings.
    ---
     src/add-ons/kernel/bus_managers/firewire/fwdebug.h |    5 ++++-
     src/add-ons/kernel/drivers/disk/virtual/nbd/nbd.c  |    5 +++--
     2 files changed, 7 insertions(+), 3 deletions(-)
    
    diff --git a/src/add-ons/kernel/bus_managers/firewire/fwdebug.h b/src/add-ons/kernel/bus_managers/firewire/fwdebug.h
    index b7131a3..37eec62 100644
    a b  
    88#define __FWDEBUG_H
    99
    1010#include <KernelExport.h>
    11 #define DEBUG 1
     11
     12#ifndef DEBUG
     13    #define DEBUG 1
     14#endif
    1215
    1316#ifdef DEBUG
    1417    #define TRACE(a...) dprintf("firewire: " a)
  • src/add-ons/kernel/drivers/disk/virtual/nbd/nbd.c

    diff --git a/src/add-ons/kernel/drivers/disk/virtual/nbd/nbd.c b/src/add-ons/kernel/drivers/disk/virtual/nbd/nbd.c
    index d2e5e7b..9d4431a 100644
    a b  
    2222#include <ksocket.h>
    2323#include <netinet/in.h>
    2424
    25 //#define DEBUG 1
    2625
    2726/* on the first open(), open ourselves for some seconds,
    2827 * to avoid trying to reconnect and failing on a 2nd open,
     
    5251#define mutex_unlock UNLOCK
    5352#endif
    5453
    55 #define DEBUG 1
     54#ifndef DEBUG
     55    #define DEBUG 1
     56#endif
    5657
    5758#include "nbd.h"
    5859