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
1716b785
Commit
1716b785
authored
Jan 12, 2003
by
Stephen Rothwell
Committed by
David S. Miller
Jan 12, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[COMPAT] compat_sys_[f]statfs - sparc64 part
parent
bcd998aa
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
71 deletions
+15
-71
arch/sparc64/kernel/sys_sparc32.c
arch/sparc64/kernel/sys_sparc32.c
+0
-55
arch/sparc64/kernel/systbls.S
arch/sparc64/kernel/systbls.S
+2
-2
include/asm-sparc64/compat.h
include/asm-sparc64/compat.h
+13
-0
include/asm-sparc64/statfs.h
include/asm-sparc64/statfs.h
+0
-14
No files found.
arch/sparc64/kernel/sys_sparc32.c
View file @
1716b785
...
...
@@ -840,61 +840,6 @@ asmlinkage long sys32_fcntl64(unsigned int fd, unsigned int cmd, unsigned long a
return
sys32_fcntl
(
fd
,
cmd
,
arg
);
}
static
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
int
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
int
sys_fstatfs
(
unsigned
int
fd
,
struct
statfs
*
buf
);
asmlinkage
int
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_truncate
(
const
char
*
path
,
unsigned
long
length
);
extern
asmlinkage
long
sys_ftruncate
(
unsigned
int
fd
,
unsigned
long
length
);
...
...
arch/sparc64/kernel/systbls.S
View file @
1716b785
...
...
@@ -50,7 +50,7 @@ sys_call_table32:
/*
140
*/
.
word
sys32_sendfile64
,
sys_nis_syscall
,
sys_futex
,
sys_gettid
,
sys32_getrlimit
.
word
sys32_setrlimit
,
sys_pivot_root
,
sys32_prctl
,
sys32_pciconfig_read
,
sys32_pciconfig_write
/*
150
*/
.
word
sys_nis_syscall
,
sys_nis_syscall
,
sys_nis_syscall
,
sys_poll
,
sys_getdents64
.
word
sys32_fcntl64
,
sys_ni_syscall
,
sys32_statfs
,
sys32
_fstatfs
,
sys_oldumount
.
word
sys32_fcntl64
,
sys_ni_syscall
,
compat_sys_statfs
,
compat_sys
_fstatfs
,
sys_oldumount
/*
160
*/
.
word
sys32_sched_setaffinity
,
sys32_sched_getaffinity
,
sys_getdomainname
,
sys_setdomainname
,
sys_nis_syscall
.
word
sys_quotactl
,
sys_set_tid_address
,
sys32_mount
,
sys_ustat
,
sys_setxattr
/*
170
*/
.
word
sys_lsetxattr
,
sys_fsetxattr
,
sys_getxattr
,
sys_lgetxattr
,
sys32_getdents
...
...
@@ -197,7 +197,7 @@ sunos_sys_table:
.
word
sunos_nosys
,
sunos_nosys
/*
150
*/
.
word
sys_getsockname
,
sunos_nosys
,
sunos_nosys
.
word
sys_poll
,
sunos_nosys
,
sunos_nosys
.
word
sunos_getdirentries
,
sys32_statfs
,
sys32
_fstatfs
.
word
sunos_getdirentries
,
compat_sys_statfs
,
compat_sys
_fstatfs
.
word
sys_oldumount
,
sunos_nosys
,
sunos_nosys
.
word
sys_getdomainname
,
sys_setdomainname
.
word
sunos_nosys
,
sys_quotactl
,
sunos_nosys
...
...
include/asm-sparc64/compat.h
View file @
1716b785
...
...
@@ -64,4 +64,17 @@ struct compat_flock {
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_SPARC64_COMPAT_H */
include/asm-sparc64/statfs.h
View file @
1716b785
...
...
@@ -5,25 +5,11 @@
#ifndef __KERNEL_STRICT_NAMES
#include <linux/types.h>
#include <linux/compat.h>
/* for compat_fsid_t */
typedef
__kernel_fsid_t
fsid_t
;
#endif
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
];
};
struct
statfs
{
long
f_type
;
long
f_bsize
;
...
...
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