diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-10-06 02:42:53 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-10-06 02:42:53 +0200 |
commit | ce062debb1edaa27548deea0f151a9d4c95414a7 (patch) | |
tree | 7cbba2a6483fa4c015f32cdc3deb1909ec143734 /sys/src/boot | |
parent | e5cb695c7ab91b35684937e6c311eb4fe9270d67 (diff) |
9boot: get rid of 64 byte line length limit
Diffstat (limited to 'sys/src/boot')
-rw-r--r-- | sys/src/boot/efi/sub.c | 14 | ||||
-rw-r--r-- | sys/src/boot/pc/sub.c | 14 |
2 files changed, 6 insertions, 22 deletions
diff --git a/sys/src/boot/efi/sub.c b/sys/src/boot/efi/sub.c index 1359b199c..798e5a92f 100644 --- a/sys/src/boot/efi/sub.c +++ b/sys/src/boot/efi/sub.c @@ -97,7 +97,7 @@ memset(void *dst, int v, int n) } static int -readline(void *f, char buf[64]) +readline(void *f, char *buf) { static char white[] = "\t "; char *p; @@ -127,14 +127,6 @@ readline(void *f, char buf[64]) break; if(p == buf && strchr(white, *p) != nil) continue; /* whitespace on start of line */ - if(p >= buf + 64-1){ - if(f == nil){ - putc('\b'); - putc(' '); - putc('\b'); - } - continue; /* line full do not advance */ - } p++; } while(p > buf && strchr(white, p[-1])) @@ -211,7 +203,7 @@ delconf(char *s) char* configure(void *f, char *path) { - char line[64], *kern, *s, *p; + char *line, *kern, *s, *p; int inblock, nowait, n; static int once = 1; @@ -227,7 +219,7 @@ Clear: nowait = 1; inblock = 0; Loop: - while(readline(f, line) > 0){ + while(readline(f, line = confend+1) > 0){ if(*line == 0 || strchr("#;=", *line) != nil) continue; if(*line == '['){ diff --git a/sys/src/boot/pc/sub.c b/sys/src/boot/pc/sub.c index 8d69ddc77..0b8380ed7 100644 --- a/sys/src/boot/pc/sub.c +++ b/sys/src/boot/pc/sub.c @@ -120,7 +120,7 @@ getc(void) } static int -readline(void *f, char buf[64]) +readline(void *f, char *buf) { static char white[] = "\t "; char *p; @@ -150,14 +150,6 @@ readline(void *f, char buf[64]) break; if(p == buf && strchr(white, *p) != nil) continue; /* whitespace on start of line */ - if(p >= buf + 64-1){ - if(f == nil){ - putc('\b'); - putc(' '); - putc('\b'); - } - continue; /* line full do not advance */ - } p++; } while(p > buf && strchr(white, p[-1])) @@ -239,7 +231,7 @@ delconf(char *s) char* configure(void *f, char *path) { - char line[64], *kern, *s, *p; + char *line, *kern, *s, *p; int inblock, nowait, n; static int once = 1; @@ -257,7 +249,7 @@ Clear: nowait = 1; inblock = 0; Loop: - while(readline(f, line) > 0){ + while(readline(f, line = confend+1) > 0){ if(*line == 0 || strchr("#;=", *line) != nil) continue; if(*line == '['){ |