public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Fao, Sean" <sean.fao@capitalgenomix.com>
To: linux-kernel@vger.kernel.org, zippel@linux-m68k.org
Subject: [PATCH 3/3] kconfig and lxdialog, kernel 2.6.13.4
Date: Thu, 27 Oct 2005 12:07:32 -0400	[thread overview]
Message-ID: <4360FB44.3010900@capitalgenomix.com> (raw)

This patch is a functionality modification that implements a proposed 
design change to lxdialog.  Specifically, this patch makes use of the 
proposed "Abort" functionality of lxdialog, which adds an "Abort" button 
in *addition* to the "Yes" and "No" buttons that are currently displayed 
when a user exits kconfig.  The Abort button allows a user to return to 
the root menu of kconfig rather than exiting.

Signed-off-by: Sean E. Fao <sean.fao@capitalgenomix.com>

diff -up linux-2.6.13.4/scripts/kconfig/mconf.c 
linux/scripts/kconfig/mconf.c
--- linux-2.6.13.4/scripts/kconfig/mconf.c    2005-10-10 
13:54:29.000000000 -0500
+++ linux/scripts/kconfig/mconf.c    2005-10-27 09:32:09.000000000 -0500
@@ -1041,7 +1041,7 @@ int main(int ac, char **av)
 {
     struct symbol *sym;
     char *mode;
-    int stat;
+    int stat, abort;
 
     setlocale(LC_ALL, "");
     bindtextdomain(PACKAGE, LOCALEDIR);
@@ -1064,34 +1064,44 @@ int main(int ac, char **av)
     tcgetattr(1, &ios_org);
     atexit(conf_cleanup);
     init_wsize();
-    conf(&rootmenu);
 
-    do {
-        cprint_init();
-        cprint("--yesno");
-        cprint(_("Do you wish to save your new kernel configuration?"));
-        cprint("5");
-        cprint("60");
-        stat = exec_conf();
-    } while (stat < 0);
-
-    if (stat == 0) {
-        if (conf_write(NULL)) {
-            fprintf(stderr, _("\n\n"
-                "Error during writing of the kernel configuration.\n"
-                "Your kernel configuration changes were NOT saved."
-                "\n\n"));
-            return 1;
-        }
-        printf(_("\n\n"
-            "*** End of Linux kernel configuration.\n"
-            "*** Execute 'make' to build the kernel or try 'make help'."
-            "\n\n"));
-    } else {
-        fprintf(stderr, _("\n\n"
-            "Your kernel configuration changes were NOT saved."
-            "\n\n"));
-    }
+  /* Loop if abort button is pushed from exit dialog */
+  do
+  {
+      conf(&rootmenu);
+
+      do {
+          cprint_init();
+          cprint("--yesnoabort");
+          cprint(_("Do you wish to save your new kernel configuration?"));
+          cprint("5");
+          cprint("60");
+          stat = exec_conf();
+      } while (stat < 0);
+
+      if (stat == 0) {
+          if (conf_write(NULL)) {
+              fprintf(stderr, _("\n\n"
+                  "Error during writing of the kernel configuration.\n"
+                  "Your kernel configuration changes were NOT saved."
+                  "\n\n"));
+        abort = 0;
+              return 1;
+          }
+          printf(_("\n\n"
+              "*** End of Linux kernel configuration.\n"
+              "*** Execute 'make' to build the kernel or try 'make help'."
+              "\n\n"));
+      abort = 0;
+      } else if (stat == 2) {
+        abort = 1;
+    } else {
+            fprintf(stderr, _("\n\n"
+                "Your kernel configuration changes were NOT saved."
+                "\n\n"));
+        abort = 0;
+      }
+  } while (abort); /* Loop if abort button is pushed from exit dialog */
 
     return 0;
 }

-- 
Sean


             reply	other threads:[~2005-10-27 16:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-27 16:07 Fao, Sean [this message]
2005-10-27 21:27 ` [PATCH 3/3] kconfig and lxdialog, kernel 2.6.13.4 Roman Zippel
2005-11-04 15:42   ` [PATCH 3/3] kconfig and lxdialog, kernel 2.6.14 sean
2005-11-04 16:03     ` sean.fao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4360FB44.3010900@capitalgenomix.com \
    --to=sean.fao@capitalgenomix.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zippel@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox