Skip to contentSkip to conversation

Add support for updating Windows NT times/dates (part 1)

CIFS Arjan van de Ven 1 participant 1 message Mar 14, 2005 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 30 lines · Linux Kernel Mailing List

ChangeSet 1.1966.1.22, 2005/01/26 17:30:51-06:00, [email protected]

[CIFS] Add support for updating Windows NT times/dates (part 1)

 cifspdu.h |   35 +++++++++++++++++++++++++----------
 cifssmb.c |    9 ++++++---
 inode.c   |   11 +++++------
 3 files changed, 36 insertions(+), 19 deletions(-)

diff -Nru a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h

fs/cifs/cifspdu.h +3 -5
@@ -1592,17 +1592,32 @@
 	char LinkDest[1];
 } FILE_UNIX_LINK_INFO;		/* level 0x201 QPathInfo */
 
+/* The following three structures are needed only for
+	setting time to NT4 and some older servers via
+	the primitive DOS time format */
 typedef struct {
-	__u16 CreationDate;
-	__u16 CreationTime;
-	__u16 LastAccessDate;
-	__u16 LastAccessTime;
-	__u16 LastWriteDate;

fs/cifs/cifspdu.h line 1603

Quoted 10 lines
fs/cifs/cifspdu.h +5 -5
-	__u16 LastWriteTime;
-	__u32 DataSize; /* File Size (EOF) */
-	__u32 AllocationSize;
-	__u16 Attributes; /* verify not u32 */
-	__u32 EASize;
+	__u16 Day:5;
+	__u16 Month:4;
+	__u16 Year:7;
+} SMB_DATE;
+

if this is an on the wire format (and it looks like one) then you want this one packed I suspect, and also I wonder if it needs to be byte order specific...