Problem with smbfs in 2.0.31 pre9

Han Holl (
Sat, 13 Sep 1997 20:06:22 +0200 (MET DST)


There seems to be a problem in smbfs in 2.0.31pre9:
(The server is a plain Windows95 system).

If a file bbb exists, and you do 'echo whatever >bbb' you end
up with an empty file called bbb.
Same goes for vi autoexec.bat :-(

Here's what happens: (debugging enabled)

/home/gerrit/gateway/f> echo a >bbb
attr: 20
smb_proc_open: name=bbb
smb_proc_open: entry->access = 2
smb_receive: rcls=1, err=50
smb_receive: rcls=1, err=50
bash: bbb: I/O error

I can't find error 50 in smbno.h.

I patched fs/smbfs/proc.c to ignore error 50, and it seems to work,
but it's kind of scary.

Han Holl

--- proc.c.orig Sat Sep 13 18:57:23 1997
+++ proc.c Sat Sep 13 19:44:13 1997
@@ -357,6 +357,8 @@
case ERRfilexists:
return EEXIST;
case 87:
+ case 50:
+ printk(KERN_INFO "smbfs: Ignoring unknown error %d\n",error);
return 0; /* Unknown error!! */
/* This next error seems to occur on an mv when
* the destination exists */