Commit 8d46599d authored by Steve French's avatar Steve French Committed by Steve French

fix big endian conversion of file system attribute and device info

parent f120b7b2
......@@ -74,7 +74,7 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
"---------------------------------------------------\n");
buf += length;
length = sprintf(buf, "Servers: \n");
length = sprintf(buf, "Servers:\n");
buf += length;
i = 0;
......@@ -89,8 +89,10 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
ses->serverOS, ses->serverNOS, ses->capabilities,ses->status,ses->server->tcpStatus);
buf += length;
if(ses->server) {
buf += sprintf(buf, "\n\tLocal Users To Same Server: %d SecMode: 0x%x",
atomic_read(&ses->server->socketUseCount),ses->server->secMode);
buf += sprintf(buf, "\n\tLocal Users To Same Server: %d SecMode: 0x%x Req Active: %d",
atomic_read(&ses->server->socketUseCount),
ses->server->secMode,
atomic_read(&ses->server->inFlight));
/* length = sprintf(buf, "\nMIDs: \n");
buf += length;
......@@ -113,7 +115,7 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
sprintf(buf, "\n");
buf++;
length = sprintf(buf, "\nShares: \n");
length = sprintf(buf, "\nShares:\n");
buf += length;
i = 0;
......
......@@ -2291,6 +2291,11 @@ CIFSSMBQFSAttributeInfo(int xid, struct cifsTconInfo *tcon,
(FILE_SYSTEM_ATTRIBUTE_INFO
*) (((char *) &pSMBr->hdr.Protocol) +
pSMBr->DataOffset);
response_data->Attributes = le32_to_cpu(response_data->Attributes);
response_data->MaxPathNameComponentLength =
le32_to_cpu(response_data->MaxPathNameComponentLength);
response_data->FileSystemNameLen =
le32_to_cpu(response_data->FileSystemNameLen);
memcpy(&tcon->fsAttrInfo, response_data,
sizeof (FILE_SYSTEM_ATTRIBUTE_INFO));
}
......@@ -2360,6 +2365,10 @@ CIFSSMBQFSDeviceInfo(int xid, struct cifsTconInfo *tcon,
(FILE_SYSTEM_DEVICE_INFO
*) (((char *) &pSMBr->hdr.Protocol) +
pSMBr->DataOffset);
response_data->DeviceType =
le32_to_cpu(response_data->DeviceType);
response_data->DeviceCharacteristics =
le32_to_cpu(response_data->DeviceCharacteristics);
memcpy(&tcon->fsDevInfo, response_data,
sizeof (FILE_SYSTEM_DEVICE_INFO));
}
......@@ -2370,7 +2379,6 @@ CIFSSMBQFSDeviceInfo(int xid, struct cifsTconInfo *tcon,
if (rc == -EAGAIN)
goto QFSDeviceRetry;
return rc;
}
......@@ -2428,6 +2436,12 @@ CIFSSMBQFSUnixInfo(int xid, struct cifsTconInfo *tcon,
(FILE_SYSTEM_UNIX_INFO
*) (((char *) &pSMBr->hdr.Protocol) +
pSMBr->DataOffset);
response_data->MajorVersionNumber =
le16_to_cpu(response_data->MajorVersionNumber);
response_data->MinorVersionNumber =
le16_to_cpu(response_data->MinorVersionNumber);
response_data->Capability =
le64_to_cpu(response_data->Capability);
memcpy(&tcon->fsUnixInfo, response_data,
sizeof (FILE_SYSTEM_UNIX_INFO));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment