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
Kirill Smelkov
linux
Commits
62a8f46c
Commit
62a8f46c
authored
Sep 23, 2004
by
Anton Altaparmakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NTFS: Change '\0' and L'\0' to simply 0 as per advice from Linus Torvalds.
Signed-off-by:
Anton Altaparmakov
<
aia21@cantab.net
>
parent
18e3056b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
7 deletions
+14
-7
fs/ntfs/ChangeLog
fs/ntfs/ChangeLog
+1
-0
fs/ntfs/inode.c
fs/ntfs/inode.c
+10
-4
fs/ntfs/super.c
fs/ntfs/super.c
+1
-1
fs/ntfs/unistr.c
fs/ntfs/unistr.c
+2
-2
No files found.
fs/ntfs/ChangeLog
View file @
62a8f46c
...
...
@@ -30,6 +30,7 @@ ToDo/Notes:
kernel.
- Get rid of the ugly transparent union in fs/ntfs/dir.c::ntfs_readdir()
and ntfs_filldir() as per suggestion from Al Viro.
- Change '\0' and L'\0' to simply 0 as per advice from Linus Torvalds.
2.1.18 - Fix scheduling latencies at mount time as well as an endianness bug.
...
...
fs/ntfs/inode.c
View file @
62a8f46c
...
...
@@ -130,7 +130,7 @@ static int ntfs_init_locked_inode(struct inode *vi, ntfs_attr *na)
if
(
!
ni
->
name
)
return
-
ENOMEM
;
memcpy
(
ni
->
name
,
na
->
name
,
i
);
ni
->
name
[
i
]
=
cpu_to_le16
(
L'\0'
);
ni
->
name
[
i
]
=
cpu_to_le16
(
0
);
}
return
0
;
}
...
...
@@ -2270,6 +2270,12 @@ int ntfs_show_options(struct seq_file *sf, struct vfsmount *mnt)
*
* We don't support i_size changes yet.
*
* The kernel guarantees that @vi is a regular file (S_ISREG() is true) and
* that the change is allowed.
*
* This implies for us that @vi is a file inode rather than a directory, index,
* or attribute inode as well as that @vi is a base inode.
*
* Called with ->i_sem held. In all but one case ->i_alloc_sem is held for
* writing. The only case where ->i_alloc_sem is not held is
* mm/filemap.c::generic_file_buffered_write() where vmtruncate() is called
...
...
@@ -2279,10 +2285,10 @@ int ntfs_show_options(struct seq_file *sf, struct vfsmount *mnt)
void
ntfs_truncate
(
struct
inode
*
vi
)
{
// TODO: Implement...
ntfs_warning
(
vi
->
i_sb
,
"Eeek: i_size may have changed! If you see "
ntfs_warning
(
vi
->
i_sb
,
"Eeek: i_size may have changed!
If you see "
"this right after a message from "
"ntfs_
{prepare,commit}_{,nonresident_}write() then
"
"
just ignore it.
Otherwise it is bad news."
);
"ntfs_
prepare_{,nonresident_}write() then just ignore
"
"
it.
Otherwise it is bad news."
);
// TODO: reset i_size now!
return
;
}
...
...
fs/ntfs/super.c
View file @
62a8f46c
...
...
@@ -145,7 +145,7 @@ static BOOL parse_options(ntfs_volume *vol, char *opt)
ntfs_debug
(
"Entering with mount options string: %s"
,
opt
);
while
((
p
=
strsep
(
&
opt
,
","
)))
{
if
((
v
=
strchr
(
p
,
'='
)))
*
v
++
=
'\0'
;
*
v
++
=
0
;
NTFS_GETOPT
(
"uid"
,
uid
)
else
NTFS_GETOPT
(
"gid"
,
gid
)
else
NTFS_GETOPT
(
"umask"
,
fmask
=
dmask
)
...
...
fs/ntfs/unistr.c
View file @
62a8f46c
...
...
@@ -276,7 +276,7 @@ int ntfs_nlstoucs(const ntfs_volume *vol, const char *ins,
}
/* else (wc_len < 0) */
goto
conversion_err
;
}
ucs
[
o
]
=
cpu_to_le16
(
'\0'
);
ucs
[
o
]
=
cpu_to_le16
(
0
);
*
outs
=
ucs
;
return
o
;
}
/* else (!ucs) */
...
...
@@ -362,7 +362,7 @@ retry: wc = nls->uni2char(le16_to_cpu(ins[i]), ns + o,
}
/* wc < 0, real error. */
goto
conversion_err
;
}
ns
[
o
]
=
'\0'
;
ns
[
o
]
=
0
;
*
outs
=
ns
;
return
o
;
}
/* else (!ins) */
...
...
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