patch-2.1.19 linux/fs/smbfs/proc.c
Next file: linux/fs/ufs/ufs_super.c
Previous file: linux/fs/select.c
Back to the patch index
Back to the overall index
- Lines: 126
- Date:
Mon Dec 30 11:54:12 1996
- Orig file:
v2.1.18/linux/fs/smbfs/proc.c
- Orig date:
Thu Dec 12 17:02:46 1996
diff -u --recursive --new-file v2.1.18/linux/fs/smbfs/proc.c linux/fs/smbfs/proc.c
@@ -128,7 +128,10 @@
const char *name, const int len)
{
byte *start = p;
- p = smb_encode_parents(p, dir);
+ if (dir != NULL)
+ {
+ p = smb_encode_parents(p, dir);
+ }
p = smb_encode_this_name(p, name, len);
*p++ = 0;
if (server->protocol <= PROTOCOL_COREPLUS)
@@ -573,7 +576,6 @@
DPRINTK("smb_proc_open: name=%s\n", name);
smb_lock_server(server);
- buf = server->packet;
if (entry->opened != 0)
{
@@ -582,6 +584,7 @@
return 0;
}
retry:
+ buf = server->packet;
p = smb_setup_header(server, SMBopen, 2, 0);
WSET(buf, smb_vwv0, 0x42); /* read/write */
WSET(buf, smb_vwv1, o_attr);
@@ -732,8 +735,8 @@
__u16 fileid;
smb_lock_server(server);
- buf = server->packet;
retry:
+ buf = server->packet;
p = smb_setup_header(server, SMBcreate, 3, 0);
WSET(buf, smb_vwv0, attr);
DSET(buf, smb_vwv1, utc2local(ctime));
@@ -764,15 +767,13 @@
{
char *p;
struct smb_server *server = SMB_SERVER(odir);
- char *buf;
int result;
smb_lock_server(server);
- buf = server->packet;
retry:
p = smb_setup_header(server, SMBmv, 1, 0);
- WSET(buf, smb_vwv0, aSYSTEM | aHIDDEN);
+ WSET(server->packet, smb_vwv0, aSYSTEM | aHIDDEN);
*p++ = 4;
p = smb_encode_path(server, p, SMB_INOP(odir), oname, olen);
*p++ = 4;
@@ -825,7 +826,6 @@
smb_lock_server(server);
-
retry:
p = smb_setup_header(server, SMBrmdir, 0, 0);
*p++ = 4;
@@ -848,15 +848,13 @@
{
char *p;
struct smb_server *server = SMB_SERVER(dir);
- char *buf;
int result;
smb_lock_server(server);
- buf = server->packet;
retry:
p = smb_setup_header(server, SMBunlink, 1, 0);
- WSET(buf, smb_vwv0, aSYSTEM | aHIDDEN);
+ WSET(server->packet, smb_vwv0, aSYSTEM | aHIDDEN);
*p++ = 4;
p = smb_encode_path(server, p, SMB_INOP(dir), name, len);
smb_setup_bcc(server, p);
@@ -880,9 +878,9 @@
int result;
smb_lock_server(server);
- buf = server->packet;
retry:
+ buf = server->packet;
p = smb_setup_header(server, SMBwrite, 5, 0);
WSET(buf, smb_vwv0, fid);
WSET(buf, smb_vwv1, 0);
@@ -1011,9 +1009,9 @@
DPRINTK("SMB call readdir %d @ %d\n", cache_size, fpos);
smb_lock_server(server);
- buf = server->packet;
retry:
+ buf = server->packet;
first = 1;
total_count = 0;
current_entry = entry;
@@ -1389,11 +1387,11 @@
char *buf;
smb_lock_server(server);
- buf = server->packet;
DDPRINTK("smb_proc_getattr: %s\n", name);
retry:
+ buf = server->packet;
p = smb_setup_header(server, SMBgetatr, 0, 0);
*p++ = 4;
p = smb_encode_path(server, p, SMB_INOP(dir), name, len);
@@ -1512,9 +1510,9 @@
int result;
smb_lock_server(server);
- buf = server->packet;
retry:
+ buf = server->packet;
p = smb_setup_header(server, SMBsetatr, 8, 0);
WSET(buf, smb_vwv0, new_finfo->attr);
DSET(buf, smb_vwv1, utc2local(new_finfo->f_mtime));
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov