All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Heinrich Schuchardt <xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/1] fanotify.7: allow relative paths in example
Date: Tue, 11 Nov 2014 06:38:06 +0100	[thread overview]
Message-ID: <5461A0BE.3010302@gmail.com> (raw)
In-Reply-To: <1415037998-3821-1-git-send-email-xypron.glpk-Mmb7MZpHnFY@public.gmane.org>

On 11/03/2014 07:06 PM, Heinrich Schuchardt wrote:
> The current example code requires passing an absolute
> path to the mount to be watched.
> 
> By passing AT_FDCWD to fanotify_mark it can use both
> absolute and relative pathes.

Thanks, Heinrich. Applied.

Cheers,

Michael

> Signed-off-by: Heinrich Schuchardt <xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
> ---
>  man7/fanotify.7 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/man7/fanotify.7 b/man7/fanotify.7
> index d6f2542..27bd0f8 100644
> --- a/man7/fanotify.7
> +++ b/man7/fanotify.7
> @@ -691,7 +691,7 @@ main(int argc, char *argv[])
>           file descriptor */
>  
>      if (fanotify_mark(fd, FAN_MARK_ADD | FAN_MARK_MOUNT,
> -                      FAN_OPEN_PERM | FAN_CLOSE_WRITE, \-1,
> +                      FAN_OPEN_PERM | FAN_CLOSE_WRITE, AT_FDCWD,
>                        argv[1]) == \-1) {
>          perror("fanotify_mark");
>          exit(EXIT_FAILURE);
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2014-11-11  5:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-03 18:06 [PATCH 1/1] fanotify.7: allow relative paths in example Heinrich Schuchardt
     [not found] ` <1415037998-3821-1-git-send-email-xypron.glpk-Mmb7MZpHnFY@public.gmane.org>
2014-11-11  5:38   ` Michael Kerrisk (man-pages) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5461A0BE.3010302@gmail.com \
    --to=mtk.manpages-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=xypron.glpk-Mmb7MZpHnFY@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.