[gnome-disk-utility/wip/kailueke/no-xid: 2/2] Don't allow to specify both --format-device and --restore-disk-image




commit 2551d58630245d73d57181f24ed52b93b9f90c4c
Author: Kai Lüke <kailueke riseup net>
Date:   Sun Feb 7 23:43:17 2021 +0100

    Don't allow to specify both --format-device and --restore-disk-image

 src/disks/gduapplication.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/src/disks/gduapplication.c b/src/disks/gduapplication.c
index 1358d179..6d091780 100644
--- a/src/disks/gduapplication.c
+++ b/src/disks/gduapplication.c
@@ -209,6 +209,12 @@ gdu_application_command_line (GApplication            *_app,
       goto out;
     }
 
+  if (opt_format && opt_restore_disk_image != NULL)
+    {
+      g_application_command_line_printerr (command_line, _("--format-device must not be used together with 
--restore-disk-image"));
+      goto out;
+    }
+
   gdu_application_ensure_client (app);
 
   if (opt_block_device != NULL)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]