Make use of the DEFAULT_DEBUG_CHANNEL where appropriate.
Use the default version of FIXME, ERR, WARN, TRACE for the default
channel.
diff --git a/files/directory.c b/files/directory.c
index 353c99a..ef83953 100644
--- a/files/directory.c
+++ b/files/directory.c
@@ -30,7 +30,7 @@
#include "options.h"
#include "debugtools.h"
-DECLARE_DEBUG_CHANNEL(dosfs)
+DEFAULT_DEBUG_CHANNEL(dosfs)
DECLARE_DEBUG_CHANNEL(file)
static DOS_FULL_NAME DIR_Windows;
@@ -125,14 +125,14 @@
SetEnvironmentVariableA( "windir", DIR_Windows.short_name );
SetEnvironmentVariableA( "winsysdir", DIR_System.short_name );
- TRACE_(dosfs)("WindowsDir = %s (%s)\n",
+ TRACE("WindowsDir = %s (%s)\n",
DIR_Windows.short_name, DIR_Windows.long_name );
- TRACE_(dosfs)("SystemDir = %s (%s)\n",
+ TRACE("SystemDir = %s (%s)\n",
DIR_System.short_name, DIR_System.long_name );
- TRACE_(dosfs)("TempDir = %s (%s)\n",
+ TRACE("TempDir = %s (%s)\n",
tmp_dir.short_name, tmp_dir.long_name );
- TRACE_(dosfs)("Path = %s\n", path );
- TRACE_(dosfs)("Cwd = %c:\\%s\n",
+ TRACE("Path = %s\n", path );
+ TRACE("Cwd = %c:\\%s\n",
'A' + drive, DRIVE_GetDosCwd( drive ) );
return 1;
@@ -650,7 +650,7 @@
for (p = buffer; *p; p++) if (*p == '/') *p = '\\';
if (lastpart) *lastpart = strrchr( buffer, '\\' ) + 1;
}
- TRACE_(dosfs)("Returning %d\n", strlen(res) + 3 );
+ TRACE("Returning %d\n", strlen(res) + 3 );
return strlen(res) + 3;
}
diff --git a/files/dos_fs.c b/files/dos_fs.c
index 734c5ea..d1eb7b5 100644
--- a/files/dos_fs.c
+++ b/files/dos_fs.c
@@ -35,7 +35,7 @@
#include "options.h"
#include "debugtools.h"
-DECLARE_DEBUG_CHANNEL(dosfs)
+DEFAULT_DEBUG_CHANNEL(dosfs)
DECLARE_DEBUG_CHANNEL(file)
/* Define the VFAT ioctl to get both short and long file names */
@@ -528,13 +528,13 @@
while (len > 1 && name[len-1] == '.') len--;
if (long_len < len + 1) return FALSE;
- TRACE_(dosfs)("%s,%s\n", path, name );
+ TRACE("%s,%s\n", path, name );
if (!DOSFS_ToDosFCBFormat( name, dos_name )) dos_name[0] = '\0';
if (!(dir = DOSFS_OpenDir( path )))
{
- WARN_(dosfs)("(%s,%s): can't open dir: %s\n",
+ WARN("(%s,%s): can't open dir: %s\n",
path, name, strerror(errno) );
return FALSE;
}
@@ -574,11 +574,11 @@
else
DOSFS_Hash( long_name, short_buf, FALSE, ignore_case );
}
- TRACE_(dosfs)("(%s,%s) -> %s (%s)\n",
- path, name, long_name, short_buf ? short_buf : "***");
+ TRACE("(%s,%s) -> %s (%s)\n",
+ path, name, long_name, short_buf ? short_buf : "***");
}
else
- WARN_(dosfs)("'%s' not found in '%s'\n", name, path);
+ WARN("'%s' not found in '%s'\n", name, path);
DOSFS_CloseDir( dir );
return ret;
}
@@ -666,7 +666,7 @@
to_dup = GetStdHandle( STD_OUTPUT_HANDLE );
break;
default:
- FIXME_(dosfs)("can't open CON read/write\n");
+ FIXME("can't open CON read/write\n");
return HFILE_ERROR;
break;
}
@@ -688,7 +688,7 @@
if(devname[0])
{
TRACE_(file)("DOSFS_OpenDevice %s is %s\n",
- DOSFS_Devices[i].name,devname);
+ DOSFS_Devices[i].name,devname);
r = FILE_CreateFile( devname, access,
FILE_SHARE_READ|FILE_SHARE_WRITE, NULL,
OPEN_EXISTING, 0, -1 );
@@ -697,7 +697,7 @@
}
}
- FIXME_(dosfs)("device open %s not supported (yet)\n",DOSFS_Devices[i].name);
+ FIXME("device open %s not supported (yet)\n",DOSFS_Devices[i].name);
return HFILE_ERROR;
}
}
@@ -757,8 +757,7 @@
UINT flags;
char *p_l, *p_s, *root;
- TRACE_(dosfs)("%s (last=%d)\n",
- name, check_last );
+ TRACE("%s (last=%d)\n", name, check_last );
if ((full->drive = DOSFS_GetPathDrive( &name )) == -1) return FALSE;
flags = DRIVE_GetFlags( full->drive );
@@ -870,8 +869,7 @@
}
if (!full->long_name[0]) strcpy( full->long_name, "/" );
if (!full->short_name[2]) strcpy( full->short_name + 2, "\\" );
- TRACE_(dosfs)("returning %s = %s\n",
- full->long_name, full->short_name );
+ TRACE("returning %s = %s\n", full->long_name, full->short_name );
return TRUE;
}
@@ -1070,7 +1068,7 @@
char *endchar = buffer + sizeof(buffer) - 2;
*endchar = '\0';
- TRACE_(dosfs)("converting '%s'\n", name );
+ TRACE("converting '%s'\n", name );
if (!name || ((drive = DOSFS_GetPathDrive( &name )) == -1) )
{ SetLastError( ERROR_INVALID_PARAMETER );
@@ -1144,7 +1142,7 @@
lstrcpynA( result, buffer, len );
}
- TRACE_(dosfs)("returning '%s'\n", buffer );
+ TRACE("returning '%s'\n", buffer );
/* If the lpBuffer buffer is too small, the return value is the
size of the buffer, in characters, required to hold the path. */
@@ -1278,7 +1276,7 @@
lstrcpynA( p, long_name, sizeof(buffer) - (int)(p - buffer) );
if (!FILE_Stat( buffer, &fileinfo ))
{
- WARN_(dosfs)("can't stat %s\n", buffer);
+ WARN("can't stat %s\n", buffer);
continue;
}
if (fileinfo.dwFileAttributes & ~attr) continue;
@@ -1300,9 +1298,9 @@
lstrcpynA( entry->cFileName, long_name, sizeof(entry->cFileName) );
if (!(flags & DRIVE_CASE_PRESERVING)) CharLowerA( entry->cFileName );
- TRACE_(dosfs)("returning %s (%s) %02lx %ld\n",
- entry->cFileName, entry->cAlternateFileName,
- entry->dwFileAttributes, entry->nFileSizeLow );
+ TRACE("returning %s (%s) %02lx %ld\n",
+ entry->cFileName, entry->cAlternateFileName,
+ entry->dwFileAttributes, entry->nFileSizeLow );
return 1;
}
return 0; /* End of directory */
@@ -1865,7 +1863,7 @@
LPSTR s;
char buffer[200];
- TRACE_(dosfs)("(%s,...)\n",devname?devname:"<null>");
+ TRACE("(%s,...)\n", devname ? devname : "<null>");
if (!devname) {
/* return known MSDOS devices */
strcpy(buffer,"CON COM1 COM2 LPT1 NUL ");
@@ -1941,7 +1939,7 @@
* DefineDosDeviceA (KERNEL32.182)
*/
BOOL WINAPI DefineDosDeviceA(DWORD flags,LPCSTR devname,LPCSTR targetpath) {
- FIXME_(dosfs)("(0x%08lx,%s,%s),stub!\n",flags,devname,targetpath);
+ FIXME("(0x%08lx,%s,%s),stub!\n",flags,devname,targetpath);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
diff --git a/files/drive.c b/files/drive.c
index ac5fc5f..5ccf32e 100644
--- a/files/drive.c
+++ b/files/drive.c
@@ -45,7 +45,7 @@
#include "task.h"
#include "debugtools.h"
-DECLARE_DEBUG_CHANNEL(dosfs)
+DEFAULT_DEBUG_CHANNEL(dosfs)
DECLARE_DEBUG_CHANNEL(file)
typedef struct
@@ -204,12 +204,13 @@
DRIVE_CurDrive = i;
count++;
- TRACE_(dosfs)("%s: path=%s type=%s label='%s' serial=%08lx flags=%08x dev=%x ino=%x\n",
- name, path, DRIVE_Types[drive->type],
- drive->label, drive->serial, drive->flags,
- (int)drive->dev, (int)drive->ino );
+ TRACE("%s: path=%s type=%s label='%s' serial=%08lx "
+ "flags=%08x dev=%x ino=%x\n",
+ name, path, DRIVE_Types[drive->type],
+ drive->label, drive->serial, drive->flags,
+ (int)drive->dev, (int)drive->ino );
}
- else WARN_(dosfs)("%s: not defined\n", name );
+ else WARN("%s: not defined\n", name );
}
if (!count)
@@ -276,7 +277,7 @@
SetLastError( ERROR_INVALID_DRIVE );
return 0;
}
- TRACE_(dosfs)("%c:\n", 'A' + drive );
+ TRACE("%c:\n", 'A' + drive );
DRIVE_CurDrive = drive;
if (pTask) pTask->curdrive = drive | 0x80;
return 1;
@@ -336,9 +337,8 @@
*next = 0;
if (rootdrive != -1)
- TRACE_(dosfs)("%s -> drive %c:, root='%s', name='%s'\n",
- buffer, 'A' + rootdrive,
- DOSDrives[rootdrive].root, *path );
+ TRACE("%s -> drive %c:, root='%s', name='%s'\n",
+ buffer, 'A' + rootdrive, DOSDrives[rootdrive].root, *path );
return rootdrive;
}
@@ -459,7 +459,7 @@
strcpy( buffer, "A:" );
buffer[0] += drive;
- TRACE_(dosfs)("(%c:,%s)\n", buffer[0], path );
+ TRACE("(%c:,%s)\n", buffer[0], path );
lstrcpynA( buffer + 2, path, sizeof(buffer) - 2 );
if (!DOSFS_GetFullName( buffer, TRUE, &full_name )) return 0;
@@ -472,7 +472,7 @@
unix_cwd = full_name.long_name + strlen( DOSDrives[drive].root );
while (*unix_cwd == '/') unix_cwd++;
- TRACE_(dosfs)("(%c:): unix_cwd=%s dos_cwd=%s\n",
+ TRACE("(%c:): unix_cwd=%s dos_cwd=%s\n",
'A' + drive, unix_cwd, full_name.short_name + 3 );
HeapFree( SystemHeap, 0, DOSDrives[drive].dos_cwd );
@@ -545,10 +545,8 @@
if ( new->root )
{
- TRACE_(dosfs)("Can\'t map drive %c to drive %c - "
- "drive %c already exists\n",
- 'A' + existing_drive, 'A' + new_drive,
- 'A' + new_drive );
+ TRACE("Can\'t map drive %c to drive %c - drive %c already exists\n",
+ 'A' + existing_drive, 'A' + new_drive, 'A' + new_drive );
/* it is already mapped there, so return success */
if (!strcmp(old->root,new->root))
return 1;
@@ -565,8 +563,8 @@
new->dev = old->dev;
new->ino = old->ino;
- TRACE_(dosfs)("Drive %c is now equal to drive %c\n",
- 'A' + new_drive, 'A' + existing_drive );
+ TRACE("Drive %c is now equal to drive %c\n",
+ 'A' + new_drive, 'A' + existing_drive );
return 1;
}
@@ -662,7 +660,7 @@
#endif
{
FILE_SetDosError();
- WARN_(dosfs)("cannot do statfs(%s)\n", DOSDrives[drive].root);
+ WARN("cannot do statfs(%s)\n", DOSDrives[drive].root);
return 0;
}
@@ -855,10 +853,10 @@
{
if ((root[1]) && ((root[1] != ':') || (root[2] != '\\')))
{
- FIXME_(dosfs)("there are valid root names which are not supported yet\n");
+ FIXME("there are valid root names which are not supported yet\n");
/* ..like UNC names, for instance. */
- WARN_(dosfs)("invalid root '%s'\n", root );
+ WARN("invalid root '%s'\n", root );
return FALSE;
}
drive = toupper(root[0]) - 'A';
@@ -893,7 +891,7 @@
if (GetVersionExA(&ovi))
{
if (ovi.dwPlatformId == VER_PLATFORM_WIN32_NT && ovi.dwMajorVersion > 4)
- FIXME_(dosfs)("no per-user quota support yet\n");
+ FIXME("no per-user quota support yet\n");
}
}
@@ -936,7 +934,7 @@
UINT16 WINAPI GetDriveType16(
UINT16 drive /* [in] number (NOT letter) of drive */
) {
- TRACE_(dosfs)("(%c:)\n", 'A' + drive );
+ TRACE("(%c:)\n", 'A' + drive );
switch(DRIVE_GetType(drive))
{
case TYPE_FLOPPY: return DRIVE_REMOVABLE;
@@ -981,14 +979,14 @@
UINT WINAPI GetDriveTypeA(LPCSTR root /* String describing drive */)
{
int drive;
- TRACE_(dosfs)("(%s)\n", debugstr_a(root));
+ TRACE("(%s)\n", debugstr_a(root));
if (NULL == root) drive = DRIVE_GetCurrentDrive();
else
{
if ((root[1]) && (root[1] != ':'))
{
- WARN_(dosfs)("invalid root '%s'\n", debugstr_a(root));
+ WARN("invalid root '%s'\n", debugstr_a(root));
return DRIVE_DOESNOTEXIST;
}
drive = toupper(root[0]) - 'A';
@@ -1198,7 +1196,7 @@
{
if ((root[1]) && (root[1] != ':'))
{
- WARN_(dosfs)("invalid root '%s'\n",root);
+ WARN("invalid root '%s'\n",root);
return FALSE;
}
drive = toupper(root[0]) - 'A';
@@ -1271,7 +1269,7 @@
*/
BOOL WINAPI SetVolumeLabelA(LPCSTR rootpath,LPCSTR volname)
{
- FIXME_(dosfs)("(%s,%s),stub!\n",rootpath,volname);
+ FIXME("(%s,%s),stub!\n",rootpath,volname);
return TRUE;
}