Implemented some more functions. Next big step : AddBacking

This commit is contained in:
2024-02-18 00:28:42 +01:00
parent 051b95484c
commit dcdec67476
5 changed files with 85 additions and 4 deletions

View File

@@ -1,7 +1,15 @@
#include "backing.h"
#include "disk.h"
#include "entry.h"
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <dirent.h>
#include <unistd.h>
#include <libgen.h>
#include <sys/stat.h>
bool IsBackingIdentifierValid(const char* backing_identifier) {
if (backing_identifier == NULL)
@@ -22,7 +30,7 @@ bool IsBackingIdentifierValid(const char* backing_identifier) {
return false;
// Check that the identifier starts with a number
if (backing_identifier[0] >= '0' && backing_identifier[0] <= '9')
if (backing_identifier[0] < '0' || backing_identifier[0] > '9')
return false;
return true;