[haiku-commits] r40928 - in haiku/branches/features/package-management: headers/private/libroot src/add-ons/kernel/debugger/hangman src/add-ons/kernel/drivers/audio/ac97/auich src/add-ons/kernel/drivers/audio/ac97/auvia src/add-ons/kernel/drivers/audio/ac97/es1370 ...

  • From: zooey@xxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 13 Mar 2011 15:34:55 +0100 (CET)

Author: zooey
Date: 2011-03-13 15:34:54 +0100 (Sun, 13 Mar 2011)
New Revision: 40928
Changeset: http://dev.haiku-os.org/changeset/40928

Modified:
   
haiku/branches/features/package-management/headers/private/libroot/directories.h
   
haiku/branches/features/package-management/src/add-ons/kernel/debugger/hangman/hangman.c
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/auich/Jamfile
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/auich/debug.c
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/auvia/Jamfile
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/auvia/debug.c
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/es1370/Jamfile
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/es1370/debug.c
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/ich/Jamfile
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/ich/debug.c
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/echo/24/Jamfile
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/echo/3g/Jamfile
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/echo/debug.c
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/echo/gals/Jamfile
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/echo/indigo/Jamfile
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/emuxki/Jamfile
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/emuxki/debug.c
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/module_driver/Jamfile
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/module_driver/audio_module_driver.c
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/graphics/matrox/Jamfile
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/graphics/matrox/driver.c
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/graphics/neomagic/Jamfile
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/graphics/neomagic/driver.c
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/graphics/nvidia/Jamfile
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/graphics/nvidia/driver.c
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/graphics/nvidia_gpgpu/Jamfile
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/graphics/nvidia_gpgpu/driver.c
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/graphics/skeleton/Jamfile
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/graphics/skeleton/driver.c
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/graphics/via/Jamfile
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/graphics/via/driver.c
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/network/sis900/Jamfile
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/network/sis900/device.c
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/network/wimax/usb_beceemwmx/Driver.h
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/network/wimax/usb_beceemwmx/Jamfile
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/ports/pc_serial/Jamfile
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/ports/pc_serial/Tracing.cpp
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/ports/usb_serial/Jamfile
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/ports/usb_serial/Tracing.cpp
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/video/usb_vision/Jamfile
   
haiku/branches/features/package-management/src/add-ons/kernel/drivers/video/usb_vision/tracing.c
   
haiku/branches/features/package-management/src/add-ons/kernel/file_systems/userlandfs/kernel_add_on/Jamfile
   
haiku/branches/features/package-management/src/add-ons/kernel/file_systems/userlandfs/shared/driver_settings.c
   
haiku/branches/features/package-management/src/add-ons/kernel/generic/mpu401/Jamfile
   
haiku/branches/features/package-management/src/add-ons/kernel/generic/mpu401/debug.c
   
haiku/branches/features/package-management/src/add-ons/kernel/network/ppp/shared/libkernelppp/Jamfile
   
haiku/branches/features/package-management/src/add-ons/kernel/network/ppp/shared/libkernelppp/headers/PPPDefs.h
Log:
* added constant for common log directory
* adjusted all kernel add-ons to use directory constants instead of
  hardcoded paths

Modified: 
haiku/branches/features/package-management/headers/private/libroot/directories.h
===================================================================
--- 
haiku/branches/features/package-management/headers/private/libroot/directories.h
    2011-03-13 10:42:18 UTC (rev 40927)
+++ 
haiku/branches/features/package-management/headers/private/libroot/directories.h
    2011-03-13 14:34:54 UTC (rev 40928)
@@ -48,6 +48,7 @@
 #define kCommonSettingsDirectory               "/boot/common/settings"
 #define kCommonTempDirectory                   "/boot/common/cache/tmp"
 #define kCommonVarDirectory                    "/boot/common/var"
+#define kCommonLogDirectory                    "/boot/common/var/log"
 #define kCommonNonpackagedAddonsDirectory      
"/boot/common/non-packaged/add-ons"
 #define kCommonNonpackagedBinDirectory         "/boot/common/non-packaged/bin"
 #define kCommonNonpackagedLibDirectory         "/boot/common/non-packaged/lib"

Modified: 
haiku/branches/features/package-management/src/add-ons/kernel/debugger/hangman/hangman.c
===================================================================
--- 
haiku/branches/features/package-management/src/add-ons/kernel/debugger/hangman/hangman.c
    2011-03-13 10:42:18 UTC (rev 40927)
