Skip to content

Commit

Permalink
Merge pull request #1166 from sidt4/udisksctl-no-partition-scan
Browse files Browse the repository at this point in the history
udisksctl: Add "--no-partition-scan" option for "loop-setup" command
  • Loading branch information
tbzatek committed Aug 8, 2023
2 parents 8fa2d2b + 199e876 commit 1bef32d
Showing 1 changed file with 14 additions and 0 deletions.
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

0 comments on commit 1bef32d

Please sign in to comment.