diff --git a/src/smblib/smbadd.c b/src/smblib/smbadd.c
index 5ea25ecf88631c9be5991dda20edf464f97a08d3..3717e5b2458f541d9191e2cc3fe17f03a7a1b48b 100644
--- a/src/smblib/smbadd.c
+++ b/src/smblib/smbadd.c
@@ -172,7 +172,7 @@ int SMBCALL smb_addmsg(smb_t* smb, smbmsg_t* msg, int storage, long dupechk_hash
 				if(xlat!=XLAT_NONE) {	/* e.g. XLAT_LZH */
 					if(smb_fwrite(smb,&xlat,sizeof(xlat),smb->sdt_fp)!=sizeof(xlat)) {
 						safe_snprintf(smb->last_error,sizeof(smb->last_error)
-							,"%d (%s) writing body xlat string"
+							,"%d '%s' writing body xlat string"
 							,get_errno(),STRERROR(get_errno()));
 						retval=SMB_ERR_WRITE;
 						break;
@@ -182,7 +182,7 @@ int SMBCALL smb_addmsg(smb_t* smb, smbmsg_t* msg, int storage, long dupechk_hash
 				xlat=XLAT_NONE;	/* xlat string terminator */
 				if(smb_fwrite(smb,&xlat,sizeof(xlat),smb->sdt_fp)!=sizeof(xlat)) {
 					safe_snprintf(smb->last_error,sizeof(smb->last_error)
-						,"%d (%s) writing body xlat terminator"
+						,"%d '%s' writing body xlat terminator"
 						,get_errno(),STRERROR(get_errno()));
 					retval=SMB_ERR_WRITE;
 					break;
@@ -191,7 +191,7 @@ int SMBCALL smb_addmsg(smb_t* smb, smbmsg_t* msg, int storage, long dupechk_hash
 
 				if(smb_fwrite(smb,body,bodylen,smb->sdt_fp)!=bodylen) {
 					safe_snprintf(smb->last_error,sizeof(smb->last_error)
-						,"%d (%s) writing body (%ld bytes)"
+						,"%d '%s' writing body (%ld bytes)"
 						,get_errno(),STRERROR(get_errno())
 						,bodylen);
 					retval=SMB_ERR_WRITE;
@@ -206,7 +206,7 @@ int SMBCALL smb_addmsg(smb_t* smb, smbmsg_t* msg, int storage, long dupechk_hash
 				xlat=XLAT_NONE;	/* xlat string terminator */
 				if(smb_fwrite(smb,&xlat,sizeof(xlat),smb->sdt_fp)!=sizeof(xlat)) {
 					safe_snprintf(smb->last_error,sizeof(smb->last_error)
-						,"%d (%s) writing tail xlat terminator"
+						,"%d '%s' writing tail xlat terminator"
 						,get_errno(),STRERROR(get_errno()));
 					retval=SMB_ERR_WRITE;
 					break;
@@ -214,7 +214,7 @@ int SMBCALL smb_addmsg(smb_t* smb, smbmsg_t* msg, int storage, long dupechk_hash
 
 				if(smb_fwrite(smb,tail,taillen-sizeof(xlat),smb->sdt_fp)!=taillen-sizeof(xlat)) {
 					safe_snprintf(smb->last_error,sizeof(smb->last_error)
-						,"%d (%s) writing tail (%ld bytes)"
+						,"%d '%s' writing tail (%ld bytes)"
 						,get_errno(),STRERROR(get_errno())
 						,taillen-sizeof(xlat));
 					retval=SMB_ERR_WRITE;
@@ -228,7 +228,7 @@ int SMBCALL smb_addmsg(smb_t* smb, smbmsg_t* msg, int storage, long dupechk_hash
 			}
 			if(l%SDT_BLOCK_LEN) {
 				safe_snprintf(smb->last_error,sizeof(smb->last_error)
-					,"%d (%s) writing data padding"
+					,"%d '%s' writing data padding"
 					,get_errno(),STRERROR(get_errno()));
 				retval=SMB_ERR_WRITE;
 				break;
diff --git a/src/smblib/smballoc.c b/src/smblib/smballoc.c
index a1948b8c17292eba3d47c4aa7ac47269adafa2ea..7e122b817d5533d9f4a7fcd75c3cad3c5037cca5 100644
--- a/src/smblib/smballoc.c
+++ b/src/smblib/smballoc.c
@@ -82,7 +82,7 @@ long SMBCALL smb_allocdat(smb_t* smb, ulong length, ushort refs)
 	for(l=0;l<blocks;l++)
 		if(!fwrite(&refs,sizeof(refs),1,smb->sda_fp)) {
 			safe_snprintf(smb->last_error,sizeof(smb->last_error)
-				,"%d (%s) writing allocation bytes at offset %ld"
+				,"%d '%s' writing allocation bytes at offset %ld"
 				,get_errno(),STRERROR(get_errno())
 				,((offset/SDT_BLOCK_LEN)+l)*sizeof(refs));
 			return(SMB_ERR_WRITE);
@@ -121,7 +121,7 @@ long SMBCALL smb_fallocdat(smb_t* smb, ulong length, ushort refs)
 	fflush(smb->sda_fp);
 	if(l<blocks) {
 		safe_snprintf(smb->last_error,sizeof(smb->last_error)
-			,"%d (%s) writing allocation bytes"
+			,"%d '%s' writing allocation bytes"
 			,get_errno(),STRERROR(get_errno()));
 		return(SMB_ERR_WRITE);
 	}
@@ -156,7 +156,7 @@ int SMBCALL smb_freemsgdat(smb_t* smb, ulong offset, ulong length, ushort refs)
 		sda_offset=((offset/SDT_BLOCK_LEN)+l)*sizeof(i);
 		if(fseek(smb->sda_fp,sda_offset,SEEK_SET)) {
 			safe_snprintf(smb->last_error,sizeof(smb->last_error)
-				,"%d (%s) seeking to %lu (0x%lX) of allocation file"
+				,"%d '%s' seeking to %lu (0x%lX) of allocation file"
 				,get_errno(),STRERROR(get_errno())
 				,sda_offset,sda_offset);
 			retval=SMB_ERR_SEEK;
@@ -164,7 +164,7 @@ int SMBCALL smb_freemsgdat(smb_t* smb, ulong offset, ulong length, ushort refs)
 		}
 		if(smb_fread(smb,&i,sizeof(i),smb->sda_fp)!=sizeof(i)) {
 			safe_snprintf(smb->last_error,sizeof(smb->last_error)
-				,"%d (%s) reading allocation bytes at offset %ld"
+				,"%d '%s' reading allocation bytes at offset %ld"
 				,get_errno(),STRERROR(get_errno())
 				,sda_offset);
 			retval=SMB_ERR_READ;
@@ -176,14 +176,14 @@ int SMBCALL smb_freemsgdat(smb_t* smb, ulong offset, ulong length, ushort refs)
 			i-=refs;
 		if(fseek(smb->sda_fp,-(int)sizeof(i),SEEK_CUR)) {
 			safe_snprintf(smb->last_error,sizeof(smb->last_error)
-				,"%d (%s) seeking backwards 2 bytes in allocation file"
+				,"%d '%s' seeking backwards 2 bytes in allocation file"
 				,get_errno(),STRERROR(get_errno()));
 			retval=SMB_ERR_SEEK;
 			break;
 		}
 		if(!fwrite(&i,sizeof(i),1,smb->sda_fp)) {
 			safe_snprintf(smb->last_error,sizeof(smb->last_error)
-				,"%d (%s) writing allocation bytes at offset %ld"
+				,"%d '%s' writing allocation bytes at offset %ld"
 				,get_errno(),STRERROR(get_errno())
 				,sda_offset);
 			retval=SMB_ERR_WRITE; 
@@ -217,7 +217,7 @@ int SMBCALL smb_incdat(smb_t* smb, ulong offset, ulong length, ushort refs)
 		}
 		if(smb_fread(smb,&i,sizeof(i),smb->sda_fp)!=sizeof(i)) {
 			safe_snprintf(smb->last_error,sizeof(smb->last_error)
-				,"%d (%s) reading allocation record at offset %ld"
+				,"%d '%s' reading allocation record at offset %ld"
 				,get_errno(),STRERROR(get_errno())
 				,((offset/SDT_BLOCK_LEN)+l)*sizeof(i));
 			return(SMB_ERR_READ);
@@ -228,7 +228,7 @@ int SMBCALL smb_incdat(smb_t* smb, ulong offset, ulong length, ushort refs)
 		}
 		if(!fwrite(&i,sizeof(i),1,smb->sda_fp)) {
 			safe_snprintf(smb->last_error,sizeof(smb->last_error)
-				,"%d (%s) writing allocation record at offset %ld"
+				,"%d '%s' writing allocation record at offset %ld"
 				,get_errno(),STRERROR(get_errno())
 				,((offset/SDT_BLOCK_LEN)+l)*sizeof(i));
 			return(SMB_ERR_WRITE); 
@@ -289,7 +289,7 @@ int SMBCALL smb_freemsghdr(smb_t* smb, ulong offset, ulong length)
 	for(l=0;l<blocks;l++)
 		if(!fwrite(&c,1,1,smb->sha_fp)) {
 			safe_snprintf(smb->last_error,sizeof(smb->last_error)
-				,"%d (%s) writing allocation record"
+				,"%d '%s' writing allocation record"
 				,get_errno(),STRERROR(get_errno()));
 			return(SMB_ERR_WRITE);
 		}
@@ -372,7 +372,7 @@ long SMBCALL smb_allochdr(smb_t* smb, ulong length)
 	for(l=0;l<blocks;l++)
 		if(fputc(1,smb->sha_fp)!=1) {
 			safe_snprintf(smb->last_error,sizeof(smb->last_error)
-				,"%d (%s) writing allocation record"
+				,"%d '%s' writing allocation record"
 				,get_errno(),STRERROR(get_errno()));
 			return(SMB_ERR_WRITE);
 		}
@@ -402,7 +402,7 @@ long SMBCALL smb_fallochdr(smb_t* smb, ulong length)
 	for(l=0;l<blocks;l++)
 		if(!fwrite(&c,1,1,smb->sha_fp)) {
 			safe_snprintf(smb->last_error,sizeof(smb->last_error)
-				,"%d (%s) writing allocation record"
+				,"%d '%s' writing allocation record"
 				,get_errno(),STRERROR(get_errno()));
 			return(SMB_ERR_WRITE);
 		}
diff --git a/src/smblib/smbfile.c b/src/smblib/smbfile.c
index e6b9049519551e6aca3cfb3c33dd0666f063a4b8..578a4d58096e323959e498532a86402cd3854382 100644
--- a/src/smblib/smbfile.c
+++ b/src/smblib/smbfile.c
@@ -161,7 +161,7 @@ int SMBCALL smb_open_fp(smb_t* smb, FILE** fp, int share)
 			break;
 		if(get_errno()!=EACCES && get_errno()!=EAGAIN) {
 			safe_snprintf(smb->last_error,sizeof(smb->last_error)
-				,"%d (%s) opening %s"
+				,"%d '%s' opening %s"
 				,get_errno(),STRERROR(get_errno()),path);
 			return(SMB_ERR_OPEN);
 		}
@@ -178,7 +178,7 @@ int SMBCALL smb_open_fp(smb_t* smb, FILE** fp, int share)
 	}
 	if((*fp=fdopen(file,"r+b"))==NULL) {
 		safe_snprintf(smb->last_error,sizeof(smb->last_error)
-			,"%d (%s) fdopening %s (%d)"
+			,"%d '%s' fdopening %s (%d)"
 			,get_errno(),STRERROR(get_errno()),path,file);
 		close(file);
 		return(SMB_ERR_OPEN);