drivers/loop: Add a loop character device that can be used to setup and teardown loop devices

This commit is contained in:
Gregory Nutt
2015-11-25 17:13:56 -06:00
parent b84da6e696
commit ed35eb0f8d
11 changed files with 342 additions and 46 deletions
-17
View File
@@ -439,7 +439,6 @@ o Kernel/Protected Build
COMMAND KERNEL INTERFACE(s)
-------- ----------------------------------------------
losetup losetup(), loteardown()
mkfatfs mkfatfs
mkrd ramdisk_register()
ps sched_foreach()
@@ -454,22 +453,6 @@ o Kernel/Protected Build
http://git.busybox.net/busybox/tree/util-linux/mkfs_vfat.c
Here is how the Busybox/Linux losetup works:
This is the busybox losetup():
http://git.busybox.net/busybox/tree/util-linux/losetup.c .
You can see that it relies on query_loop(), set_loop(), and
del_loop() to do the really work. query_loop() and friends
are here:
http://git.busybox.net/busybox/tree/libbb/loop.c.
They each open a device and interface with it using ioctl calls.
That is probably how NuttX should do things as well. But that
is pretty much a redesign.
Status: Open
Priority: Medium/High -- the kernel build configuration is not fully fielded
yet.