* [PATCH 1/2] libmount: Fix typo in comment
@ 2013-10-09 15:17 Namhyung Kim
2013-10-09 15:17 ` [PATCH 2/2] libmount: Fix mnt_context_is_child() Namhyung Kim
2013-10-11 8:53 ` [PATCH 1/2] libmount: Fix typo in comment Karel Zak
0 siblings, 2 replies; 5+ messages in thread
From: Namhyung Kim @ 2013-10-09 15:17 UTC (permalink / raw)
To: util-linux
s/MNT_OMASK_/MNT_OMODE_/
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
---
libmount/src/context.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libmount/src/context.c b/libmount/src/context.c
index 0f8f112..04eb286 100644
--- a/libmount/src/context.c
+++ b/libmount/src/context.c
@@ -229,7 +229,7 @@ int mnt_context_is_restricted(struct libmnt_context *cxt)
/**
* mnt_context_set_optsmode
* @cxt: mount context
- * @mode: MNT_OMASK_* flags
+ * @mode: MNT_OMODE_* flags
*
* Controls how to use mount optionssource and target paths from fstab/mtab.
*
@@ -276,7 +276,7 @@ int mnt_context_set_optsmode(struct libmnt_context *cxt, int mode)
* mnt_context_get_optsmode
* @cxt: mount context
*
- * Returns: MNT_OMASK_* mask or zero.
+ * Returns: MNT_OMODE_* mask or zero.
*/
int mnt_context_get_optsmode(struct libmnt_context *cxt)
--
1.7.9.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] libmount: Fix mnt_context_is_child()
2013-10-09 15:17 [PATCH 1/2] libmount: Fix typo in comment Namhyung Kim
@ 2013-10-09 15:17 ` Namhyung Kim
2013-10-11 8:55 ` Karel Zak
2013-10-11 8:53 ` [PATCH 1/2] libmount: Fix typo in comment Karel Zak
1 sibling, 1 reply; 5+ messages in thread
From: Namhyung Kim @ 2013-10-09 15:17 UTC (permalink / raw)
To: util-linux
It should check if fork (mount -F) is enabled.
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
---
libmount/src/context.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libmount/src/context.c b/libmount/src/context.c
index 04eb286..a4d9824 100644
--- a/libmount/src/context.c
+++ b/libmount/src/context.c
@@ -387,7 +387,7 @@ int mnt_context_is_parent(struct libmnt_context *cxt)
*/
int mnt_context_is_child(struct libmnt_context *cxt)
{
- return !mnt_context_is_fork(cxt) && cxt->pid;
+ return mnt_context_is_fork(cxt) && cxt->pid;
}
/**
--
1.7.9.2
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 2/2] libmount: Fix mnt_context_is_child()
2013-10-09 15:17 ` [PATCH 2/2] libmount: Fix mnt_context_is_child() Namhyung Kim
@ 2013-10-11 8:55 ` Karel Zak
2013-10-12 3:50 ` Namhyung Kim
0 siblings, 1 reply; 5+ messages in thread
From: Karel Zak @ 2013-10-11 8:55 UTC (permalink / raw)
To: Namhyung Kim; +Cc: util-linux
On Thu, Oct 10, 2013 at 12:17:09AM +0900, Namhyung Kim wrote:
> It should check if fork (mount -F) is enabled.
>
> Signed-off-by: Namhyung Kim <namhyung@gmail.com>
> ---
> libmount/src/context.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libmount/src/context.c b/libmount/src/context.c
> index 04eb286..a4d9824 100644
> --- a/libmount/src/context.c
> +++ b/libmount/src/context.c
> @@ -387,7 +387,7 @@ int mnt_context_is_parent(struct libmnt_context *cxt)
> */
> int mnt_context_is_child(struct libmnt_context *cxt)
> {
> - return !mnt_context_is_fork(cxt) && cxt->pid;
> + return mnt_context_is_fork(cxt) && cxt->pid;
> }
No, the code is correct, the function docs is incorrect. The fork
flag is disabled in all children (see mnt_fork_context()) to avoid
recursive forking.
I have fixed the function comment.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH 2/2] libmount: Fix mnt_context_is_child()
2013-10-11 8:55 ` Karel Zak
@ 2013-10-12 3:50 ` Namhyung Kim
0 siblings, 0 replies; 5+ messages in thread
From: Namhyung Kim @ 2013-10-12 3:50 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
Hi Karel,
2013-10-11 (금), 10:55 +0200, Karel Zak:
> On Thu, Oct 10, 2013 at 12:17:09AM +0900, Namhyung Kim wrote:
> > It should check if fork (mount -F) is enabled.
> >
> > Signed-off-by: Namhyung Kim <namhyung@gmail.com>
> > ---
> > libmount/src/context.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libmount/src/context.c b/libmount/src/context.c
> > index 04eb286..a4d9824 100644
> > --- a/libmount/src/context.c
> > +++ b/libmount/src/context.c
> > @@ -387,7 +387,7 @@ int mnt_context_is_parent(struct libmnt_context *cxt)
> > */
> > int mnt_context_is_child(struct libmnt_context *cxt)
> > {
> > - return !mnt_context_is_fork(cxt) && cxt->pid;
> > + return mnt_context_is_fork(cxt) && cxt->pid;
> > }
>
> No, the code is correct, the function docs is incorrect. The fork
> flag is disabled in all children (see mnt_fork_context()) to avoid
> recursive forking.
>
> I have fixed the function comment.
Okay, thanks for the explanation.
--
Regards,
Namhyung Kim
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] libmount: Fix typo in comment
2013-10-09 15:17 [PATCH 1/2] libmount: Fix typo in comment Namhyung Kim
2013-10-09 15:17 ` [PATCH 2/2] libmount: Fix mnt_context_is_child() Namhyung Kim
@ 2013-10-11 8:53 ` Karel Zak
1 sibling, 0 replies; 5+ messages in thread
From: Karel Zak @ 2013-10-11 8:53 UTC (permalink / raw)
To: Namhyung Kim; +Cc: util-linux
On Thu, Oct 10, 2013 at 12:17:08AM +0900, Namhyung Kim wrote:
> libmount/src/context.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-10-12 3:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-09 15:17 [PATCH 1/2] libmount: Fix typo in comment Namhyung Kim
2013-10-09 15:17 ` [PATCH 2/2] libmount: Fix mnt_context_is_child() Namhyung Kim
2013-10-11 8:55 ` Karel Zak
2013-10-12 3:50 ` Namhyung Kim
2013-10-11 8:53 ` [PATCH 1/2] libmount: Fix typo in comment Karel Zak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox