struct smb_rq diet - g/c unused structure members, and move some stuff
around to not waste space with alignment padding
This commit is contained in:
parent
b05cd2b635
commit
568fd88386
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: smb_rq.c,v 1.14 2003/03/23 16:46:41 jdolecek Exp $ */
|
||||
/* $NetBSD: smb_rq.c,v 1.15 2003/03/23 16:57:51 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000-2001, Boris Popov
|
||||
@ -35,7 +35,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: smb_rq.c,v 1.14 2003/03/23 16:46:41 jdolecek Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: smb_rq.c,v 1.15 2003/03/23 16:57:51 jdolecek Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -321,6 +321,8 @@ smb_rq_reply(struct smb_rq *rqp)
|
||||
{
|
||||
struct mdchain *mdp = &rqp->sr_rp;
|
||||
int error;
|
||||
u_int8_t errclass;
|
||||
u_int16_t serror;
|
||||
|
||||
error = smb_iod_waitrq(rqp);
|
||||
if (error)
|
||||
@ -330,13 +332,13 @@ smb_rq_reply(struct smb_rq *rqp)
|
||||
return error;
|
||||
(void) md_get_uint8(mdp, NULL);
|
||||
if (rqp->sr_vc->vc_hflags2 & SMB_FLAGS2_ERR_STATUS) {
|
||||
(void) md_get_uint32le(mdp, &rqp->sr_error);
|
||||
(void) md_get_uint32(mdp, NULL); /* XXX ignored? */
|
||||
} else {
|
||||
(void) md_get_uint8(mdp, &rqp->sr_errclass);
|
||||
(void) md_get_uint8(mdp, &errclass);
|
||||
(void) md_get_uint8(mdp, NULL);
|
||||
error = md_get_uint16le(mdp, &rqp->sr_serror);
|
||||
error = md_get_uint16le(mdp, &serror);
|
||||
if (!error)
|
||||
error = smb_maperror(rqp->sr_errclass, rqp->sr_serror);
|
||||
error = smb_maperror(errclass, serror);
|
||||
}
|
||||
(void) md_get_uint8(mdp, NULL); /* rpflags */
|
||||
(void) md_get_uint16(mdp, NULL); /* rpflags2 */
|
||||
@ -352,7 +354,7 @@ smb_rq_reply(struct smb_rq *rqp)
|
||||
|
||||
SMBSDEBUG("M:%04x, P:%04x, U:%04x, T:%04x, E: %d:%d\n",
|
||||
rqp->sr_rpmid, rqp->sr_rppid, rqp->sr_rpuid, rqp->sr_rptid,
|
||||
rqp->sr_errclass, rqp->sr_serror);
|
||||
errclass, serror);
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: smb_rq.h,v 1.5 2003/03/23 10:32:05 jdolecek Exp $ */
|
||||
/* $NetBSD: smb_rq.h,v 1.6 2003/03/23 16:57:51 jdolecek Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000-2001, Boris Popov
|
||||
@ -78,38 +78,28 @@ struct smb_t2rq;
|
||||
|
||||
struct smb_rq {
|
||||
enum smbrq_state sr_state;
|
||||
struct smb_vc * sr_vc;
|
||||
struct smb_vc * sr_vc; /* session */
|
||||
struct smb_share * sr_share;
|
||||
u_short sr_mid;
|
||||
struct mbchain sr_rq;
|
||||
u_int8_t sr_rqflags;
|
||||
u_int16_t sr_rqflags2;
|
||||
u_int8_t * sr_wcount;
|
||||
u_int8_t * sr_bcount;
|
||||
struct mdchain sr_rp;
|
||||
int sr_rpgen;
|
||||
int sr_rplast;
|
||||
int sr_flags; /* SMBR_* */
|
||||
int sr_rpsize;
|
||||
u_int sr_rpgen;
|
||||
u_int sr_rplast;
|
||||
struct smb_cred * sr_cred;
|
||||
int sr_timo;
|
||||
int sr_rexmit;
|
||||
int sr_sendcnt;
|
||||
u_short sr_mid;
|
||||
u_short sr_flags; /* SMBR_* */
|
||||
struct timeval sr_sendtimo; /* timeout expiration time */
|
||||
int sr_timo;
|
||||
int sr_sendcnt;
|
||||
int sr_lerror;
|
||||
u_int8_t * sr_rqtid;
|
||||
u_int8_t * sr_rquid;
|
||||
u_int8_t sr_errclass;
|
||||
u_int16_t sr_serror;
|
||||
u_int32_t sr_error;
|
||||
u_int8_t sr_rpflags;
|
||||
u_int16_t sr_rpflags2;
|
||||
u_int16_t sr_rptid;
|
||||
u_int16_t sr_rppid;
|
||||
u_int16_t sr_rpuid;
|
||||
u_int16_t sr_rpmid;
|
||||
struct smb_slock sr_slock; /* short term locks */
|
||||
/* struct smb_t2rq*sr_t2;*/
|
||||
SIMPLEQ_ENTRY(smb_rq) sr_link;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user