Add root_mounted() function that returns true if the root file system is

already mounted.
This commit is contained in:
Pawel Jakub Dawidek 2007-04-08 23:54:01 +00:00
parent dc5a36e241
commit 2eb68d493f
2 changed files with 15 additions and 0 deletions

View File

@ -1383,6 +1383,20 @@ root_mount_done(void)
mtx_unlock(&mountlist_mtx);
}
/*
* Return true if root is already mounted.
*/
int
root_mounted(void)
{
int mounted;
mtx_lock(&mountlist_mtx);
mounted = root_mount_complete;
mtx_unlock(&mountlist_mtx);
return (mounted);
}
/*
* Wait until root is mounted.
*/

View File

@ -340,6 +340,7 @@ struct root_hold_token;
struct root_hold_token *root_mount_hold(const char *identifier);
void root_mount_rel(struct root_hold_token *h);
void root_mount_wait(void);
int root_mounted(void);
/*