mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-23 10:09:57 +00:00
mount: Add comment to is_root_xxx checks
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
a0049bfe6a
commit
08b893fd03
1 changed files with 9 additions and 0 deletions
9
mount.c
9
mount.c
|
|
@ -50,11 +50,20 @@ static inline int is_root(char *p)
|
|||
return p[0] == '/' && p[1] == '\0';
|
||||
}
|
||||
|
||||
/* True for the root mount (the topmost one) */
|
||||
static inline int is_root_mount(struct mount_info *mi)
|
||||
{
|
||||
return is_root(mi->mountpoint);
|
||||
}
|
||||
|
||||
/*
|
||||
* True if the mountpoint target is root on its FS.
|
||||
*
|
||||
* This is used to determine whether we need to postpone
|
||||
* mounting. E.g. one can bind mount some subdir from a
|
||||
* disk, and in this case we'll have to get the root disk
|
||||
* mount first, then bind-mount it. See do_mount_one().
|
||||
*/
|
||||
static inline int fsroot_mounted(struct mount_info *mi)
|
||||
{
|
||||
return is_root(mi->root);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue