diff mbox series

[2/3] tst_fs.h: Improve tst_fibmap() doc

Message ID 20231011160822.578637-3-pvorel@suse.cz
State Accepted
Headers show
Series Cleanup tst_ioctl.c, libswap.c | expand

Commit Message

Petr Vorel Oct. 11, 2023, 4:08 p.m. UTC
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 include/tst_fs.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Cyril Hrubis Jan. 19, 2024, 11:20 a.m. UTC | #1
Hi!
>  /*
> - * test if FIBMAP ioctl is supported
> + * Check if FIBMAP ioctl is supported.
> + * Tests which use tst_fibmap() should use .needs_root = 1 to avoid EPERM.
               ^
	       Maybe just:

	       Tests nees to set .needs_root = 1 in order to avoid EPERM.

> + * @return 0: FIBMAP is supported, 1: FIBMAP is *not* supported.

Otherwise it looks good.

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Petr Vorel Jan. 19, 2024, 1:15 p.m. UTC | #2
> Hi!
> >  /*
> > - * test if FIBMAP ioctl is supported
> > + * Check if FIBMAP ioctl is supported.
> > + * Tests which use tst_fibmap() should use .needs_root = 1 to avoid EPERM.
>                ^
> 	       Maybe just:

> 	       Tests nees to set .needs_root = 1 in order to avoid EPERM.
+1 (with "needs")

Thanks, merged!

Kind regards,
Petr

> > + * @return 0: FIBMAP is supported, 1: FIBMAP is *not* supported.

> Otherwise it looks good.

> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
diff mbox series

Patch

diff --git a/include/tst_fs.h b/include/tst_fs.h
index 769fac1e5..3dd0d7524 100644
--- a/include/tst_fs.h
+++ b/include/tst_fs.h
@@ -209,7 +209,10 @@  int tst_fs_in_skiplist(const char *fs_type, const char *const *skiplist);
 void tst_fill_fs(const char *path, int verbose, enum tst_fill_access_pattern pattern);
 
 /*
- * test if FIBMAP ioctl is supported
+ * Check if FIBMAP ioctl is supported.
+ * Tests which use tst_fibmap() should use .needs_root = 1 to avoid EPERM.
+ *
+ * @return 0: FIBMAP is supported, 1: FIBMAP is *not* supported.
  */
 int tst_fibmap(const char *filename);