← Commit list

fe013a74f

Mike Frysinger
Mike Frysinger
2009-04-09
FAILED Duration: 31s

Subject

patch by Stuart Hughes and Guenter to make "0" a special baud rate for getty where it uses this as "leave baud rate unchanged"

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

loginutils/getty.c+7 -1
@@ -163,8 +163,14 @@ static void parse_speeds(struct options *op, char *arg)
debug("entered parse_speeds\n");
while ((cp = strsep(&arg, ",")) != NULL) {
op->speeds[op->numspeed] = bcode(cp);
- if (op->speeds[op->numspeed] <= 0)
+ if (op->speeds[op->numspeed] < 0)
bb_error_msg_and_die("bad speed: %s", cp);
+ else if (op->speeds[op->numspeed] == 0) {
+ struct termios tio;
+ if (tcgetattr(1, &tio) != 0)
+ bb_error_msg_and_die("auto baudrate detection failed");
+ op->speeds[op->numspeed] = cfgetospeed(&tio);
+ }
op->numspeed++;
if (op->numspeed > MAX_SPEED)
bb_error_msg_and_die("too many alternate speeds");