PATCH: dlls/kernel/oldconfig.c -- remove #ifdef linux
Gerald Pfeifer
gerald at pfeifer.com
Thu Aug 18 06:56:41 CDT 2005
After Frank's follow-up patch to Vitaliy's original implementation
revision 1.9
date: 2005/08/11 17:05:47; author: julliard; state: Exp; lines: +39 -36
Frank Richter <frank.richter at gmail.com>
Fix a crash on startup when /proc/ide does not exist.
----------------------------
revision 1.8
date: 2005/08/10 10:52:10; author: julliard; state: Exp; lines: +255 -49
Vitaliy Margolen <wine-patch at kievinfo.com>
Use /proc filesystem to create HKLM\HARDWARE\DEVICEMAP\Scsi entries.
I think we can do the following patch.
As an alternate approach, we could add some further #ifdef linux to
guard code which is currently unused, and flagged as such by GCC, on
non-Linux platforms. Please let me know if you prefer that approach.
Gerald
ChangeLog:
Enable SCSI_getprocentry() on non-Linux platforms which now should be
safe to do.
Index: oldconfig.c
===================================================================
RCS file: /home/wine/wine/dlls/kernel/oldconfig.c,v
retrieving revision 1.9
diff -u -3 -p -r1.9 oldconfig.c
--- oldconfig.c 11 Aug 2005 17:05:47 -0000 1.9
+++ oldconfig.c 18 Aug 2005 11:51:17 -0000
@@ -337,7 +337,8 @@ static int SCSI_getprocentry( FILE * pro
/* create the hardware registry branch */
static void create_hardware_branch(void)
{
-#ifdef linux
+ /* The following mostly will work on Linux, but should not cause
+ * problems on other systems. */
static const char procname_ide_media[] = "/proc/ide/%s/media";
static const char procname_ide_model[] = "/proc/ide/%s/model";
static const char procname_scsi[] = "/proc/scsi/scsi";
@@ -453,7 +454,6 @@ static void create_hardware_branch(void)
if( result != EOF )
WARN("Incorrect %s format\n", procname_scsi);
fclose( procfile );
-#endif
}
More information about the wine-patches
mailing list