summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifssmb.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2005-09-22 16:32:06 -0700
committerSteve French <sfrench@us.ibm.com>2005-09-22 16:32:06 -0700
commit70ca734a14366b634224a1e4586d43b36b65ab67 (patch)
treebad9c511f846baebc18d0f5190bbe5fde5ae0dd1 /fs/cifs/cifssmb.c
parent2096243885ee34b78cb57ce835e07c8536a67d2a (diff)
downloadlinux-70ca734a14366b634224a1e4586d43b36b65ab67.tar.gz
linux-70ca734a14366b634224a1e4586d43b36b65ab67.tar.bz2
linux-70ca734a14366b634224a1e4586d43b36b65ab67.zip
[CIFS] Various minor bigendian fixes and sparse level 2 warning message fixes
Most important of these fixes mapchars on bigendian and a few statfs fields Signed-off-by: Shaggy (shaggy@austin.ibm.com) Signed-off-by: Steve French (sfrench@us.ibm.com)
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r--fs/cifs/cifssmb.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index daf717e6b6eb..52caac063a77 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -779,7 +779,7 @@ OldOpenRetry:
/* BB FIXME END BB */
pSMB->Sattr = cpu_to_le16(ATTR_HIDDEN | ATTR_SYSTEM | ATTR_DIRECTORY);
- pSMB->OpenFunction = convert_disposition(openDisposition);
+ pSMB->OpenFunction = cpu_to_le16(convert_disposition(openDisposition));
count += name_len;
pSMB->hdr.smb_buf_length += count;
@@ -808,10 +808,12 @@ OldOpenRetry:
pfile_info->LastAccessTime = 0; /* BB fixme */
pfile_info->LastWriteTime = 0; /* BB fixme */
pfile_info->ChangeTime = 0; /* BB fixme */
- pfile_info->Attributes = pSMBr->FileAttributes;
+ pfile_info->Attributes =
+ cpu_to_le32(le16_to_cpu(pSMBr->FileAttributes));
/* the file_info buf is endian converted by caller */
- pfile_info->AllocationSize = pSMBr->EndOfFile;
- pfile_info->EndOfFile = pSMBr->EndOfFile;
+ pfile_info->AllocationSize =
+ cpu_to_le64(le32_to_cpu(pSMBr->EndOfFile));
+ pfile_info->EndOfFile = pfile_info->AllocationSize;
pfile_info->NumberOfLinks = cpu_to_le32(1);
}
}
@@ -2390,9 +2392,11 @@ QInfRetry:
cFYI(1, ("Send error in QueryInfo = %d", rc));
} else if (pFinfo) { /* decode response */
memset(pFinfo, 0, sizeof(FILE_ALL_INFO));
- pFinfo->AllocationSize = (__le64) pSMBr->size;
- pFinfo->EndOfFile = (__le64) pSMBr->size;
- pFinfo->Attributes = (__le32) pSMBr->attr;
+ pFinfo->AllocationSize =
+ cpu_to_le64(le32_to_cpu(pSMBr->size));
+ pFinfo->EndOfFile = pFinfo->AllocationSize;
+ pFinfo->Attributes =
+ cpu_to_le32(le16_to_cpu(pSMBr->attr));
} else
rc = -EIO; /* bad buffer passed in */
@@ -3722,16 +3726,16 @@ QFSPosixRetry:
le64_to_cpu(response_data->TotalBlocks);
FSData->f_bfree =
le64_to_cpu(response_data->BlocksAvail);
- if(response_data->UserBlocksAvail == -1) {
+ if(response_data->UserBlocksAvail == cpu_to_le64(-1)) {
FSData->f_bavail = FSData->f_bfree;
} else {
FSData->f_bavail =
le64_to_cpu(response_data->UserBlocksAvail);
}
- if(response_data->TotalFileNodes != -1)
+ if(response_data->TotalFileNodes != cpu_to_le64(-1))
FSData->f_files =
le64_to_cpu(response_data->TotalFileNodes);
- if(response_data->FreeFileNodes != -1)
+ if(response_data->FreeFileNodes != cpu_to_le64(-1))
FSData->f_ffree =
le64_to_cpu(response_data->FreeFileNodes);
}