Commit 8418ee68 authored by strauman's avatar strauman
Browse files

- elfsyms.c, cexpsymsP.h, rshload.c: added fourth argument to

   rshLoad(): a 'long' pointer where the number of bytes read
   is stored.
parent 6f68fe16
......@@ -77,7 +77,7 @@ int
_cexp_namecomp(const void *a, const void *b);
char *
rshLoad(char *host, char *user, char *cmd);
rshLoad(char *host, char *user, char *cmd, long *size_p);
/* Determine if we want to keep the external symbol 'ext_sym'.
* Must return a pointer to the symbol name if YES and 0 if NO
......
......@@ -84,7 +84,7 @@ extern int select();
#define RSH_PORT 514
static char *
handleInput(int fd, int errfd, unsigned long *psize)
handleInput(int fd, int errfd, long *psize)
{
long n=0,size,avail;
fd_set r,w,e;
......@@ -174,11 +174,11 @@ cleanup:
}
char *
rshLoad(char *host, char *user, char *cmd)
rshLoad(char *host, char *user, char *cmd, long *size_p)
{
char *chpt=host,*buf=0;
int fd,errfd;
unsigned long ntot;
long ntot;
extern int rcmd();
fd=rcmd(&chpt,RSH_PORT,user,user,cmd,&errfd);
......@@ -197,6 +197,8 @@ extern int rcmd();
fprintf(stderr,"0x%lx (%li) bytes read\n",ntot,ntot);
*size_p = ntot;
cleanup:
if (fd>=0) close(fd);
if (errfd>=0) close(errfd);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment