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
9805e1fe
Commit
9805e1fe
authored
Mar 23, 2004
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC64]: Provide d_type in sys32_getdents().
parent
db80df6e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
arch/sparc64/kernel/sys_sparc32.c
arch/sparc64/kernel/sys_sparc32.c
+2
-1
No files found.
arch/sparc64/kernel/sys_sparc32.c
View file @
9805e1fe
...
@@ -1089,7 +1089,7 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset, i
...
@@ -1089,7 +1089,7 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset, i
{
{
struct
linux_dirent32
*
dirent
;
struct
linux_dirent32
*
dirent
;
struct
getdents_callback32
*
buf
=
(
struct
getdents_callback32
*
)
__buf
;
struct
getdents_callback32
*
buf
=
(
struct
getdents_callback32
*
)
__buf
;
int
reclen
=
ROUND_UP
(
NAME_OFFSET
(
dirent
)
+
namlen
+
1
);
int
reclen
=
ROUND_UP
(
NAME_OFFSET
(
dirent
)
+
namlen
+
2
);
buf
->
error
=
-
EINVAL
;
/* only used if we fail.. */
buf
->
error
=
-
EINVAL
;
/* only used if we fail.. */
if
(
reclen
>
buf
->
count
)
if
(
reclen
>
buf
->
count
)
...
@@ -1103,6 +1103,7 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset, i
...
@@ -1103,6 +1103,7 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset, i
put_user
(
reclen
,
&
dirent
->
d_reclen
);
put_user
(
reclen
,
&
dirent
->
d_reclen
);
copy_to_user
(
dirent
->
d_name
,
name
,
namlen
);
copy_to_user
(
dirent
->
d_name
,
name
,
namlen
);
put_user
(
0
,
dirent
->
d_name
+
namlen
);
put_user
(
0
,
dirent
->
d_name
+
namlen
);
put_user
(
d_type
,
(
char
*
)
dirent
+
reclen
-
1
);
((
char
*
)
dirent
)
+=
reclen
;
((
char
*
)
dirent
)
+=
reclen
;
buf
->
current_dir
=
dirent
;
buf
->
current_dir
=
dirent
;
buf
->
count
-=
reclen
;
buf
->
count
-=
reclen
;
...
...
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