Skip to content

Commit

Permalink
Made filedisk global
Browse files Browse the repository at this point in the history
  • Loading branch information
FranciscoGauna committed Oct 29, 2024
1 parent 20ee33d commit 9a73ed1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fisopfs/fisopfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

#define DEFAULT_FILE_DISK "persistency_file.fisopfs"

char* filedisk = DEFAULT_FILE_DISK;

static int
fisopfs_getattr(const char *path, struct stat *st)
{
Expand Down Expand Up @@ -93,8 +95,6 @@ static struct fuse_operations operations = {
int
main(int argc, char *argv[])
{
char* filedisk = DEFAULT_FILE_DISK;

for (int i = 1; i < argc - 1; i++){
if (strcmp(argv[i], "--filedisk") == 0){
filedisk = argv[i + 1];
Expand All @@ -109,6 +109,6 @@ main(int argc, char *argv[])
break;
}
}

return fuse_main(argc, argv, &operations, NULL);
}

0 comments on commit 9a73ed1

Please sign in to comment.