diff --git a/src/ntfs-3g_common.c b/src/ntfs-3g_common.c index 29021dfc..a5bbe3dc 100644 --- a/src/ntfs-3g_common.c +++ b/src/ntfs-3g_common.c @@ -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 diff --git a/src/ntfs-3g_common.h b/src/ntfs-3g_common.h index 8ead5107..1161328f 100644 --- a/src/ntfs-3g_common.h +++ b/src/ntfs-3g_common.h @@ -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;