[LTP] [PATCH 2/2] doc/c-test-api.txt: Improve tst_find_backing_dev() doc
Petr Vorel
pvorel@suse.cz
Thu Nov 10 18:52:36 CET 2022
Doc added in 606903cf8 was too complicated. Also there was repeating
sentence, typo 'unevent'.
While at it, fix also 'voud' typo from 9343d0486.
Fixes: 606903cf8 ("c-test-api: Documentation updated")
Fixes: 9343d0486 ("tst_device: Add new api tst_find_backing_dev(path, dev)")
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
doc/c-test-api.txt | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/doc/c-test-api.txt b/doc/c-test-api.txt
index 8844d9f2f..834a342fd 100644
--- a/doc/c-test-api.txt
+++ b/doc/c-test-api.txt
@@ -1075,12 +1075,9 @@ is created for that intention.
void tst_find_backing_dev(const char *path, char *dev);
-------------------------------------------------------------------------------
-This function finds the block dev that this path belongs to, it uses stat function
-to get the major/minor number of the path.
-This function finds the block dev that this path belongs to, it uses the unevent
-file in sysfs to find the device name. It needs to discriminate between btrfs
-and not btrfs. For non btrfs filesystems it uses the minor, major numbers. For
-btrfs it uses the fs uuid.
+This function finds the block dev that this path belongs to, using uevent in sysfs.
+For Btrfs it uses '/sys/fs/btrfs/UUID/devices/DEV_NAME/uevent'; for other
+filesystems it uses '/sys/dev/block/MAJOR:MINOR/uevent'.
[source,c]
-------------------------------------------------------------------------------
--
2.38.0
More information about the ltp
mailing list