Made some minor adjustments

This commit is contained in:
2024-02-22 01:09:11 +01:00
parent 6f47b7f274
commit 2cad33d0e6
9 changed files with 120 additions and 29 deletions

View File

@@ -447,6 +447,16 @@ result_t get_backing_info(disk_info_t* _info, const char* backing) {
}
result_t sync_backing_pool(void) {
// Check that the file /etc/sandbox.d/sync exists
struct stat st;
errno = 0;
if (stat("/etc/sandbox.d/sync", &st) != 0) {
if (errno == ENOENT)
return success();
else
return failure("Failed to check if /etc/sandbox.d/sync exists (%s).", strerror(errno));
}
// Execute /etc/sandbox.d/sync with the backing pool as the working directory
int exit_code;
// char* stdoutbuf;