public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
From: cagney@sourceware.org
To: frysk-cvs@sourceware.org
Subject: [SCM]  master: Fix logging of pty in expunit; accept -trace frysk.expunit.
Date: Fri, 08 Feb 2008 22:41:00 -0000	[thread overview]
Message-ID: <20080208224104.21520.qmail@sourceware.org> (raw)

The branch, master has been updated
       via  a92ed3564375cfa4673641a266c79d6c8e520b9f (commit)
      from  7e1623d0b3e268b77e3eae2ca402bf6d6568fc26 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit a92ed3564375cfa4673641a266c79d6c8e520b9f
Author: Andrew Cagney <cagney@redhat.com>
Date:   Fri Feb 8 17:40:10 2008 -0500

    Fix logging of pty in expunit; accept -trace frysk.expunit.
    
    frysk-sys/frysk/rsl/ChangeLog
    2008-02-08  Andrew Cagney  <cagney@redhat.com>
    
    	* LogOption.java: Permit "frysk", assume fine.
    	* Log.java: In log, append Level with a colon.
    
    frysk-sys/frysk/sys/ChangeLog
    2008-02-08  Andrew Cagney  <cagney@redhat.com>
    
    	* PseudoTerminal.java (getName(int)): Replace getName().
    	* cni/PseudoTerminal.cxx (PseudoTerminal::getName): Update.

-----------------------------------------------------------------------

Summary of changes:
 frysk-sys/frysk/rsl/ChangeLog              |    3 ++
 frysk-sys/frysk/rsl/Log.java               |    2 +-
 frysk-sys/frysk/rsl/LogOption.java         |   19 ++++++++----
 frysk-sys/frysk/sys/ChangeLog              |    3 ++
 frysk-sys/frysk/sys/PseudoTerminal.java    |   42 ++++++++++++----------------
 frysk-sys/frysk/sys/cni/PseudoTerminal.cxx |    6 ++--
 6 files changed, 40 insertions(+), 35 deletions(-)

First 500 lines of diff:
diff --git a/frysk-sys/frysk/rsl/ChangeLog b/frysk-sys/frysk/rsl/ChangeLog
index af7279b..4a91958 100644
--- a/frysk-sys/frysk/rsl/ChangeLog
+++ b/frysk-sys/frysk/rsl/ChangeLog
@@ -1,5 +1,8 @@
 2008-02-08  Andrew Cagney  <cagney@redhat.com>
 
+	* LogOption.java: Permit "frysk", assume fine.
+	* Log.java: In log, append Level with a colon.
+	
 	* TestLog.java (testLevelComparison()): New.
 	* Log.java (set(Level)): Fix compareTo(Object) call.
 	* Node.java (get(Class)): Fix compareTo(Object) call.
diff --git a/frysk-sys/frysk/rsl/Log.java b/frysk-sys/frysk/rsl/Log.java
index bf317df..11b0359 100644
--- a/frysk-sys/frysk/rsl/Log.java
+++ b/frysk-sys/frysk/rsl/Log.java
@@ -128,7 +128,7 @@ public final class Log {
 	out.print(time % 1000);
 	out.print(": ");
 	out.print(path);
-	out.print(".");
+	out.print(":");
 	out.print(level.toPrint());
     }
 
diff --git a/frysk-sys/frysk/rsl/LogOption.java b/frysk-sys/frysk/rsl/LogOption.java
index 91555a2..1ef8d83 100644
--- a/frysk-sys/frysk/rsl/LogOption.java
+++ b/frysk-sys/frysk/rsl/LogOption.java
@@ -1,6 +1,6 @@
 // This file is part of the program FRYSK.
 //
-// Copyright 2005, 2007 Red Hat Inc.
+// Copyright 2005, 2007, 2008 Red Hat Inc.
 //
 // FRYSK is free software; you can redistribute it and/or modify it
 // under the terms of the GNU General Public License as published by
