aboutsummaryrefslogtreecommitdiff
path: root/sfmain.c
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2022-04-30 13:36:08 +0200
committerJavier <dev.git@javispedro.com>2022-04-30 13:36:08 +0200
commit7f2b85a2131718fd39b49737a5d945fb3ae7bde7 (patch)
tree918ee14faa96643db58b4b2464e1cddce5958bba /sfmain.c
parent66955fce6cc5b39cf3007d20dcc816a3607edd74 (diff)
downloadvbados-7f2b85a2131718fd39b49737a5d945fb3ae7bde7.tar.gz
vbados-7f2b85a2131718fd39b49737a5d945fb3ae7bde7.zip
save findfirst/findnext state in sdb, support concurrent calls
fd xcopy at least uses this. since we don't have a findclose call, we may leak the dir fd if the program does not finish reading the entire directory
Diffstat (limited to 'sfmain.c')
-rw-r--r--sfmain.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sfmain.c b/sfmain.c
index 9f4fe38..3cd9a03 100644
--- a/sfmain.c
+++ b/sfmain.c
@@ -183,7 +183,7 @@ static int mount(LPTSRDATA data, const char *folder, char drive_letter)
return EXIT_FAILURE;
}
- if (drive >= lol->last_drive || drive >= MAX_NUM_DRIVE) {
+ if (drive >= lol->last_drive || drive >= NUM_DRIVES) {
fprintf(stderr, "Drive %c: is after LASTDRIVE\n", drive_letter);
return EXIT_FAILURE;
}
@@ -225,7 +225,7 @@ static int unmount(LPTSRDATA data, char drive_letter)
return EXIT_FAILURE;
}
- if (drive >= lol->last_drive || drive >= MAX_NUM_DRIVE) {
+ if (drive >= lol->last_drive || drive >= NUM_DRIVES) {
fprintf(stderr, "Drive %c: is after LASTDRIVE\n", drive_letter);
return EXIT_FAILURE;
}