summaryrefslogtreecommitdiffhomepage
path: root/shell
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-10-14 02:23:43 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-10-14 02:23:43 +0000
commitea62077b850076c4d7dc3cf78ebd1888928c6ddf (patch)
tree37b7584ae40b99edb5583fbc4392b62ffdadf278 /shell
parent88ca06769028e442bf873b270c176ca0e9f021f8 (diff)
add open_read_close() and similar stuff
Diffstat (limited to 'shell')
-rw-r--r--shell/msh.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/shell/msh.c b/shell/msh.c
index df6f321aa..cb2947137 100644
--- a/shell/msh.c
+++ b/shell/msh.c
@@ -2954,7 +2954,7 @@ static int iosetup(struct ioword *iop, int pipein, int pipeout)
case IOWRITE | IOCAT:
if ((u = open(cp, 1)) >= 0) {
- lseek(u, (long) 0, 2);
+ lseek(u, (long) 0, SEEK_END);
break;
}
case IOWRITE:
@@ -4686,7 +4686,7 @@ static void pushio(struct ioarg *argp, int (*fn) (struct ioarg *))
/* This line appears to be active when running scripts from command line */
if ((isatty(e.iop->argp->afile) == 0)
&& (e.iop == &iostack[0]
- || lseek(e.iop->argp->afile, 0L, 1) != -1)) {
+ || lseek(e.iop->argp->afile, 0L, SEEK_CUR) != -1)) {
if (++bufid == AFID_NOBUF) /* counter rollover check, AFID_NOBUF = 11111111 */
bufid = AFID_ID; /* AFID_ID = 0 */
@@ -4831,7 +4831,7 @@ static int filechar(struct ioarg *ap)
if ((i = ap->afid != bp->id) || bp->bufp == bp->ebufp) {
if (i)
- lseek(ap->afile, ap->afpos, 0);
+ lseek(ap->afile, ap->afpos, SEEK_SET);
i = safe_read(ap->afile, bp->buf, sizeof(bp->buf));