mirror of https://github.com/mkerrisk/man-pages
loop.4: Document the loop-control device
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
56b4a66a39
commit
482ee36128
41
man4/loop.4
41
man4/loop.4
|
@ -1,4 +1,5 @@
|
||||||
.\" Copyright 2002 Urs Thuermann (urs@isnogud.escape.de)
|
.\" Copyright 2002 Urs Thuermann (urs@isnogud.escape.de)
|
||||||
|
.\" and Copyright 2015 Michael Kerrisk <mtk.manpages@gmail.com>
|
||||||
.\"
|
.\"
|
||||||
.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
|
.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
|
||||||
.\" This is free documentation; you can redistribute it and/or
|
.\" This is free documentation; you can redistribute it and/or
|
||||||
|
@ -24,7 +25,7 @@
|
||||||
.\"
|
.\"
|
||||||
.TH LOOP 4 "2005-12-05" "Linux" "Linux Programmer's Manual"
|
.TH LOOP 4 "2005-12-05" "Linux" "Linux Programmer's Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
loop \- driver for loop devices
|
loop, loop-control \- loop devices
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
#include <linux/loop.h>
|
#include <linux/loop.h>
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
|
@ -166,8 +167,44 @@ struct loop_info64 {
|
||||||
};
|
};
|
||||||
.in
|
.in
|
||||||
.fi
|
.fi
|
||||||
|
.SS /dev/loop-control
|
||||||
|
Since Linux 3.1,
|
||||||
|
.\" commit 770fe30a46a12b6fb6b63fbe1737654d28e84844
|
||||||
|
the kernel provides the
|
||||||
|
.I /dev/loop-control
|
||||||
|
device, which permits an application to dynamically find a free device,
|
||||||
|
and to add and remove loop devices from the system.
|
||||||
|
To perform these operations, one first opens
|
||||||
|
.IR /dev/loop-control
|
||||||
|
and then employs one of the following
|
||||||
|
.BR ioctl (2)
|
||||||
|
operations:
|
||||||
|
.TP
|
||||||
|
.B LOOP_CTL_GET_FREE
|
||||||
|
Allocate or find a free loop device for use.
|
||||||
|
On success, the device number is returned as the result of the call.
|
||||||
|
This operation takes no argument.
|
||||||
|
.TP
|
||||||
|
.B LOOP_CTL_ADD
|
||||||
|
Add the new loop device whose device number is specified
|
||||||
|
as a long integer in the third
|
||||||
|
.BR ioctl (2)
|
||||||
|
argument.
|
||||||
|
On success, the device index is returned as the result of the call.
|
||||||
|
If the device is already allocated, the call fails with the error
|
||||||
|
.BR EEXIST .
|
||||||
|
.TP
|
||||||
|
.B LOOP_CTL_REMOVE
|
||||||
|
Remove the loop device whose device number is specified
|
||||||
|
as a long integer in the third
|
||||||
|
.BR ioctl (2)
|
||||||
|
argument.
|
||||||
|
On success, the device number is returned as the result of the call.
|
||||||
|
If the device is in use, the call fails with the error
|
||||||
|
.BR EBUSY .
|
||||||
.SH FILES
|
.SH FILES
|
||||||
/dev/loop[0-7]: The loop block special device files
|
.IR /dev/loop* :
|
||||||
|
the loop block special device files
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
.BR losetup (8),
|
.BR losetup (8),
|
||||||
.BR mount (8)
|
.BR mount (8)
|
||||||
|
|
Loading…
Reference in New Issue