From 18485dd984ebba7ae2061eaf94b5660889ab6f36 Mon Sep 17 00:00:00 2001 From: Konstantin Germanov Date: Wed, 29 Jun 2022 05:44:44 -0400 Subject: [PATCH] Add option dev_offset to ntfs-3g --- src/ntfs-3g.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c index d8227e71..eea9f523 100644 --- a/src/ntfs-3g.c +++ b/src/ntfs-3g.c @@ -202,7 +202,7 @@ static const char *usage_msg = "\n" "Usage: %s [-o option[,...]] \n" "\n" -"Options: ro (read-only mount), windows_names, uid=, gid=,\n" +"Options: ro (read-only mount), windows_names, dev_offset=, uid=, gid=,\n" " umask=, fmask=, dmask=, streams_interface=.\n" " Please see the details in the manual (type: man ntfs-3g).\n" "\n" @@ -4020,7 +4020,7 @@ static int ntfs_fuse_init(void) return 0; } -static int ntfs_open(const char *device) +static int ntfs_open(const char *device, const s64 dev_offset) { unsigned long flags = 0; @@ -4036,7 +4036,7 @@ static int ntfs_open(const char *device) if (ctx->hiberfile) flags |= NTFS_MNT_IGNORE_HIBERFILE; - ctx->vol = ntfs_mount(device, flags); + ctx->vol = ntfs_mount_ext(device, flags, dev_offset); if (!ctx->vol) { ntfs_log_perror("Failed to mount '%s'", device); goto err_out; @@ -4452,7 +4452,7 @@ int main(int argc, char *argv[]) goto err2; } #endif - err = ntfs_open(opts.device); + err = ntfs_open(opts.device, ctx->dev_offset); if (err) goto err_out;