shithub: 9ferno

Download patch

ref: db95f01922f046f596c056adc179e57442c871da
parent: ad3bc13476c414e56bafbca312f09f84c18a454f
author: henesy <unknown>
date: Sun Sep 27 04:04:45 EDT 2020

prettify error output for auth/changelogin (thanks metacoma)

--- a/appl/cmd/auth/changelogin.b
+++ b/appl/cmd/auth/changelogin.b
@@ -256,7 +256,7 @@
 	if(mode == "rawon"){
 		fdctl = sys->open("/dev/consctl", sys->OWRITE);
 		if(fdctl == nil || sys->write(fdctl,array of byte mode,len mode) != len mode){
-			sys->fprint(stderr, "unable to change console mode");
+			sys->fprint(stderr, "unable to change console mode ⇒ %r\n");
 			return (0,nil);
 		}
 	}
@@ -268,7 +268,7 @@
 	for(;;) {
 		r = sys->read(io, buf, len buf);
 		if(r <= 0){
-			sys->fprint(stderr, "error read from console mode");
+			sys->fprint(stderr, "error read from console mode ⇒ %r\n");
 			if(mode == "rawon")
 				sys->write(fdctl,rawoff,6);
 			return (0, nil);