M cmd/hissh-agent/main.ha => cmd/hissh-agent/main.ha +2 -2
@@ 115,7 115,7 @@ fn handle_req_ident(agent: *agent::agent) (void | agent::error | net::error) = {
defer free(idents);
for (true) {
- let buf = match (bufio::scanline(himitsu)?) {
+ let buf = match (bufio::read_line(himitsu)?) {
case io::EOF =>
log::println("Unexpected EOF from Himitsu");
break;
@@ 245,7 245,7 @@ fn handle_sign_request(
let found = false;
for (true) {
- let buf = match (bufio::scanline(himitsu)?) {
+ let buf = match (bufio::read_line(himitsu)?) {
case io::EOF =>
log::println("Unexpected EOF from Himitsu");
break;
M cmd/hissh-import/main.ha => cmd/hissh-import/main.ha +3 -2
@@ 65,12 65,13 @@ export fn main() void = {
io::writeall(conn, memio::buffer(&buf))!;
- match (bufio::scanline(conn)) {
+ match (bufio::read_line(conn)) {
case io::EOF =>
fmt::fatal("Unexpected EOF from Himitsu");
case let err: io::error =>
fmt::fatal("Error reading from Himitsu:", io::strerror(err));
case let line: []u8 =>
+ defer free(line);
io::writeall(os::stdout, line)!;
};
fmt::println()!;
@@ 88,7 89,7 @@ fn decrypt(key: *ssh::sshprivkey) void = {
tty::noecho(&termios)!;
fmt::errorf("Enter SSH key passphrase: ")!;
- const pass = bufio::scanline(tty)!;
+ const pass = bufio::read_line(tty)!;
tty::termios_restore(&termios);
fmt::errorln()!;