+++ 
haiku/branches/features/package-management/src/add-ons/kernel/debugger/hangman/hangman.c
    2011-03-13 14:34:54 UTC (rev 40928)
@@ -5,6 +5,7 @@
 #      include <debug.h>
 #endif
 
+#include <directories.h>
 #include <OS.h>
 #include <image.h>
 #include <ctype.h>
@@ -26,7 +27,7 @@
 #define MAX_FAILS_BEFORE_BSOD 0
 
 #ifdef __HAIKU__
-#      define FORTUNE_FILE "/boot/system/data/fortunes/Fortunes"
+#      define FORTUNE_FILE kSystemDataDirectory "/fortunes/Fortunes"
 #else
 #      define FORTUNE_FILE "/etc/fortunes/default"
 #endif

Modified: 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/auich/Jamfile
===================================================================
--- 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/auich/Jamfile
      2011-03-13 10:42:18 UTC (rev 40927)
+++ 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/auich/Jamfile
      2011-03-13 14:34:54 UTC (rev 40928)
@@ -1,7 +1,7 @@
 SubDir HAIKU_TOP src add-ons kernel drivers audio ac97 auich ;
 
 SetSubDirSupportedPlatformsBeOSCompatible ;
-UsePrivateHeaders media ;
+UsePrivateHeaders libroot media ;
 SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) ] ;
 SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) ] ;
 

Modified: 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/auich/debug.c
===================================================================
--- 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/auich/debug.c
      2011-03-13 10:42:18 UTC (rev 40927)
+++ 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/auich/debug.c
      2011-03-13 14:34:54 UTC (rev 40928)
@@ -7,83 +7,94 @@
  * Copyright (c) 2002, Marcus Overhagen <marcus@xxxxxxxxxxxx>
  *
  * All rights reserved.
- * Redistribution and use in source and binary forms, with or without 
modification, 
+ * Redistribution and use in source and binary forms, with or without 
modification,
  * are permitted provided that the following conditions are met:
  *
- * - Redistributions of source code must retain the above copyright notice, 
+ * - Redistributions of source code must retain the above copyright notice,
  *   this list of conditions and the following disclaimer.
  * - Redistributions in binary form must reproduce the above copyright notice,
- *   this list of conditions and the following disclaimer in the documentation 
+ *   this list of conditions and the following disclaimer in the documentation
  *   and/or other materials provided with the distribution.
  *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
AND 
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
IMPLIED 
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 
FOR 
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
DAMAGES 
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
SERVICES; LOSS 
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
(INCLUDING 
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE, 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 
FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
(INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
+
+
 #include <KernelExport.h>
+
 #include <stdio.h>
 #include <fcntl.h>
 #include <unistd.h>
+
+#include <directories.h>
 #include <OS.h>
+
 #include "debug.h"
 #include "auich.h"
 
+
 #if DEBUG > 0
-static const char * logfile="/boot/home/auich.log";
+static const char *logfile = kCommonLogDirectory "/auich.log";
 static sem_id loglock;
 #endif
 
-void debug_printf(const char *text,...);
-void log_printf(const char *text,...);
+
+void debug_printf(const char *text, ...);
+void log_printf(const char *text, ...);
 void log_create(void);
 
-void debug_printf(const char *text,...)
+
+void debug_printf(const char *text, ...)
 {
        char buf[1024];
        va_list ap;
 
-       va_start(ap,text);
-       vsprintf(buf,text,ap);
+       va_start(ap, text);
+       vsprintf(buf, text, ap);
        va_end(ap);
 
-       dprintf(DRIVER_NAME ": %s",buf);
+       dprintf(DRIVER_NAME ": %s", buf);
 }
 
+
 void log_create()
 {
 #if DEBUG > 0
        int fd = open(logfile, O_WRONLY | O_CREAT | O_TRUNC, 0666);
        const char *text = DRIVER_NAME ", " VERSION "\n";
-       loglock = create_sem(1,"logfile sem");
-       write(fd,text,strlen(text));
+       loglock = create_sem(1, "logfile sem");
+       write(fd, text, strlen(text));
        close(fd);
 #endif
 }
 
-void log_printf(const char *text,...)
+
+void log_printf(const char *text, ...)
 {
 #if DEBUG > 0
        int fd;
        char buf[1024];
        va_list ap;
 
-       va_start(ap,text);
-       vsprintf(buf,text,ap);
+       va_start(ap, text);
+       vsprintf(buf, text, ap);
        va_end(ap);
 
-       dprintf(DRIVER_NAME ": %s",buf);
+       dprintf(DRIVER_NAME ": %s", buf);
 
        acquire_sem(loglock);
        fd = open(logfile, O_WRONLY | O_APPEND);
-       write(fd,buf,strlen(buf));
+       write(fd, buf, strlen(buf));
        close(fd);
        release_sem(loglock);
 
@@ -92,4 +103,3 @@
        #endif
 #endif
 }
-

Modified: 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/auvia/Jamfile
===================================================================
--- 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/auvia/Jamfile
      2011-03-13 10:42:18 UTC (rev 40927)
+++ 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/auvia/Jamfile
      2011-03-13 14:34:54 UTC (rev 40928)
@@ -1,7 +1,7 @@
 SubDir HAIKU_TOP src add-ons kernel drivers audio ac97 auvia ;
 
 SetSubDirSupportedPlatformsBeOSCompatible ;
-UsePrivateHeaders media ;
+UsePrivateHeaders libroot media ;
 SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) ] ;
 SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) ] ;
 

Modified: 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/auvia/debug.c
===================================================================
--- 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/auvia/debug.c
      2011-03-13 10:42:18 UTC (rev 40927)
+++ 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/auvia/debug.c
      2011-03-13 14:34:54 UTC (rev 40928)
@@ -7,83 +7,94 @@
  * Copyright (c) 2002, Marcus Overhagen <marcus@xxxxxxxxxxxx>
  *
  * All rights reserved.
- * Redistribution and use in source and binary forms, with or without 
modification, 
+ * Redistribution and use in source and binary forms, with or without 
modification,
  * are permitted provided that the following conditions are met:
  *
- * - Redistributions of source code must retain the above copyright notice, 
+ * - Redistributions of source code must retain the above copyright notice,
  *   this list of conditions and the following disclaimer.
  * - Redistributions in binary form must reproduce the above copyright notice,
- *   this list of conditions and the following disclaimer in the documentation 
+ *   this list of conditions and the following disclaimer in the documentation
  *   and/or other materials provided with the distribution.
  *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
AND 
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
IMPLIED 
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 
FOR 
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
DAMAGES 
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
SERVICES; LOSS 
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
(INCLUDING 
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE, 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 
FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
(INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
+
+
 #include <KernelExport.h>
+
 #include <stdio.h>
 #include <fcntl.h>
 #include <unistd.h>
+
+#include <directories.h>
 #include <OS.h>
+
 #include "debug.h"
 #include "auvia.h"
 
+
 #if DEBUG > 0
-static const char * logfile="/boot/home/auvia.log";
+static const char *logfile = kCommonLogDirectory "/auvia.log";
 static sem_id loglock;
 #endif
 
-void debug_printf(const char *text,...);
-void log_printf(const char *text,...);
+
+void debug_printf(const char *text, ...);
+void log_printf(const char *text, ...);
 void log_create(void);
 
-void debug_printf(const char *text,...)
+
+void debug_printf(const char *text, ...)
 {
        char buf[1024];
        va_list ap;
 
-       va_start(ap,text);
-       vsprintf(buf,text,ap);
+       va_start(ap, text);
+       vsprintf(buf, text, ap);
        va_end(ap);
 
-       dprintf(DRIVER_NAME ": %s",buf);
+       dprintf(DRIVER_NAME ": %s", buf);
 }
 
+
 void log_create()
 {
 #if DEBUG > 0
        int fd = open(logfile, O_WRONLY | O_CREAT | O_TRUNC, 0666);
        const char *text = DRIVER_NAME ", " VERSION "\n";
-       loglock = create_sem(1,"logfile sem");
-       write(fd,text,strlen(text));
+       loglock = create_sem(1, "logfile sem");
+       write(fd, text, strlen(text));
        close(fd);
 #endif
 }
 
-void log_printf(const char *text,...)
+
+void log_printf(const char *text, ...)
 {
 #if DEBUG > 0
        int fd;
        char buf[1024];
        va_list ap;
 
-       va_start(ap,text);
-       vsprintf(buf,text,ap);
+       va_start(ap, text);
+       vsprintf(buf, text, ap);
        va_end(ap);
 
-       dprintf(DRIVER_NAME ": %s",buf);
+       dprintf(DRIVER_NAME ": %s", buf);
 
        acquire_sem(loglock);
        fd = open(logfile, O_WRONLY | O_APPEND);
-       write(fd,buf,strlen(buf));
+       write(fd, buf, strlen(buf));
        close(fd);
        release_sem(loglock);
 
@@ -92,4 +103,3 @@
        #endif
 #endif
 }
-

Modified: 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/es1370/Jamfile
===================================================================
--- 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/es1370/Jamfile
     2011-03-13 10:42:18 UTC (rev 40927)
+++ 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/es1370/Jamfile
     2011-03-13 14:34:54 UTC (rev 40928)
@@ -1,7 +1,7 @@
 SubDir HAIKU_TOP src add-ons kernel drivers audio ac97 es1370 ;
 
 SetSubDirSupportedPlatformsBeOSCompatible ;
-UsePrivateHeaders media ;
+UsePrivateHeaders libroot media ;
 SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) ] ;
 
 KernelAddon es1370 :

