bind-mount: Factor out bind_mount_result_to_string()

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie
2021-06-23 18:56:38 +01:00
parent 7f38ab6cf1
commit 6ceba45306
2 changed files with 64 additions and 38 deletions

View File

@@ -18,6 +18,8 @@
#pragma once
#include "utils.h"
typedef enum {
BIND_READONLY = (1 << 0),
BIND_DEVICES = (1 << 2),
@@ -41,6 +43,9 @@ bind_mount_result bind_mount (int proc_fd,
const char *dest,
bind_option_t options);
const char *bind_mount_result_to_string (bind_mount_result res,
bool *want_errno);
void die_with_bind_result (bind_mount_result res,
int saved_errno,
const char *format,