aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2misc.c
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilovsky@samba.org>2012-09-18 19:20:33 -0400
committerSteve French <smfrench@gmail.com>2012-09-24 22:46:30 -0400
commitd324f08d6a87149597817f4496ef0f7ac185e8da (patch)
tree03a02fcacdfe0ce8f2d91eb0cc3b108f02d0ba25 /fs/cifs/smb2misc.c
parent92fc65a74a2be1388d774f7dbf82c9adea1745cf (diff)
CIFS: Add readdir support for SMB2
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/smb2misc.c')
-rw-r--r--fs/cifs/smb2misc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/cifs/smb2misc.c b/fs/cifs/smb2misc.c
index 9275883c8530..78225f517a60 100644
--- a/fs/cifs/smb2misc.c
+++ b/fs/cifs/smb2misc.c
@@ -248,6 +248,11 @@ smb2_get_data_area_len(int *off, int *len, struct smb2_hdr *hdr)
248 *len = le32_to_cpu(((struct smb2_read_rsp *)hdr)->DataLength); 248 *len = le32_to_cpu(((struct smb2_read_rsp *)hdr)->DataLength);
249 break; 249 break;
250 case SMB2_QUERY_DIRECTORY: 250 case SMB2_QUERY_DIRECTORY:
251 *off = le16_to_cpu(
252 ((struct smb2_query_directory_rsp *)hdr)->OutputBufferOffset);
253 *len = le32_to_cpu(
254 ((struct smb2_query_directory_rsp *)hdr)->OutputBufferLength);
255 break;
251 case SMB2_IOCTL: 256 case SMB2_IOCTL:
252 case SMB2_CHANGE_NOTIFY: 257 case SMB2_CHANGE_NOTIFY:
253 default: 258 default:
@@ -290,8 +295,9 @@ smb2_get_data_area_len(int *off, int *len, struct smb2_hdr *hdr)
290 * portion, the number of word parameters and the data portion of the message. 295 * portion, the number of word parameters and the data portion of the message.
291 */ 296 */
292unsigned int 297unsigned int
293smb2_calc_size(struct smb2_hdr *hdr) 298smb2_calc_size(void *buf)
294{ 299{
300 struct smb2_hdr *hdr = (struct smb2_hdr *)buf;
295 struct smb2_pdu *pdu = (struct smb2_pdu *)hdr; 301 struct smb2_pdu *pdu = (struct smb2_pdu *)hdr;
296 int offset; /* the offset from the beginning of SMB to data area */ 302 int offset; /* the offset from the beginning of SMB to data area */
297 int data_length; /* the length of the variable length data area */ 303 int data_length; /* the length of the variable length data area */