Modified: 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/es1370/debug.c
===================================================================
--- 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/es1370/debug.c
     2011-03-13 10:42:18 UTC (rev 40927)
+++ 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/es1370/debug.c
     2011-03-13 14:34:54 UTC (rev 40928)
@@ -8,63 +8,74 @@
  *             Marcus Overhagen, marcus@xxxxxxxxxxxx
  *             Jerome Duval, jerome.duval@xxxxxxx
  */
+
+
 #include <KernelExport.h>
+
 #include <stdio.h>
 #include <string.h>
 #include <fcntl.h>
 #include <unistd.h>
+
+#include <directories.h>
 #include <OS.h>
+
 #include "debug.h"
 #include "es1370.h"
 
+
 #if DEBUG > 0
-static const char * logfile="/boot/home/es1370.log";
+static const char *logfile = kCommonLogDirectory "/es1370.log";
 static sem_id loglock;
 #endif
 
-void debug_printf(const char *text,...);
-void log_printf(const char *text,...);
+
+void debug_printf(const char *text, ...);
+void log_printf(const char *text, ...);
 void log_create(void);
 
-void debug_printf(const char *text,...)
+
+void debug_printf(const char *text, ...)
 {
        char buf[1024];
        va_list ap;
 
-       va_start(ap,text);
-       vsprintf(buf,text,ap);
+       va_start(ap, text);
+       vsprintf(buf, text, ap);
        va_end(ap);
 
-       dprintf(DRIVER_NAME ": %s",buf);
+       dprintf(DRIVER_NAME ": %s", buf);
 }
 
+
 void log_create()
 {
 #if DEBUG > 0
        int fd = open(logfile, O_WRONLY | O_CREAT | O_TRUNC, 0666);
        const char *text = DRIVER_NAME ", " VERSION "\n";
-       loglock = create_sem(1,"logfile sem");
-       write(fd,text,strlen(text));
+       loglock = create_sem(1, "logfile sem");
+       write(fd, text, strlen(text));
        close(fd);
 #endif
 }
 
-void log_printf(const char *text,...)
+
+void log_printf(const char *text, ...)
 {
 #if DEBUG > 0
        int fd;
        char buf[1024];
        va_list ap;
 
-       va_start(ap,text);
-       vsprintf(buf,text,ap);
+       va_start(ap, text);
+       vsprintf(buf, text, ap);
        va_end(ap);
 
-       dprintf(DRIVER_NAME ": %s",buf);
+       dprintf(DRIVER_NAME ": %s", buf);
 
        acquire_sem(loglock);
        fd = open(logfile, O_WRONLY | O_APPEND);
-       write(fd,buf,strlen(buf));
+       write(fd, buf, strlen(buf));
        close(fd);
        release_sem(loglock);
 
@@ -73,4 +84,3 @@
        #endif
 #endif
 }
-

Modified: 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/ich/Jamfile
===================================================================
--- 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/ich/Jamfile
        2011-03-13 10:42:18 UTC (rev 40927)
+++ 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/ich/Jamfile
        2011-03-13 14:34:54 UTC (rev 40928)
@@ -2,7 +2,7 @@
 
 SetSubDirSupportedPlatformsBeOSCompatible ;
 
-UsePrivateHeaders media ;
+UsePrivateHeaders libroot media ;
 
 KernelAddon ich_ac97 :
        ac97_multi.c
@@ -21,7 +21,7 @@
 #      debug.c
 #      ich.c
 #      io.c
