diff --git a/src/lowntfs-3g.c b/src/lowntfs-3g.c index 9330500c..5b16465f 100644 --- a/src/lowntfs-3g.c +++ b/src/lowntfs-3g.c @@ -267,7 +267,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), dev_offset=, windows_names, uid=, gid=,\n" " umask=, fmask=, dmask=, streams_interface=.\n" " Please see the details in the manual (type: man ntfs-3g).\n" "\n" @@ -4307,11 +4307,11 @@ 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; ntfs_volume *vol; - + if (!ctx->blkdev) flags |= NTFS_MNT_EXCLUSIVE; if (ctx->ro) @@ -4324,7 +4324,7 @@ static int ntfs_open(const char *device) if (ctx->hiberfile) flags |= NTFS_MNT_IGNORE_HIBERFILE; - ctx->vol = vol = ntfs_mount(device, flags); + ctx->vol = vol = ntfs_mount_ext(device, flags, dev_offset); if (!vol) { ntfs_log_perror("Failed to mount '%s'", device); goto err_out; @@ -4724,7 +4724,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;