Changes by: cha0smaster
Update of /cvsroot/linux-ntfs/ntfsprogs/libntfs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7165/libntfs
Modified Files:
attrib.c
Log Message:
Add change protype of ntfs_attr_pwrite: make @b const.
Index: attrib.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/libntfs/attrib.c,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -p -r1.164 -r1.165
--- attrib.c 21 Jun 2005 09:55:15 -0000 1.164
+++ attrib.c 2 Jul 2005 19:16:18 -0000 1.165
@@ -878,7 +878,7 @@ rl_err_out:
* appropriately to the return code of ntfs_pwrite(), or to EINVAL in case of
* invalid arguments.
*/
-s64 ntfs_attr_pwrite(ntfs_attr *na, const s64 pos, s64 count, void *b)
+s64 ntfs_attr_pwrite(ntfs_attr *na, const s64 pos, s64 count, const void *b)
{
s64 written, to_write, ofs, total, old_initialized_size, old_data_size;
ntfs_volume *vol;
@@ -1073,7 +1073,7 @@ s64 ntfs_attr_pwrite(ntfs_attr *na, cons
written = to_write / sizeof(unsigned long);
eo = 0;
for (t = 0; t < written; t++) {
- if (((unsigned long*)b)[t]) {
+ if (((const unsigned long*)b)[t]) {
eo = 1;
break;
}
@@ -1081,9 +1081,9 @@ s64 ntfs_attr_pwrite(ntfs_attr *na, cons
cnt = to_write & (sizeof(unsigned long) - 1);
if (cnt && !eo) {
int i;
- u8 *b2;
+ const u8 *b2;
- b2 = (u8*)b + (to_write &
+ b2 = (const u8*)b + (to_write &
~(sizeof(unsigned long) - 1));
for (i = 0; i < cnt; i++) {
if (b2[i]) {
@@ -1099,7 +1099,7 @@ s64 ntfs_attr_pwrite(ntfs_attr *na, cons
*/
total += to_write;
count -= to_write;
- b = (u8*)b + to_write;
+ b = (const u8*)b + to_write;
continue;
}
/* The buffer is non zero, instantiate the hole. */
@@ -1250,7 +1250,7 @@ retry:
if (written > 0) {
total += written;
count -= written;
- b = (u8*)b + written;
+ b = (const u8*)b + written;
continue;
}
/* If the syscall was interrupted, try again. */
|