diff options
author | Andrew Tridgell <tridge@samba.org> | 1997-09-15 05:43:37 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1997-09-15 05:43:37 +0000 |
commit | 1d2361bd2dec35bce029699f54c6a61fa739fa4b (patch) | |
tree | f5b04f0a855e75401ff65ca302fbabced3343bbd /source/lib | |
parent | a1569971663f01c245c145b18290d9dba965dc36 (diff) | |
download | samba-1d2361bd2dec35bce029699f54c6a61fa739fa4b.tar.gz samba-1d2361bd2dec35bce029699f54c6a61fa739fa4b.tar.xz samba-1d2361bd2dec35bce029699f54c6a61fa739fa4b.zip |
- change a lot of occurances of errno to use strerror(errno). We can't
assume all our users are programmers :-)
- automatically create the smbpasswd file if it doesn't exist when
running smbpasswd.
Diffstat (limited to 'source/lib')
-rw-r--r-- | source/lib/util.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/lib/util.c b/source/lib/util.c index b0213912d15..22c1c3e43dc 100644 --- a/source/lib/util.c +++ b/source/lib/util.c @@ -1488,7 +1488,7 @@ char *GetWd(char *str) if (!sys_getwd(s)) { - DEBUG(0,("Getwd failed, errno %d\n",errno)); + DEBUG(0,("Getwd failed, errno %s\n",strerror(errno))); return (NULL); } @@ -1951,7 +1951,7 @@ int read_udp_socket(int fd,char *buf,int len) bzero((char *)&lastip,sizeof(lastip)); ret = recvfrom(fd,buf,len,0,&sock,&socklen); if (ret <= 0) { - DEBUG(2,("read socket failed. ERRNO=%d\n",errno)); + DEBUG(2,("read socket failed. ERRNO=%s\n",strerror(errno))); return(0); } @@ -2408,8 +2408,8 @@ BOOL send_one_packet(char *buf,int len,struct in_addr ip,int port,int type) ret = (sendto(out_fd,buf,len,0,(struct sockaddr *)&sock_out,sizeof(sock_out)) >= 0); if (!ret) - DEBUG(0,("Packet send to %s(%d) failed ERRNO=%d\n", - inet_ntoa(ip),port,errno)); + DEBUG(0,("Packet send to %s(%d) failed ERRNO=%s\n", + inet_ntoa(ip),port,strerror(errno))); close(out_fd); return(ret); |