summaryrefslogtreecommitdiffstats
path: root/src/partauto.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-09-12 12:04:47 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2013-09-12 12:04:47 +0200
commitdd2eda59bb6402fc23044057100d4373f9f5d002 (patch)
treec523311e0cee2352a66f2efbb185639c42e00acd /src/partauto.c
parenta21a497016e90505ee9c2720fb6328ab30bfa6c3 (diff)
Windows device like "\\.\D:" usually have no partition table
Diffstat (limited to 'src/partauto.c')
-rw-r--r--src/partauto.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/partauto.c b/src/partauto.c
index 3705b3b..ef82dfd 100644
--- a/src/partauto.c
+++ b/src/partauto.c
@@ -117,6 +117,11 @@ void autodetect_arch(disk_t *disk, const arch_fnct_t *arch)
disk->arch=&arch_mac;
#endif
#else
+#if defined(__CYGWIN__) || defined(__MINGW32__)
+ if(disk->device[0]=='\\' && disk->device[1]=='\\' && disk->device[2]=='.' && disk->device[3]=='\\' && disk->device[5]==':')
+ disk->arch=&arch_none;
+ else
+#endif
/* PC/Intel partition table is limited to 2 TB, 2^32 512-bytes sectors */
if(disk->disk_size < ((uint64_t)1<<(32+9)))
disk->arch=&arch_i386;