From: Russ D. <ru...@us...> - 2001-09-02 23:35:31
|
Update of /cvsroot/blob/blob/utils/mkparamblock In directory usw-pr-cvs1:/tmp/cvs-serv7689/utils/mkparamblock Modified Files: mkparamblock.c Log Message: Put terminal baud in core tag so it can be parsed early Index: mkparamblock.c =================================================================== RCS file: /cvsroot/blob/blob/utils/mkparamblock/mkparamblock.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- mkparamblock.c 2001/09/02 03:19:55 1.4 +++ mkparamblock.c 2001/09/02 23:35:28 1.5 @@ -113,7 +113,8 @@ { struct ptag tag; char *arg; - int ret; + u32 terminal, download; + fpos_t bookmark; tag.hdr.ptag = PTAG_BAUD; tag.hdr.size = ptag_size(ptag_baud); @@ -121,12 +122,17 @@ tag.hdr.conf = 0; if (!(arg = strtok(line, "\t =,"))) return -1; - if ((ret = convert_baud(arg)) < 0) return -1; - tag.u.baud.terminal = ret; + if ((terminal = convert_baud(arg)) < 0) return -1; + if (!(arg = strtok(NULL, "\t ,"))) return -1; - if ((ret = convert_baud(arg)) < 0) return -1; - tag.u.baud.download = ret; + if ((download = convert_baud(arg)) < 0) return -1; + tag.u.baud.download = download; + fgetpos(fp, &bookmark); + fseek(fp, (u32) &(tag.u.core.terminal) - (u32) &tag, SEEK_SET); + fwrite(&terminal, 4, 1, fp); + fsetpos(fp, &bookmark); + fwrite(&tag, ptag_size(ptag_baud), 4, fp); return 0; } @@ -139,6 +145,8 @@ tag.hdr.size = ptag_size(ptag_core); tag.hdr.conf_mask = 0; tag.hdr.conf = 0; + + tag.u.core.terminal = baud9k6; fwrite(&tag, ptag_size(ptag_core), 4, fp); } |