Add option dev_offset to parse_mount_options

pull/48/head
Konstantin Germanov 2022-06-28 07:10:37 -04:00
parent 5ecfcc5e88
commit 23d3ddd6ee
2 changed files with 6 additions and 0 deletions

View File

@ -132,6 +132,7 @@ const struct DEFOPTION optionlist[] = {
{ "-h", OPT_HELP, FLGOPT_BOGUS },
{ "--version", OPT_VERSION, FLGOPT_BOGUS },
{ "-V", OPT_VERSION, FLGOPT_BOGUS },
{ "dev_offset", OPT_DEV_OFFSET, FLGOPT_DECIMAL },
{ (const char*)NULL, 0, 0 } /* end marker */
} ;
@ -519,6 +520,9 @@ char *parse_mount_options(ntfs_fuse_context_t *ctx,
goto err_exit;
}
break;
case OPT_DEV_OFFSET :
ctx->dev_offset = strtoull(val, 0, 0);
break;
case OPT_FSNAME : /* Filesystem name. */
/*
* We need this to be able to check whether filesystem

View File

@ -96,6 +96,7 @@ enum {
OPT_SPECIAL_FILES,
OPT_HELP,
OPT_VERSION,
OPT_DEV_OFFSET,
} ;
/* Option flags */
@ -178,6 +179,7 @@ typedef struct {
struct SECURITY_CONTEXT security;
struct open_file *open_files; /* only defined in lowntfs-3g */
u64 latest_ghost;
s64 dev_offset;
} ntfs_fuse_context_t;
extern const char *EXEC_NAME;