From 60152c9be520e3dd5f2483f57e42781aad74a4d2 Mon Sep 17 00:00:00 2001 From: Jamey Sharp Date: Sun, 24 Dec 2006 01:36:14 -0800 Subject: [PATCH] On Windows, support only the command-line image drive "::"; all others access the corresponding real drive. --- devices.c | 5 +++++ mainloop.c | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/devices.c b/devices.c index 3e0b7c4..f9c23f8 100644 --- a/devices.c +++ b/devices.c @@ -940,6 +940,11 @@ struct device devices[] = { #endif #endif /* sysv4 */ +#ifdef OS_mingw32msvc +#define predefined_devices +struct device devices[] = {}; +#endif + #ifdef INIT_GENERIC #ifndef USE_2M diff --git a/mainloop.c b/mainloop.c index 08dc9be..1fc1449 100644 --- a/mainloop.c +++ b/mainloop.c @@ -446,7 +446,12 @@ int unix_target_lookup(MainParam_t *mp, const char *arg) int target_lookup(MainParam_t *mp, const char *arg) { - if((mp->lookupflags & NO_UNIX) || (arg[0] && arg[1] == ':' )) + if((mp->lookupflags & NO_UNIX) || (arg[0] +#ifdef OS_mingw32msvc +/* On Windows, support only the command-line image drive. */ + && arg[0] == ':' +#endif + && arg[1] == ':' )) return dos_target_lookup(mp, arg); else return unix_target_lookup(mp, arg); @@ -470,7 +475,12 @@ int main_loop(MainParam_t *mp, char **argv, int argc) mp->originalArg = argv[i]; mp->basenameHasWildcard = strpbrk(_basename(mp->originalArg), "*[?") != 0; - if (mp->unixcallback && (!argv[i][0] || argv[i][1] != ':' )) + if (mp->unixcallback && (!argv[i][0] +#ifdef OS_mingw32msvc +/* On Windows, support only the command-line image drive. */ + || argv[i][0] != ':' +#endif + || argv[i][1] != ':' )) ret = unix_loop(0, mp, argv[i], 1); else ret = dos_loop(mp, argv[i]); -- 1.4.4.2