Module Name:    src
Committed By:   christos
Date:           Fri Apr 13 14:42:18 UTC 2012

Modified Files:
        src/lib/libc/gen: getpass.c

Log Message:
prefer ETIMEDOUT.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/lib/libc/gen/getpass.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/gen/getpass.c
diff -u src/lib/libc/gen/getpass.c:1.23 src/lib/libc/gen/getpass.c:1.24
--- src/lib/libc/gen/getpass.c:1.23	Fri Apr 13 10:39:34 2012
+++ src/lib/libc/gen/getpass.c	Fri Apr 13 10:42:18 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: getpass.c,v 1.23 2012/04/13 14:39:34 christos Exp $	*/
+/*	$NetBSD: getpass.c,v 1.24 2012/04/13 14:42:18 christos Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: getpass.c,v 1.23 2012/04/13 14:39:34 christos Exp $");
+__RCSID("$NetBSD: getpass.c,v 1.24 2012/04/13 14:42:18 christos Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -132,7 +132,7 @@ getpassfd(const char *prompt, char *buf,
 			pfd.revents = 0;
 			switch (poll(&pfd, 1, tout * 1000)) {
 			case 0:
-				errno = ENODATA;
+				errno = ETIMEDOUT;
 				/*FALLTHROUGH*/
 			case -1:
 				goto restore;

Reply via email to