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
a1940218
Commit
a1940218
authored
Jan 14, 2003
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: compat_sys_[f]statfs, from Stephen Rothwell
parent
7d24e8a6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
74 deletions
+15
-74
arch/ppc64/kernel/misc.S
arch/ppc64/kernel/misc.S
+2
-2
arch/ppc64/kernel/sys_ppc32.c
arch/ppc64/kernel/sys_ppc32.c
+0
-59
include/asm-ppc64/compat.h
include/asm-ppc64/compat.h
+13
-0
include/asm-ppc64/ppc32.h
include/asm-ppc64/ppc32.h
+0
-13
No files found.
arch/ppc64/kernel/misc.S
View file @
a1940218
...
@@ -567,8 +567,8 @@ _GLOBAL(sys_call_table32)
...
@@ -567,8 +567,8 @@ _GLOBAL(sys_call_table32)
.
llong
.
sys32_getpriority
.
llong
.
sys32_getpriority
.
llong
.
sys32_setpriority
.
llong
.
sys32_setpriority
.
llong
.
sys_ni_syscall
/*
old
profil
syscall
*/
.
llong
.
sys_ni_syscall
/*
old
profil
syscall
*/
.
llong
.
sys32
_statfs
.
llong
.
compat_sys
_statfs
.
llong
.
sys32
_fstatfs
/*
100
*/
.
llong
.
compat_sys
_fstatfs
/*
100
*/
.
llong
.
sys_ioperm
.
llong
.
sys_ioperm
.
llong
.
sys32_socketcall
.
llong
.
sys32_socketcall
.
llong
.
sys32_syslog
.
llong
.
sys32_syslog
...
...
arch/ppc64/kernel/sys_ppc32.c
View file @
a1940218
...
@@ -807,65 +807,6 @@ int cp_compat_stat(struct kstat *stat, struct compat_stat *statbuf)
...
@@ -807,65 +807,6 @@ int cp_compat_stat(struct kstat *stat, struct compat_stat *statbuf)
return
err
;
return
err
;
}
}
static
inline
int
put_statfs
(
struct
statfs32
*
ubuf
,
struct
statfs
*
kbuf
)
{
int
err
;
err
=
put_user
(
kbuf
->
f_type
,
&
ubuf
->
f_type
);
err
|=
__put_user
(
kbuf
->
f_bsize
,
&
ubuf
->
f_bsize
);
err
|=
__put_user
(
kbuf
->
f_blocks
,
&
ubuf
->
f_blocks
);
err
|=
__put_user
(
kbuf
->
f_bfree
,
&
ubuf
->
f_bfree
);
err
|=
__put_user
(
kbuf
->
f_bavail
,
&
ubuf
->
f_bavail
);
err
|=
__put_user
(
kbuf
->
f_files
,
&
ubuf
->
f_files
);
err
|=
__put_user
(
kbuf
->
f_ffree
,
&
ubuf
->
f_ffree
);
err
|=
__put_user
(
kbuf
->
f_namelen
,
&
ubuf
->
f_namelen
);
err
|=
__put_user
(
kbuf
->
f_fsid
.
val
[
0
],
&
ubuf
->
f_fsid
.
val
[
0
]);
err
|=
__put_user
(
kbuf
->
f_fsid
.
val
[
1
],
&
ubuf
->
f_fsid
.
val
[
1
]);
return
err
;
}
extern
asmlinkage
int
sys_statfs
(
const
char
*
path
,
struct
statfs
*
buf
);
asmlinkage
long
sys32_statfs
(
const
char
*
path
,
struct
statfs32
*
buf
)
{
int
ret
;
struct
statfs
s
;
mm_segment_t
old_fs
=
get_fs
();
char
*
pth
;
pth
=
getname
(
path
);
ret
=
PTR_ERR
(
pth
);
if
(
!
IS_ERR
(
pth
))
{
set_fs
(
KERNEL_DS
);
ret
=
sys_statfs
((
const
char
*
)
pth
,
&
s
);
set_fs
(
old_fs
);
putname
(
pth
);
if
(
put_statfs
(
buf
,
&
s
))
return
-
EFAULT
;
}
return
ret
;
}
extern
asmlinkage
long
sys_fstatfs
(
unsigned
int
fd
,
struct
statfs
*
buf
);
asmlinkage
long
sys32_fstatfs
(
unsigned
int
fd
,
struct
statfs32
*
buf
)
{
int
ret
;
struct
statfs
s
;
mm_segment_t
old_fs
=
get_fs
();
set_fs
(
KERNEL_DS
);
ret
=
sys_fstatfs
(
fd
,
&
s
);
set_fs
(
old_fs
);
if
(
put_statfs
(
buf
,
&
s
))
return
-
EFAULT
;
return
ret
;
}
extern
asmlinkage
long
sys_sysfs
(
int
option
,
unsigned
long
arg1
,
unsigned
long
arg2
);
extern
asmlinkage
long
sys_sysfs
(
int
option
,
unsigned
long
arg1
,
unsigned
long
arg2
);
/* Note: it is necessary to treat option as an unsigned int,
/* Note: it is necessary to treat option as an unsigned int,
...
...
include/asm-ppc64/compat.h
View file @
a1940218
...
@@ -64,4 +64,17 @@ struct compat_flock {
...
@@ -64,4 +64,17 @@ struct compat_flock {
short
__unused
;
short
__unused
;
};
};
struct
compat_statfs
{
int
f_type
;
int
f_bsize
;
int
f_blocks
;
int
f_bfree
;
int
f_bavail
;
int
f_files
;
int
f_ffree
;
compat_fsid_t
f_fsid
;
int
f_namelen
;
/* SunOS ignores this field. */
int
f_spare
[
6
];
};
#endif
/* _ASM_PPC64_COMPAT_H */
#endif
/* _ASM_PPC64_COMPAT_H */
include/asm-ppc64/ppc32.h
View file @
a1940218
...
@@ -40,19 +40,6 @@
...
@@ -40,19 +40,6 @@
/* These are here to support 32-bit syscalls on a 64-bit kernel. */
/* These are here to support 32-bit syscalls on a 64-bit kernel. */
struct
statfs32
{
int
f_type
;
int
f_bsize
;
int
f_blocks
;
int
f_bfree
;
int
f_bavail
;
int
f_files
;
int
f_ffree
;
compat_fsid_t
f_fsid
;
int
f_namelen
;
/* SunOS ignores this field. */
int
f_spare
[
6
];
};
typedef
union
sigval32
{
typedef
union
sigval32
{
int
sival_int
;
int
sival_int
;
unsigned
int
sival_ptr
;
unsigned
int
sival_ptr
;
...
...
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