@@ -49,10 +49,10 @@ public class LogOption extends Option {
 
     public LogOption(String name) {
 	super(name,
-	      ("Set the logger LOG to level LEVEL.\n"
-	       + "The LEVEL can be [ NONE | FINE | FINEST ].\n"
-	       + "Example -" + name + " frysk=FINE"),
-	      "<LOG=LEVEL,...>");
+	      ("Set debug-tracing of COMP to LEVEL.\n"
+	       + "LEVEL can be [ NONE | FINE | FINEST ]; default is FINE.\n"
+	       + "Example: " + name + " frysk.rsl=FINE"),
+	      "<COMP=LEVEL,...>");
     }
     public void parsed (String arg0) throws OptionException {
 	level(arg0);
@@ -74,9 +74,14 @@ public class LogOption extends Option {
 	    Level level;
 	    switch (logLevel.length) {
 	    case 1:
-		// LEVEL
-		logger = root.get("");
+		// Either LEVEL or LOGGER
 		level = Level.valueOf(logLevel[0]);
+		if (level != null) {
+		    logger = root.get("");
+		} else {
+		    level = Level.FINE;
+		    logger = root.get(logLevel[0]);
+		}
 		break;
 	    case 2:
 		// LOGGER=LEVEL
diff --git a/frysk-sys/frysk/sys/ChangeLog b/frysk-sys/frysk/sys/ChangeLog
index 7c8ea16..29f7549 100644
--- a/frysk-sys/frysk/sys/ChangeLog
+++ b/frysk-sys/frysk/sys/ChangeLog
@@ -1,5 +1,8 @@
 2008-02-08  Andrew Cagney  <cagney@redhat.com>
 
+	* PseudoTerminal.java (getName(int)): Replace getName().
+	* cni/PseudoTerminal.cxx (PseudoTerminal::getName): Update.
+
 	* ProcessIdentifierFactory.java (create(int)): Make public.
 	(createFIXME(int)): Delete.
 
diff --git a/frysk-sys/frysk/sys/PseudoTerminal.java b/frysk-sys/frysk/sys/PseudoTerminal.java
index 43bfe2c..d53457b 100755
--- a/frysk-sys/frysk/sys/PseudoTerminal.java
+++ b/frysk-sys/frysk/sys/PseudoTerminal.java
@@ -1,6 +1,6 @@
 // This file is part of the program FRYSK.
 //
-// Copyright 2006, 2007, Red Hat Inc.
+// Copyright 2006, 2007, 2008, Red Hat Inc.
 //
 // FRYSK is free software; you can redistribute it and/or modify it
 // under the terms of the GNU General Public License as published by
@@ -45,34 +45,33 @@ import java.io.File;
  * Open a pty
  */
 
-public class PseudoTerminal
-    extends FileDescriptor
-{
+public class PseudoTerminal extends FileDescriptor {
+    /**
+     * Returns the pathname of corrsponding to the fd
+     */
+    private static native String getName(int fd);
+    /**
+     * Returns an open master fd for a pseudo-terminal.
+     */
+    private static native int open (boolean controllingTerminal);
+
     private final String name;
     private final File file;
 
     /**
      * Open a pseudo-terminal, a.k.a. pty, not wired to anything.
      */
-    public PseudoTerminal (boolean controllingTerminal)
-    {
-	super (open (controllingTerminal));
-	name = getName ();
+    public PseudoTerminal(boolean controllingTerminal) {
+	super(open(controllingTerminal));
+	name = getName(getFd());
 	file = new File (name);
     }
-    public PseudoTerminal ()
-    {
-	this (false);
+    public PseudoTerminal() {
+	this(false);
     }
 
-    /**
-     * Returns the pathname of corrsponding to the fd
-     */
-    private native String getName ();
-
-    public String toString ()
-    {
-	return getName ();
+    public String toString() {
+	return name;
     }
 
     /**
@@ -84,11 +83,6 @@ public class PseudoTerminal
     }
 
     /**
-     * Returns an open master fd for a pseudo-terminal.
-     */
-    private static native int open (boolean controllingTerminal);
-
-    /**
      * Redirect stdin, stdout, and stderr to this PseudoTerminal.
      *
      * The file descriptors are created in the parent process so that
diff --git a/frysk-sys/frysk/sys/cni/PseudoTerminal.cxx b/frysk-sys/frysk/sys/cni/PseudoTerminal.cxx
index 924e6af..7d17563 100755
--- a/frysk-sys/frysk/sys/cni/PseudoTerminal.cxx
+++ b/frysk-sys/frysk/sys/cni/PseudoTerminal.cxx
@@ -1,7 +1,7 @@
 // This file is part of the program FRYSK.
 //
+// Copyright 2006, 2007, 2008, Red Hat Inc.
 // Copyright 2007 Oracle Corporation.
-// Copyright 2006, 2007, Red Hat Inc.
 //
 // FRYSK is free software; you can redistribute it and/or modify it
 // under the terms of the GNU General Public License as published by
@@ -80,9 +80,9 @@ frysk::sys::PseudoTerminal::open (jboolean controllingTerminal)
 }
 
 jstring
-frysk::sys::PseudoTerminal::getName ()
+frysk::sys::PseudoTerminal::getName(jint fd)
 {
-  char* pts_name = ::ptsname (getFd());
+  char* pts_name = ::ptsname(fd);
   if (pts_name == NULL)
     throwErrno (errno, "ptsname");
   return JvNewStringUTF (pts_name);


hooks/post-receive
--
frysk system monitor/debugger


                 reply	other threads:[~2008-02-08 22:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20080208224104.21520.qmail@sourceware.org \
    --to=cagney@sourceware.org \
    --cc=frysk-cvs@sourceware.org \
    --cc=frysk@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).