diff options
author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-10-14 02:23:43 +0000 |
---|---|---|
committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-10-14 02:23:43 +0000 |
commit | 9e617927e057d79ceb2ac4869b18b1e84567dc68 (patch) | |
tree | 37b7584ae40b99edb5583fbc4392b62ffdadf278 /shell | |
parent | 6147e0907e5b5e3a07a4c8976097a585faaa3895 (diff) | |
download | busybox-w32-9e617927e057d79ceb2ac4869b18b1e84567dc68.tar.gz busybox-w32-9e617927e057d79ceb2ac4869b18b1e84567dc68.tar.bz2 busybox-w32-9e617927e057d79ceb2ac4869b18b1e84567dc68.zip |
add open_read_close() and similar stuff
git-svn-id: svn://busybox.net/trunk/busybox@16377 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'shell')
-rw-r--r-- | shell/msh.c | 6 |
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) | |||
2954 | 2954 | ||
2955 | case IOWRITE | IOCAT: | 2955 | case IOWRITE | IOCAT: |
2956 | if ((u = open(cp, 1)) >= 0) { | 2956 | if ((u = open(cp, 1)) >= 0) { |
2957 | lseek(u, (long) 0, 2); | 2957 | lseek(u, (long) 0, SEEK_END); |
2958 | break; | 2958 | break; |
2959 | } | 2959 | } |
2960 | case IOWRITE: | 2960 | case IOWRITE: |
@@ -4686,7 +4686,7 @@ static void pushio(struct ioarg *argp, int (*fn) (struct ioarg *)) | |||
4686 | /* This line appears to be active when running scripts from command line */ | 4686 | /* This line appears to be active when running scripts from command line */ |
4687 | if ((isatty(e.iop->argp->afile) == 0) | 4687 | if ((isatty(e.iop->argp->afile) == 0) |
4688 | && (e.iop == &iostack[0] | 4688 | && (e.iop == &iostack[0] |
4689 | || lseek(e.iop->argp->afile, 0L, 1) != -1)) { | 4689 | || lseek(e.iop->argp->afile, 0L, SEEK_CUR) != -1)) { |
4690 | if (++bufid == AFID_NOBUF) /* counter rollover check, AFID_NOBUF = 11111111 */ | 4690 | if (++bufid == AFID_NOBUF) /* counter rollover check, AFID_NOBUF = 11111111 */ |
4691 | bufid = AFID_ID; /* AFID_ID = 0 */ | 4691 | bufid = AFID_ID; /* AFID_ID = 0 */ |
4692 | 4692 | ||
@@ -4831,7 +4831,7 @@ static int filechar(struct ioarg *ap) | |||
4831 | if ((i = ap->afid != bp->id) || bp->bufp == bp->ebufp) { | 4831 | if ((i = ap->afid != bp->id) || bp->bufp == bp->ebufp) { |
4832 | 4832 | ||
4833 | if (i) | 4833 | if (i) |
4834 | lseek(ap->afile, ap->afpos, 0); | 4834 | lseek(ap->afile, ap->afpos, SEEK_SET); |
4835 | 4835 | ||
4836 | i = safe_read(ap->afile, bp->buf, sizeof(bp->buf)); | 4836 | i = safe_read(ap->afile, bp->buf, sizeof(bp->buf)); |
4837 | 4837 | ||