From af1a266670d040d2f4083ff309d732d648afba2a Mon Sep 17 00:00:00 2001 From: Angelos Mouzakitis Date: Tue, 10 Oct 2023 14:33:42 +0000 Subject: Add submodule dependency files Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec --- roms/openbios/libopenbios/helpers.fs | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 roms/openbios/libopenbios/helpers.fs (limited to 'roms/openbios/libopenbios/helpers.fs') diff --git a/roms/openbios/libopenbios/helpers.fs b/roms/openbios/libopenbios/helpers.fs new file mode 100644 index 000000000..8f5db9ffc --- /dev/null +++ b/roms/openbios/libopenbios/helpers.fs @@ -0,0 +1,35 @@ +\ tag: helper functions +\ +\ deblocker / filesystem support +\ +\ Copyright (C) 2003 Samuel Rydh +\ +\ See the file "COPYING" for further information about +\ the copyright and warranty status of this work. +\ + + +\ create device node and any missing parents. +\ The new node becomes the active package + +: create-node ( nodepath -- ) + recursive + ascii / right-split + 2dup find-dev if + active-package! + 2drop + else + ( nodename path ) + dup if + create-node + else + device-tree @ active-package! + 2drop + then + then + new-device + device-name + active-package + finish-device + active-package! +; -- cgit