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

Re: [PATCH 2/2] When in devel mode, do not catch tracebacks, we want the core file



Hi Martin,

On 07/07/2010 09:16 AM, Martin Sivak wrote:
-    /* unless the user specifies that they want utf8 */
+    /* check for development mode early */

Omitted from the first patch, eh?

+
+        /* Restore terminal */
+        cfd =  open("/dev/console", O_RDONLY);
+        tcsetattr(cfd, TCSANOW,&orig_cmode);
+        fcntl(cfd, F_SETFL, orig_flags);
+        close(cfd);
+

Is this to kill the rubbish terminal settings left by Newt?

+    /* check for development mode early */
+    if (g_file_get_contents("/proc/cmdline",&buf, NULL, NULL) == TRUE) {
+        if (strstr(buf, "devel")) {
+            isDevelMode = 1;
+        }
+        g_free(buf);
+    }

Two things about this chunk:
1) similar thing is happening in init.c already (your first patch). Can't you move this away into a library somewhere? 2) this will break if another kernel argument or option containing 'devel' is used. like in "inexpertlydevelopedmode".

Ales


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