mirror of
https://github.com/ostreedev/ostree.git
synced 2024-10-26 08:55:19 +03:00
Merge pull request #3136 from ericcurtin/pr-3134-feedback
This commit is contained in:
commit
062cf603bd
@ -90,7 +90,7 @@ License along with this library. If not, see <https://www.gnu.org/licenses/>.
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>-Q, --query-booted</option></term>
|
||||
<term><option>-D, --is-default</option></term>
|
||||
|
||||
<listitem><para>
|
||||
Output the string <literal>default</literal> if the default deployment
|
||||
@ -111,7 +111,7 @@ License along with this library. If not, see <https://www.gnu.org/licenses/>.
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--version</option>--version</term>
|
||||
<term><option>--version</option></term>
|
||||
|
||||
<listitem><para>
|
||||
Print version information and exit
|
||||
|
@ -30,21 +30,17 @@
|
||||
|
||||
static gboolean opt_verify;
|
||||
static gboolean opt_skip_signatures;
|
||||
static gboolean opt_query_booted;
|
||||
static gboolean opt_is_default;
|
||||
|
||||
static GOptionEntry options[] = {
|
||||
{ "verify", 'V', 0, G_OPTION_ARG_NONE, &opt_verify, "Print the commit verification status",
|
||||
NULL },
|
||||
{ "skip-signatures", 'S', 0, G_OPTION_ARG_NONE, &opt_skip_signatures, "Skip signatures in output",
|
||||
NULL },
|
||||
{ "query-booted", 'Q', 0, G_OPTION_ARG_NONE, &opt_query_booted,
|
||||
"Output the string \"default\" if the default deployment is the booted one, \"not-default\" if "
|
||||
"we are booted in a non-default deployment (e.g. the user interactively chose a different "
|
||||
"entry in the bootloader menu, or the bootloader rolled back automatically, etc.). If we are "
|
||||
"not in a booted OSTree system, an error is returned.",
|
||||
NULL },
|
||||
{ NULL }
|
||||
};
|
||||
static GOptionEntry options[]
|
||||
= { { "verify", 'V', 0, G_OPTION_ARG_NONE, &opt_verify, "Print the commit verification status",
|
||||
NULL },
|
||||
{ "skip-signatures", 'S', 0, G_OPTION_ARG_NONE, &opt_skip_signatures,
|
||||
"Skip signatures in output", NULL },
|
||||
{ "is-default", 'D', 0, G_OPTION_ARG_NONE, &opt_is_default,
|
||||
"Output \"default\" if booted into the default deployment, otherwise \"not-default\"",
|
||||
NULL },
|
||||
{ NULL } };
|
||||
static gboolean
|
||||
deployment_print_status (OstreeSysroot *sysroot, OstreeRepo *repo, OstreeDeployment *deployment,
|
||||
gboolean is_booted, gboolean is_pending, gboolean is_rollback,
|
||||
@ -210,7 +206,7 @@ ot_admin_builtin_status (int argc, char **argv, OstreeCommandInvocation *invocat
|
||||
if (booted_deployment)
|
||||
ostree_sysroot_query_deployments_for (sysroot, NULL, &pending_deployment, &rollback_deployment);
|
||||
|
||||
if (opt_query_booted)
|
||||
if (opt_is_default)
|
||||
{
|
||||
if (deployments->len == 0)
|
||||
return glnx_throw (error, "Not in a booted OSTree system");
|
||||
|
Loading…
Reference in New Issue
Block a user