Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

udisksctl: Add "--no-partition-scan" option for "loop-setup" command #1166

Merged
merged 1 commit into from
Aug 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions tools/udisksctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1402,6 +1402,7 @@ static gboolean opt_loop_no_user_interaction = FALSE;
static gboolean opt_loop_read_only = FALSE;
static gint64 opt_loop_offset = 0;
static gint64 opt_loop_size = 0;
static gboolean opt_loop_no_partition_scan = FALSE;

static const GOptionEntry command_loop_setup_entries[] =
{
Expand Down Expand Up @@ -1450,6 +1451,15 @@ static const GOptionEntry command_loop_setup_entries[] =
"Do not authenticate the user if needed",
NULL
},
{
"no-partition-scan",
0, /* no short option */
0,
G_OPTION_ARG_NONE,
&opt_loop_no_partition_scan,
"Do not scan the loop device for partitions",
NULL
},
{
NULL
}
Expand Down Expand Up @@ -1645,6 +1655,10 @@ handle_command_loop (gint *argc,
g_variant_builder_add (&builder,
"{sv}",
"size", g_variant_new_uint64 (opt_loop_size));
if (opt_loop_no_partition_scan)
g_variant_builder_add (&builder,
"{sv}",
"no-part-scan", g_variant_new_boolean (TRUE));
}
options = g_variant_builder_end (&builder);
g_variant_ref_sink (options);
Expand Down