diff options
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/mk/archive.c | 19 | ||||
-rw-r--r-- | src/cmd/mk/sys.h | 1 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/cmd/mk/archive.c b/src/cmd/mk/archive.c index 8edfdddc..fcfee03b 100644 --- a/src/cmd/mk/archive.c +++ b/src/cmd/mk/archive.c @@ -23,6 +23,25 @@ static void atimes(char *); static char *split(char*, char**); long +readn(int f, void *av, long n) +{ + char *a; + long m, t; + + a = av; + t = 0; + while(t < n){ + m = read(f, a+t, n-t); + if(m <= 0){ + if(t == 0) + return m; + break; + } + t += m; + } + return t; +} +long atimeof(int force, char *name) { Symtab *sym; diff --git a/src/cmd/mk/sys.h b/src/cmd/mk/sys.h index f520b066..03a9d058 100644 --- a/src/cmd/mk/sys.h +++ b/src/cmd/mk/sys.h @@ -2,3 +2,4 @@ #include <libc.h> #include <bio.h> #include <regexp.h> + |