Add option dev_offset to lowntfs-3g
parent
23d3ddd6ee
commit
5447c6436e
|
@ -267,7 +267,7 @@ static const char *usage_msg =
|
|||
"\n"
|
||||
"Usage: %s [-o option[,...]] <device|image_file> <mount_point>\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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue