From 9afbc4f37f3da5576b07563f2089d0408b1bf596 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20DEL=20NERO?= Date: Mon, 6 Dec 2021 19:31:58 +0100 Subject: [PATCH] dynamic commands documented. --- README.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/README.md b/README.md index 9537429..f9f3f74 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,8 @@ The uMTP-Responder allows files to be transferred to and from devices through th - Storages mount / unmount. +- Storages lock / unlock. + - GadgetFS and FunctionFS/libcomposite modes supported. ## Which platforms are supported ? @@ -119,6 +121,53 @@ Check the file [umtprd.conf](conf/umtprd.conf) file for details on available opt Once you have configured the correct settings in umtprd.conf, you can use umtprd_ffs.sh or umtprd_gfs.sh to launch it in FunctionFS/GadgetFS mode or use udev to launch the deamon when the usb device port is connected. +## Runtime operations + +uMTP-Responder supports dynamic commands to add/mount/umount/remove storages and lock/unlock storages. + +Examples: + +Unlock all locked storages (set with the 'locked' option in the configuration file) : + +```c +umtprd -cmd:unlock +``` + +Lock all lockable storages (set with the 'locked' option in the configuration file) : + +```c +umtprd -cmd:lock +``` + +"addstorage"/"rmstorage" commands to dynamically add/remove storages : + +```c +umtprd '-cmd:addstorage:/tmp Tmp rw' +``` + +```c +umtprd '-cmd:rmstorage:Tmp' +``` + +Use double-quotes when arguments have spaces in them: + +```c +umtprd '-cmd:addstorage:/path "My Path" rw,removable' + +```c +umtprd '-cmd:rmstorage:"My Path"' +``` + +"mount"/"unmount" commands to dynamically mount/unmount storages. + +```c +umtprd '-cmd:mount:"Storage name"' +``` + +```c +umtprd '-cmd:unmount:"Storage name"' +``` + ## License This project is licensed under the GNU General Public License version 3 - see the [LICENSE](LICENSE) file for details