global-functions: $MkDir: use $RmDir

This commit is contained in:
Christian Hesse 2025-01-21 18:41:58 +01:00
parent 4760515add
commit f5f00b70e3

View file

@ -857,6 +857,7 @@
:global CleanFilePath; :global CleanFilePath;
:global LogPrint; :global LogPrint;
:global RmDir;
:global WaitForFile; :global WaitForFile;
:local MkTmpfs do={ :local MkTmpfs do={
@ -873,7 +874,7 @@
} }
$LogPrint info $0 ("Creating disk of type tmpfs."); $LogPrint info $0 ("Creating disk of type tmpfs.");
/file/remove [ find where name="tmpfs" type="directory" ]; $RmDir "tmpfs";
:do { :do {
/disk/add slot=tmpfs type=tmpfs tmpfs-max-size=([ /system/resource/get total-memory ] / 3); /disk/add slot=tmpfs type=tmpfs tmpfs-max-size=([ /system/resource/get total-memory ] / 3);
$WaitForFile "tmpfs"; $WaitForFile "tmpfs";