-#      util.c   
+#      util.c
 #      ac97.c
 #      :
 #      -fno-pic -D_KERNEL_MODE

Modified: 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/ich/debug.c
===================================================================
--- 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/ich/debug.c
        2011-03-13 10:42:18 UTC (rev 40927)
+++ 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/ac97/ich/debug.c
        2011-03-13 14:34:54 UTC (rev 40928)
@@ -4,76 +4,85 @@
  * Copyright (c) 2002, Marcus Overhagen <marcus@xxxxxxxxxxxx>
  *
  * All rights reserved.
- * Redistribution and use in source and binary forms, with or without 
modification, 
+ * Redistribution and use in source and binary forms, with or without 
modification,
  * are permitted provided that the following conditions are met:
  *
- * - Redistributions of source code must retain the above copyright notice, 
+ * - Redistributions of source code must retain the above copyright notice,
  *   this list of conditions and the following disclaimer.
  * - Redistributions in binary form must reproduce the above copyright notice,
- *   this list of conditions and the following disclaimer in the documentation 
+ *   this list of conditions and the following disclaimer in the documentation
  *   and/or other materials provided with the distribution.
  *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
AND 
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
IMPLIED 
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 
FOR 
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
DAMAGES 
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
SERVICES; LOSS 
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
(INCLUDING 
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE, 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 
FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
(INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
+
+
 #include <KernelExport.h>
+
 #include <stdio.h>
 #include <fcntl.h>
 #include <unistd.h>
+
+#include <directories.h>
 #include <OS.h>
+
 #include "debug.h"
 #include "ich.h"
 
-void debug_printf(const char *text,...)
+
+void debug_printf(const char *text, ...)
 {
        char buf[1024];
        va_list ap;
 
-       va_start(ap,text);
-       vsprintf(buf,text,ap);
+       va_start(ap, text);
+       vsprintf(buf, text, ap);
        va_end(ap);
 
-       dprintf(DRIVER_NAME ": %s",buf);
+       dprintf(DRIVER_NAME ": %s", buf);
 }
 
+
 #if DEBUG > 0
-
-static const char * logfile="/boot/home/ich_ac97.log";
+static const char *logfile = kCommonLogDirectory "/ich_ac97.log";
 static sem_id loglock;
 
+
 void log_create(void)
 {
        int fd = open(logfile, O_WRONLY | O_CREAT | O_TRUNC, 0666);
        const char *text = DRIVER_NAME ", " VERSION "\n";
-       loglock = create_sem(1,"logfile sem");
-       write(fd,text,strlen(text));
+       loglock = create_sem(1, "logfile sem");
+       write(fd, text, strlen(text));
        close(fd);
 }
 
-void log_printf(const char *text,...)
+
+void log_printf(const char *text, ...)
 {
        int fd;
        char buf[1024];
        va_list ap;
 
-       va_start(ap,text);
-       vsprintf(buf,text,ap);
+       va_start(ap, text);
+       vsprintf(buf, text, ap);
        va_end(ap);
 
-       dprintf(DRIVER_NAME ": %s",buf);
+       dprintf(DRIVER_NAME ": %s", buf);
 
        acquire_sem(loglock);
        fd = open(logfile, O_WRONLY | O_APPEND);
-       write(fd,buf,strlen(buf));
+       write(fd, buf, strlen(buf));
        close(fd);
        release_sem(loglock);
 
@@ -81,5 +90,4 @@
                snooze(150000);
        #endif
 }
-
 #endif

Modified: 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/echo/24/Jamfile
===================================================================
--- 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/echo/24/Jamfile
 2011-03-13 10:42:18 UTC (rev 40927)
+++ 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/echo/24/Jamfile
 2011-03-13 14:34:54 UTC (rev 40928)
@@ -13,7 +13,7 @@
 SubDirHdrs $(HAIKU_TOP) src add-ons kernel drivers audio echo generic ASIC ;
 
 UsePrivateHeaders [ FDirName kernel ]                  # For kernel_cpp.cpp
-       media ;
+       libroot media ;
 
 # set some additional defines
 SubDirCcFlags -DECHO_BEOS -DECHO24_FAMILY ;
@@ -69,7 +69,7 @@
        ] = [ FDirName $(HAIKU_TOP) src add-ons kernel drivers audio echo 
generic ] ;
 
 SEARCH on [ FGristFiles
-               kernel_cpp.cpp 
+               kernel_cpp.cpp
        ] = [ FDirName $(HAIKU_TOP) src system kernel util ] ;
 
 SEARCH on [ FGristFiles

Modified: 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/echo/3g/Jamfile
===================================================================
--- 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/echo/3g/Jamfile
 2011-03-13 10:42:18 UTC (rev 40927)
+++ 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/echo/3g/Jamfile
 2011-03-13 14:34:54 UTC (rev 40928)
@@ -13,7 +13,7 @@
 SubDirHdrs $(HAIKU_TOP) src add-ons kernel drivers audio echo generic ASIC ;
 
 UsePrivateHeaders [ FDirName kernel ]                  # For kernel_cpp.cpp
-       media ;
+       libroot media ;
 
 # set some additional defines
 SubDirCcFlags -DECHO_BEOS -DECHO3G_FAMILY ;
@@ -62,7 +62,7 @@
        ] = [ FDirName $(HAIKU_TOP) src add-ons kernel drivers audio echo 
generic ] ;
 
 SEARCH on [ FGristFiles
-               kernel_cpp.cpp 
+               kernel_cpp.cpp
        ] = [ FDirName $(HAIKU_TOP) src system kernel util ] ;
 
 SEARCH on [ FGristFiles

Modified: 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/echo/debug.c
===================================================================
--- 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/echo/debug.c
    2011-03-13 10:42:18 UTC (rev 40927)
+++ 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/echo/debug.c
    2011-03-13 14:34:54 UTC (rev 40928)
@@ -7,81 +7,92 @@
  * Copyright (c) 2002, Marcus Overhagen <marcus@xxxxxxxxxxxx>
  *
  * All rights reserved.
- * Redistribution and use in source and binary forms, with or without 
modification, 
+ * Redistribution and use in source and binary forms, with or without 
modification,
  * are permitted provided that the following conditions are met:
  *
- * - Redistributions of source code must retain the above copyright notice, 
+ * - Redistributions of source code must retain the above copyright notice,
  *   this list of conditions and the following disclaimer.
  * - Redistributions in binary form must reproduce the above copyright notice,
- *   this list of conditions and the following disclaimer in the documentation 
+ *   this list of conditions and the following disclaimer in the documentation
  *   and/or other materials provided with the distribution.
  *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
AND 
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
IMPLIED 
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 
FOR 
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
DAMAGES 
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
SERVICES; LOSS 
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
(INCLUDING 
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE, 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 
FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
(INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
+
+
 #include <KernelExport.h>
+
 #include <stdio.h>
 #include <fcntl.h>
 #include <unistd.h>
+
+#include <directories.h>
 #include <OS.h>
+
 #include "debug.h"
 
+
 #if DEBUG > 0
-static const char * logfile="/boot/home/"DRIVER_NAME".log";
+static const char *logfile = kCommonLogDirectory "/" DRIVER_NAME ".log";
 static sem_id loglock;
 #endif
 
-void debug_printf(const char *text,...);
-void log_printf(const char *text,...);
 
-void debug_printf(const char *text,...)
+void debug_printf(const char *text, ...);
+void log_printf(const char *text, ...);
+
+
+void debug_printf(const char *text, ...)
 {
        char buf[1024];
        va_list ap;
 
-       va_start(ap,text);
-       vsprintf(buf,text,ap);
+       va_start(ap, text);
+       vsprintf(buf, text, ap);
        va_end(ap);
 
-       dprintf(DRIVER_NAME ": %s",buf);
+       dprintf(DRIVER_NAME ": %s", buf);
 }
 
+
 void log_create()
 {
 #if DEBUG > 0
        int fd = open(logfile, O_WRONLY | O_CREAT | O_TRUNC, 0666);
        const char *text = DRIVER_NAME ", " ECHO_VERSION "\n";
-       loglock = create_sem(1,"logfile sem");
-       write(fd,text,strlen(text));
+       loglock = create_sem(1, "logfile sem");
+       write(fd, text, strlen(text));
        close(fd);
 #endif
 }
 
-void log_printf(const char *text,...)
+
+void log_printf(const char *text, ...)
 {
 #if DEBUG > 0
        int fd;
        char buf[1024];
        va_list ap;
 
-       va_start(ap,text);
-       vsprintf(buf,text,ap);
+       va_start(ap, text);
+       vsprintf(buf, text, ap);
        va_end(ap);
 
-       dprintf(DRIVER_NAME ": %s",buf);
+       dprintf(DRIVER_NAME ": %s", buf);
 
        acquire_sem(loglock);
        fd = open(logfile, O_WRONLY | O_APPEND);
-       write(fd,buf,strlen(buf));
+       write(fd, buf, strlen(buf));
        close(fd);
        release_sem(loglock);
 
@@ -90,4 +101,3 @@
        #endif
 #endif
 }
-

Modified: 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/echo/gals/Jamfile
===================================================================
--- 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/echo/gals/Jamfile
       2011-03-13 10:42:18 UTC (rev 40927)
+++ 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/echo/gals/Jamfile
       2011-03-13 14:34:54 UTC (rev 40928)
@@ -13,7 +13,7 @@
 SubDirHdrs $(HAIKU_TOP) src add-ons kernel drivers audio echo generic ASIC ;
 
 UsePrivateHeaders [ FDirName kernel ]                  # For kernel_cpp.cpp
-       media ;
+       libroot media ;
 
 # set some additional defines
 SubDirCcFlags -DECHO_BEOS -DECHOGALS_FAMILY ;
@@ -67,7 +67,7 @@
        ] = [ FDirName $(HAIKU_TOP) src add-ons kernel drivers audio echo 
generic ] ;
 
 SEARCH on [ FGristFiles
-               kernel_cpp.cpp 
+               kernel_cpp.cpp
        ] = [ FDirName $(HAIKU_TOP) src system kernel util ] ;
 
 SEARCH on [ FGristFiles

Modified: 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/echo/indigo/Jamfile
===================================================================
--- 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/echo/indigo/Jamfile
     2011-03-13 10:42:18 UTC (rev 40927)
+++ 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/echo/indigo/Jamfile
     2011-03-13 14:34:54 UTC (rev 40928)
@@ -13,7 +13,7 @@
 SubDirHdrs $(HAIKU_TOP) src add-ons kernel drivers audio echo generic ASIC ;
 
 UsePrivateHeaders [ FDirName kernel ]                  # For kernel_cpp.cpp
-       media ;
+       libroot media ;
 
 # set some additional defines
 SubDirCcFlags -DECHO_BEOS -DINDIGO_FAMILY -DCARDBUS ;
@@ -62,7 +62,7 @@
        ] = [ FDirName $(HAIKU_TOP) src add-ons kernel drivers audio echo 
generic ] ;
 
 SEARCH on [ FGristFiles
-               kernel_cpp.cpp 
+               kernel_cpp.cpp
        ] = [ FDirName $(HAIKU_TOP) src system kernel util ] ;
 
 SEARCH on [ FGristFiles

Modified: 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/emuxki/Jamfile
===================================================================
--- 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/emuxki/Jamfile
  2011-03-13 10:42:18 UTC (rev 40927)
+++ 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/emuxki/Jamfile
  2011-03-13 14:34:54 UTC (rev 40928)
@@ -2,7 +2,7 @@
 
 SetSubDirSupportedPlatformsBeOSCompatible ;
 
-UsePrivateHeaders media ;
+UsePrivateHeaders libroot media ;
 
 KernelAddon emuxki :
        ac97.c

Modified: 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/emuxki/debug.c
===================================================================
--- 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/emuxki/debug.c
  2011-03-13 10:42:18 UTC (rev 40927)
+++ 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/emuxki/debug.c
  2011-03-13 14:34:54 UTC (rev 40928)
@@ -7,83 +7,94 @@
  * Copyright (c) 2002, Marcus Overhagen <marcus@xxxxxxxxxxxx>
  *
  * All rights reserved.
- * Redistribution and use in source and binary forms, with or without 
modification, 
+ * Redistribution and use in source and binary forms, with or without 
modification,
  * are permitted provided that the following conditions are met:
  *
- * - Redistributions of source code must retain the above copyright notice, 
+ * - Redistributions of source code must retain the above copyright notice,
  *   this list of conditions and the following disclaimer.
  * - Redistributions in binary form must reproduce the above copyright notice,
- *   this list of conditions and the following disclaimer in the documentation 
+ *   this list of conditions and the following disclaimer in the documentation
  *   and/or other materials provided with the distribution.
  *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
AND 
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
IMPLIED 
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 
FOR 
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
DAMAGES 
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
SERVICES; LOSS 
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
ANY 
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
(INCLUDING 
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
SOFTWARE, 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 
FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 
ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
(INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
+
+
 #include <KernelExport.h>
+
 #include <stdio.h>
 #include <fcntl.h>
 #include <unistd.h>
+
+#include <directories.h>
 #include <OS.h>
+
 #include "debug.h"
 #include "emuxki.h"
 
+
 #if DEBUG > 0
-static const char * logfile="/boot/home/emuxki.log";
+static const char *logfile = kCommonLogDirectory "/emuxki.log";
 static sem_id loglock;
 #endif
 
-void debug_printf(const char *text,...);
-void log_printf(const char *text,...);
+
+void debug_printf(const char *text, ...);
+void log_printf(const char *text, ...);
 void log_create(void);
 
-void debug_printf(const char *text,...)
+
+void debug_printf(const char *text, ...)
 {
        char buf[1024];
        va_list ap;
 
-       va_start(ap,text);
-       vsprintf(buf,text,ap);
+       va_start(ap, text);
+       vsprintf(buf, text, ap);
        va_end(ap);
 
-       dprintf(DRIVER_NAME ": %s",buf);
+       dprintf(DRIVER_NAME ": %s", buf);
 }
 
+
 void log_create()
 {
 #if DEBUG > 0
        int fd = open(logfile, O_WRONLY | O_CREAT | O_TRUNC, 0666);
        const char *text = DRIVER_NAME ", " VERSION "\n";
-       loglock = create_sem(1,"logfile sem");
-       write(fd,text,strlen(text));
+       loglock = create_sem(1, "logfile sem");
+       write(fd, text, strlen(text));
        close(fd);
 #endif
 }
 
-void log_printf(const char *text,...)
+
+void log_printf(const char *text, ...)
 {
 #if DEBUG > 0
        int fd;
        char buf[1024];
        va_list ap;
 
-       va_start(ap,text);
-       vsprintf(buf,text,ap);
+       va_start(ap, text);
+       vsprintf(buf, text, ap);
        va_end(ap);
 
-       dprintf(DRIVER_NAME ": %s",buf);
+       dprintf(DRIVER_NAME ": %s", buf);
 
        acquire_sem(loglock);
        fd = open(logfile, O_WRONLY | O_APPEND);
-       write(fd,buf,strlen(buf));
+       write(fd, buf, strlen(buf));
        close(fd);
        release_sem(loglock);
 
@@ -92,4 +103,3 @@
        #endif
 #endif
 }
-

Modified: 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/module_driver/Jamfile
===================================================================
--- 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/module_driver/Jamfile
   2011-03-13 10:42:18 UTC (rev 40927)
+++ 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/module_driver/Jamfile
   2011-03-13 14:34:54 UTC (rev 40928)
@@ -1,6 +1,6 @@
 SubDir HAIKU_TOP src add-ons kernel drivers audio module_driver ;
 
-UsePrivateHeaders media ;
+UsePrivateHeaders libroot media ;
 
 KernelAddon audio_module_driver :
        audio_module_driver.c

Modified: 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/module_driver/audio_module_driver.c
===================================================================
--- 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/module_driver/audio_module_driver.c
     2011-03-13 10:42:18 UTC (rev 40927)
+++ 
haiku/branches/features/package-management/src/add-ons/kernel/drivers/audio/module_driver/audio_module_driver.c
     2011-03-13 14:34:54 UTC (rev 40928)
@@ -8,15 +8,20 @@
  *
  */
 
+
 #include <KernelExport.h>
+#include <directories.h>
 #include <Drivers.h>
 #include <Errors.h>
 #include <OS.h>
+
 #include <malloc.h>
 #include <fcntl.h>
 #include <image.h>
+
 #include "audio_module.h"
 
+
 int32 api_version = B_CUR_DRIVER_API_VERSION;
 
 #define DRIVER_NAME    "audio_module_driver"
@@ -29,6 +34,7 @@
 extern image_id        load_kernel_addon(const char *path);
 extern status_t        unload_kernel_addon(image_id imid);
 
+
 status_t
 init_hardware(void)
 {
@@ -36,6 +42,7 @@
        return B_OK;
 }
 
+

[... truncated: 917 lines follow ...]

Other related posts:

  • » [haiku-commits] r40928 - in haiku/branches/features/package-management: headers/private/libroot src/add-ons/kernel/debugger/hangman src/add-ons/kernel/drivers/audio/ac97/auich src/add-ons/kernel/drivers/audio/ac97/auvia src/add-ons/kernel/drivers/audio/ac97/es1370 ... - zooey