Commit 0f5f0247 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] cifs: annotate FILE_SYSTEM_DEVICE_INFO

Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 21a00e7d
......@@ -126,26 +126,27 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
i = 0;
read_lock(&GlobalSMBSeslock);
list_for_each(tmp, &GlobalTreeConnectionList) {
__u32 dev_type;
i++;
tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList);
dev_type = le32_to_cpu(tcon->fsDevInfo.DeviceType);
length =
sprintf(buf,
"\n%d) %s Uses: %d Type: %s Characteristics: 0x%x Attributes: 0x%x\nPathComponentMax: %d Status: %d",
i, tcon->treeName,
atomic_read(&tcon->useCount),
tcon->nativeFileSystem,
tcon->fsDevInfo.DeviceCharacteristics,
le32_to_cpu(tcon->fsDevInfo.DeviceCharacteristics),
tcon->fsAttrInfo.Attributes,
tcon->fsAttrInfo.MaxPathNameComponentLength,tcon->tidStatus);
buf += length;
if (tcon->fsDevInfo.DeviceType == FILE_DEVICE_DISK)
if (dev_type == FILE_DEVICE_DISK)
length = sprintf(buf, " type: DISK ");
else if (tcon->fsDevInfo.DeviceType == FILE_DEVICE_CD_ROM)
else if (dev_type == FILE_DEVICE_CD_ROM)
length = sprintf(buf, " type: CDROM ");
else
length =
sprintf(buf, " type: %d ",
tcon->fsDevInfo.DeviceType);
sprintf(buf, " type: %d ", dev_type);
buf += length;
if(tcon->tidStatus == CifsNeedReconnect) {
buf += sprintf(buf, "\tDISCONNECTED ");
......
......@@ -1567,8 +1567,8 @@ typedef struct {
#define FILE_DEVICE_NETWORK_REDIRECTOR 0x00000028
typedef struct {
__u32 DeviceType;
__u32 DeviceCharacteristics;
__le32 DeviceType;
__le32 DeviceCharacteristics;
} FILE_SYSTEM_DEVICE_INFO; /* device info, level 0x104 */
typedef struct {
......
......@@ -2431,10 +2431,6 @@ CIFSSMBQFSDeviceInfo(const int xid, struct cifsTconInfo *tcon,
(FILE_SYSTEM_DEVICE_INFO
*) (((char *) &pSMBr->hdr.Protocol) +
data_offset);
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));
}
......
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