From 552818e60eff4a87ece94f98c33424c93354bf6c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 15 Sep 1997 05:43:37 +0000 Subject: - 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. (This used to be commit 1d2361bd2dec35bce029699f54c6a61fa739fa4b) --- source3/lib/util.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/util.c b/source3/lib/util.c index b0213912d1..22c1c3e43d 100644 --- a/source3/lib/util.c +++ b/source3/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); -- cgit