Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
72bcfa77
Commit
72bcfa77
authored
Sep 26, 2004
by
Anton Altaparmakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NTFS: Change {const_,}cpu_to_le{16,32}(0) to just 0 as suggested by Al Viro.
Signed-off-by:
Anton Altaparmakov
<
aia21@cantab.net
>
parent
f5de856b
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
10 deletions
+10
-10
fs/ntfs/ChangeLog
fs/ntfs/ChangeLog
+1
-0
fs/ntfs/dir.c
fs/ntfs/dir.c
+1
-2
fs/ntfs/inode.c
fs/ntfs/inode.c
+1
-1
fs/ntfs/mft.c
fs/ntfs/mft.c
+4
-4
fs/ntfs/super.c
fs/ntfs/super.c
+2
-2
fs/ntfs/unistr.c
fs/ntfs/unistr.c
+1
-1
No files found.
fs/ntfs/ChangeLog
View file @
72bcfa77
...
@@ -54,6 +54,7 @@ ToDo/Notes:
...
@@ -54,6 +54,7 @@ ToDo/Notes:
- Fix a bug found by the new sparse bitwise warnings where the default
- Fix a bug found by the new sparse bitwise warnings where the default
upcase table was defined as a pointer to wchar_t rather than ntfschar
upcase table was defined as a pointer to wchar_t rather than ntfschar
in fs/ntfs/ntfs.h and super.c.
in fs/ntfs/ntfs.h and super.c.
- Change {const_,}cpu_to_le{16,32}(0) to just 0 as suggested by Al Viro.
2.1.18 - Fix scheduling latencies at mount time as well as an endianness bug.
2.1.18 - Fix scheduling latencies at mount time as well as an endianness bug.
...
...
fs/ntfs/dir.c
View file @
72bcfa77
...
@@ -28,8 +28,7 @@
...
@@ -28,8 +28,7 @@
* The little endian Unicode string $I30 as a global constant.
* The little endian Unicode string $I30 as a global constant.
*/
*/
ntfschar
I30
[
5
]
=
{
const_cpu_to_le16
(
'$'
),
const_cpu_to_le16
(
'I'
),
ntfschar
I30
[
5
]
=
{
const_cpu_to_le16
(
'$'
),
const_cpu_to_le16
(
'I'
),
const_cpu_to_le16
(
'3'
),
const_cpu_to_le16
(
'0'
),
const_cpu_to_le16
(
'3'
),
const_cpu_to_le16
(
'0'
),
0
};
const_cpu_to_le16
(
0
)
};
/**
/**
* ntfs_lookup_inode_by_name - find an inode in a directory given its name
* ntfs_lookup_inode_by_name - find an inode in a directory given its name
...
...
fs/ntfs/inode.c
View file @
72bcfa77
...
@@ -130,7 +130,7 @@ static int ntfs_init_locked_inode(struct inode *vi, ntfs_attr *na)
...
@@ -130,7 +130,7 @@ static int ntfs_init_locked_inode(struct inode *vi, ntfs_attr *na)
if
(
!
ni
->
name
)
if
(
!
ni
->
name
)
return
-
ENOMEM
;
return
-
ENOMEM
;
memcpy
(
ni
->
name
,
na
->
name
,
i
);
memcpy
(
ni
->
name
,
na
->
name
,
i
);
ni
->
name
[
i
]
=
cpu_to_le16
(
0
)
;
ni
->
name
[
i
]
=
0
;
}
}
return
0
;
return
0
;
}
}
...
...
fs/ntfs/mft.c
View file @
72bcfa77
...
@@ -47,11 +47,11 @@ static void __format_mft_record(MFT_RECORD *m, const int size,
...
@@ -47,11 +47,11 @@ static void __format_mft_record(MFT_RECORD *m, const int size,
*
(
le16
*
)((
char
*
)
m
+
((
sizeof
(
MFT_RECORD
)
+
1
)
&
~
1
))
=
cpu_to_le16
(
1
);
*
(
le16
*
)((
char
*
)
m
+
((
sizeof
(
MFT_RECORD
)
+
1
)
&
~
1
))
=
cpu_to_le16
(
1
);
m
->
lsn
=
cpu_to_le64
(
0LL
);
m
->
lsn
=
cpu_to_le64
(
0LL
);
m
->
sequence_number
=
cpu_to_le16
(
1
);
m
->
sequence_number
=
cpu_to_le16
(
1
);
m
->
link_count
=
cpu_to_le16
(
0
)
;
m
->
link_count
=
0
;
/* Aligned to 8-byte boundary. */
/* Aligned to 8-byte boundary. */
m
->
attrs_offset
=
cpu_to_le16
((
le16_to_cpu
(
m
->
usa_ofs
)
+
m
->
attrs_offset
=
cpu_to_le16
((
le16_to_cpu
(
m
->
usa_ofs
)
+
(
le16_to_cpu
(
m
->
usa_count
)
<<
1
)
+
7
)
&
~
7
);
(
le16_to_cpu
(
m
->
usa_count
)
<<
1
)
+
7
)
&
~
7
);
m
->
flags
=
cpu_to_le16
(
0
)
;
m
->
flags
=
0
;
/*
/*
* Using attrs_offset plus eight bytes (for the termination attribute),
* Using attrs_offset plus eight bytes (for the termination attribute),
* aligned to 8-byte boundary.
* aligned to 8-byte boundary.
...
@@ -60,10 +60,10 @@ static void __format_mft_record(MFT_RECORD *m, const int size,
...
@@ -60,10 +60,10 @@ static void __format_mft_record(MFT_RECORD *m, const int size,
~
7
);
~
7
);
m
->
bytes_allocated
=
cpu_to_le32
(
size
);
m
->
bytes_allocated
=
cpu_to_le32
(
size
);
m
->
base_mft_record
=
cpu_to_le64
((
MFT_REF
)
0
);
m
->
base_mft_record
=
cpu_to_le64
((
MFT_REF
)
0
);
m
->
next_attr_instance
=
cpu_to_le16
(
0
)
;
m
->
next_attr_instance
=
0
;
a
=
(
ATTR_RECORD
*
)((
char
*
)
m
+
le16_to_cpu
(
m
->
attrs_offset
));
a
=
(
ATTR_RECORD
*
)((
char
*
)
m
+
le16_to_cpu
(
m
->
attrs_offset
));
a
->
type
=
AT_END
;
a
->
type
=
AT_END
;
a
->
length
=
cpu_to_le32
(
0
)
;
a
->
length
=
0
;
}
}
/**
/**
...
...
fs/ntfs/super.c
View file @
72bcfa77
...
@@ -1114,9 +1114,9 @@ static BOOL load_and_init_quota(ntfs_volume *vol)
...
@@ -1114,9 +1114,9 @@ static BOOL load_and_init_quota(ntfs_volume *vol)
static
const
ntfschar
Quota
[
7
]
=
{
const_cpu_to_le16
(
'$'
),
static
const
ntfschar
Quota
[
7
]
=
{
const_cpu_to_le16
(
'$'
),
const_cpu_to_le16
(
'Q'
),
const_cpu_to_le16
(
'u'
),
const_cpu_to_le16
(
'Q'
),
const_cpu_to_le16
(
'u'
),
const_cpu_to_le16
(
'o'
),
const_cpu_to_le16
(
't'
),
const_cpu_to_le16
(
'o'
),
const_cpu_to_le16
(
't'
),
const_cpu_to_le16
(
'a'
),
const_cpu_to_le16
(
0
)
};
const_cpu_to_le16
(
'a'
),
0
};
static
ntfschar
Q
[
3
]
=
{
const_cpu_to_le16
(
'$'
),
static
ntfschar
Q
[
3
]
=
{
const_cpu_to_le16
(
'$'
),
const_cpu_to_le16
(
'Q'
),
const_cpu_to_le16
(
0
)
};
const_cpu_to_le16
(
'Q'
),
0
};
ntfs_debug
(
"Entering."
);
ntfs_debug
(
"Entering."
);
/*
/*
...
...
fs/ntfs/unistr.c
View file @
72bcfa77
...
@@ -276,7 +276,7 @@ int ntfs_nlstoucs(const ntfs_volume *vol, const char *ins,
...
@@ -276,7 +276,7 @@ int ntfs_nlstoucs(const ntfs_volume *vol, const char *ins,
}
/* else (wc_len < 0) */
}
/* else (wc_len < 0) */
goto
conversion_err
;
goto
conversion_err
;
}
}
ucs
[
o
]
=
cpu_to_le16
(
0
)
;
ucs
[
o
]
=
0
;
*
outs
=
ucs
;
*
outs
=
ucs
;
return
o
;
return
o
;
}
/* else (!ucs) */
}
/* else (!ucs) */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment