Skip to content

Commit

Permalink
ryfs_create: Open file if it already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
ry755 committed Apr 10, 2024
1 parent 90ab579 commit 6bce706
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions RYFS.okm
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ MODULE RYFS;
nextFreeSector: INT;
i: INT;
BEGIN
i := ryfs_open(fileName, diskId, struct);
IF i # 0 THEN
RETURN(i);
END;

firstFreeEntry := ryfs_find_free_entry(diskId);
firstFreeSector := ryfs_find_free_sector(diskId);
IF (firstFreeEntry = 0) OR (firstFreeSector = 0) THEN
Expand Down

0 comments on commit 6bce706

Please sign in to comment.