summaryrefslogtreecommitdiffstats
path: root/src/hdaccess.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2009-09-30 09:25:24 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2009-09-30 09:25:24 +0200
commitf7352667c7870798d466f9b60e8171a181c4c00d (patch)
tree373720cbea2b608f3823523218c6304a4eba3739 /src/hdaccess.c
parent5f3547266939ae8de8f49b158ba52314df027165 (diff)
Scan for the first 20 disks under Mac OS X instead of 10
Diffstat (limited to 'src/hdaccess.c')
-rw-r--r--src/hdaccess.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/hdaccess.c b/src/hdaccess.c
index 5d4f5f7..9385276 100644
--- a/src/hdaccess.c
+++ b/src/hdaccess.c
@@ -271,17 +271,18 @@ list_disk_t *hd_parse(list_disk_t *list_disk, const int verbose, const arch_fnct
}
#elif defined(__APPLE__)
{
+ char device[100];
char device_scsi[]="/dev/disk0";
char device_raw[]="/dev/rdisk0";
/* Disk */
- for(i=0;i<10;i++)
+ for(i=0;i<20;i++)
{
- device_scsi[strlen(device_scsi)-1]='0'+i;
+ snprintf(device, sizeof(device), "/dev/disk%u", i);
list_disk=insert_new_disk(list_disk,file_test_availability(device_scsi,verbose,arch,testdisk_mode));
}
- for(i=0;i<10;i++)
+ for(i=0;i<20;i++)
{
- device_raw[strlen(device_raw)-1]='0'+i;
+ snprintf(device, sizeof(device), "/dev/rdisk%u", i);
list_disk=insert_new_disk(list_disk,file_test_availability(device_raw,verbose,arch,testdisk_mode));
}
}