Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Apr 2002 18:27:16 -0700 (PDT)
From:      Dag-Erling Smorgrav <des@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 9750 for review
Message-ID:  <200204150127.g3F1RGA53587@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=9750

Change 9750 by des@des.at.des.thinksec.com on 2002/04/14 18:26:55

	Print a newline after an error or info message.

Affected files ...

... //depot/projects/openpam/lib/openpam_ttyconv.c#10 edit

Differences ...

==== //depot/projects/openpam/lib/openpam_ttyconv.c#10 (text+ko) ====

@@ -31,7 +31,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $P4: //depot/projects/openpam/lib/openpam_ttyconv.c#9 $
+ * $P4: //depot/projects/openpam/lib/openpam_ttyconv.c#10 $
  */
 
 #include <sys/types.h>
@@ -160,9 +160,15 @@
 			break;
 		case PAM_ERROR_MSG:
 			fputs(msg[i]->msg, stderr);
+			if (strlen(msg[i]->msg) > 0 &&
+			    msg[i]->msg[strlen(msg[i]->msg) - 1] != '\n')
+				fputc('\n', stderr);
 			break;
 		case PAM_TEXT_INFO:
 			fputs(msg[i]->msg, stdout);
+			if (strlen(msg[i]->msg) > 0 &&
+			    msg[i]->msg[strlen(msg[i]->msg) - 1] != '\n')
+				fputc('\n', stdout);
 			break;
 		default:
 			goto fail;

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204150127.g3F1RGA53587>