]> git.sur5r.net Git - cc65/commitdiff
Made use of recently introduced getcurrentdevice().
authorol.sc <ol.sc@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 21 Oct 2012 14:36:05 +0000 (14:36 +0000)
committerol.sc <ol.sc@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 21 Oct 2012 14:36:05 +0000 (14:36 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@5864 b7a2c559-68d2-44c3-8de9-860c34a00d81

targetutil/geos-apple/convert.c

index 9b996245638ef3fd8c8bce2145aba342ddb50048..ea9273fc3d1d35d94a0b87b0b8bf9a6e93619607 100644 (file)
@@ -3,6 +3,7 @@
 #include <stdio.h>
 #include <errno.h>
 #include <dirent.h>
+#include <device.h>
 #include <dio.h>
 
 unsigned char info_signature[3] = {3, 21, 63 | 0x80};
@@ -109,8 +110,7 @@ static unsigned get_dir_entry(char* p_name)
     /* Field header_pointer directly follows field last_mod */
     cur_addr = *(unsigned*)(&dirent->d_mtime.hour + 1);
 
-    /* DEV_NUM is set to the drive accessed above */
-    dhandle = dio_open(*(unsigned char*)0xBF30 >> 4);
+    dhandle = dio_open(getcurrentdevice());
     if (!dhandle) {
         err_exit("dio_open", 1);
     }