diff mbox series

[manpages] listmount.2: fix verbiage about continuing the iteration

Message ID 20241113-main-v1-1-a6b738d56e55@kernel.org (mailing list archive)
State New
Headers show
Series [manpages] listmount.2: fix verbiage about continuing the iteration | expand

Commit Message

Jeff Layton Nov. 13, 2024, 2:49 p.m. UTC
The "+1" is wrong, since the kernel already increments the last_id. Fix
the manpage verbiage.

Cc: Josef Bacik <josef@toxicpanda.com>
Cc: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 man/man2/listmount.2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


---
base-commit: df69651a5c1abb61bd0d7ba0791f65f427923f75
change-id: 20241113-main-192abec3348e

Best regards,

Comments

Alejandro Colomar Nov. 13, 2024, 3:59 p.m. UTC | #1
Hi Jeff,

On Wed, Nov 13, 2024 at 09:49:02AM GMT, Jeff Layton wrote:
> The "+1" is wrong, since the kernel already increments the last_id. Fix
> the manpage verbiage.

If it's not too difficult, could you show a small example program that
shows this?  Thanks!

Have a lovely day!
Alex

> 
> Cc: Josef Bacik <josef@toxicpanda.com>
> Cc: Miklos Szeredi <miklos@szeredi.hu>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
>  man/man2/listmount.2 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/man/man2/listmount.2 b/man/man2/listmount.2
> index 717581b85e12dc172b7c478b4608665e9da74933..00ac6a60c0cfead5c462fcac44e61647d841ffe5 100644
> --- a/man/man2/listmount.2
> +++ b/man/man2/listmount.2
> @@ -67,7 +67,7 @@ is used to tell the kernel what mount ID to start the list from.
>  This is useful if multiple calls to
>  .BR listmount (2)
>  are required.
> -This can be set to the last mount ID returned + 1 in order to
> +This can be set to the last mount ID returned in order to
>  resume from a previous spot in the list.
>  .SH RETURN VALUE
>  On success, the number of entries filled into
> 
> ---
> base-commit: df69651a5c1abb61bd0d7ba0791f65f427923f75
> change-id: 20241113-main-192abec3348e
> 
> Best regards,
> -- 
> Jeff Layton <jlayton@kernel.org>
> 
>
Jeff Layton Nov. 13, 2024, 5:12 p.m. UTC | #2
On Wed, 2024-11-13 at 16:59 +0100, Alejandro Colomar wrote:
> Hi Jeff,
> 
> On Wed, Nov 13, 2024 at 09:49:02AM GMT, Jeff Layton wrote:
> > The "+1" is wrong, since the kernel already increments the last_id. Fix
> > the manpage verbiage.
> 
> If it's not too difficult, could you show a small example program that
> shows this?  Thanks!
> 
> Have a lovely day!
> Alex
> 

It's not too small, but I proposed this program as a sample for the
kernel:

    https://lore.kernel.org/linux-fsdevel/20241112-statmount-v1-1-d98090c4c8be@kernel.org/

It has a bug though that Miklos pointed out, since I followed the
manpage. I'll be fixing that soon.

> > 
> > Cc: Josef Bacik <josef@toxicpanda.com>
> > Cc: Miklos Szeredi <miklos@szeredi.hu>
> > Signed-off-by: Jeff Layton <jlayton@kernel.org>
> > ---
> >  man/man2/listmount.2 | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/man/man2/listmount.2 b/man/man2/listmount.2
> > index 717581b85e12dc172b7c478b4608665e9da74933..00ac6a60c0cfead5c462fcac44e61647d841ffe5 100644
> > --- a/man/man2/listmount.2
> > +++ b/man/man2/listmount.2
> > @@ -67,7 +67,7 @@ is used to tell the kernel what mount ID to start the list from.
> >  This is useful if multiple calls to
> >  .BR listmount (2)
> >  are required.
> > -This can be set to the last mount ID returned + 1 in order to
> > +This can be set to the last mount ID returned in order to
> >  resume from a previous spot in the list.
> >  .SH RETURN VALUE
> >  On success, the number of entries filled into
> > 
> > ---
> > base-commit: df69651a5c1abb61bd0d7ba0791f65f427923f75
> > change-id: 20241113-main-192abec3348e
> > 
> > Best regards,
> > -- 
> > Jeff Layton <jlayton@kernel.org>
> > 
> > 
>
diff mbox series

Patch

diff --git a/man/man2/listmount.2 b/man/man2/listmount.2
index 717581b85e12dc172b7c478b4608665e9da74933..00ac6a60c0cfead5c462fcac44e61647d841ffe5 100644
--- a/man/man2/listmount.2
+++ b/man/man2/listmount.2
@@ -67,7 +67,7 @@  is used to tell the kernel what mount ID to start the list from.
 This is useful if multiple calls to
 .BR listmount (2)
 are required.
-This can be set to the last mount ID returned + 1 in order to
+This can be set to the last mount ID returned in order to
 resume from a previous spot in the list.
 .SH RETURN VALUE
 On success, the number of entries filled into