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
27a399fd
Commit
27a399fd
authored
Sep 28, 2003
by
Andries E. Brouwer
Committed by
Linus Torvalds
Sep 28, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] hfs sparse fixes
parent
54a2788c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
21 deletions
+23
-21
fs/hfs/file.c
fs/hfs/file.c
+12
-11
fs/hfs/file_cap.c
fs/hfs/file_cap.c
+4
-4
fs/hfs/file_hdr.c
fs/hfs/file_hdr.c
+5
-4
include/linux/hfs_fs.h
include/linux/hfs_fs.h
+2
-2
No files found.
fs/hfs/file.c
View file @
27a399fd
...
@@ -25,10 +25,10 @@
...
@@ -25,10 +25,10 @@
/*================ Forward declarations ================*/
/*================ Forward declarations ================*/
static
hfs_rwret_t
hfs_file_read
(
struct
file
*
,
char
*
,
hfs_rwarg_t
,
static
hfs_rwret_t
hfs_file_read
(
struct
file
*
,
char
__user
*
,
hfs_rwarg_t
,
loff_t
*
);
loff_t
*
);
static
hfs_rwret_t
hfs_file_write
(
struct
file
*
,
const
char
*
,
hfs_rwarg_t
,
static
hfs_rwret_t
hfs_file_write
(
struct
file
*
,
const
char
__user
*
,
loff_t
*
);
hfs_rwarg_t
,
loff_t
*
);
static
void
hfs_file_truncate
(
struct
inode
*
);
static
void
hfs_file_truncate
(
struct
inode
*
);
/*================ Global variables ================*/
/*================ Global variables ================*/
...
@@ -139,7 +139,7 @@ int hfs_get_block(struct inode *inode, sector_t iblock, struct buffer_head *bh_r
...
@@ -139,7 +139,7 @@ int hfs_get_block(struct inode *inode, sector_t iblock, struct buffer_head *bh_r
* user-space at the address 'buf'. Returns the number of bytes
* user-space at the address 'buf'. Returns the number of bytes
* successfully transferred. This function checks the arguments, does
* successfully transferred. This function checks the arguments, does
* some setup and then calls hfs_do_read() to do the actual transfer. */
* some setup and then calls hfs_do_read() to do the actual transfer. */
static
hfs_rwret_t
hfs_file_read
(
struct
file
*
filp
,
char
*
buf
,
static
hfs_rwret_t
hfs_file_read
(
struct
file
*
filp
,
char
__user
*
buf
,
hfs_rwarg_t
count
,
loff_t
*
ppos
)
hfs_rwarg_t
count
,
loff_t
*
ppos
)
{
{
struct
inode
*
inode
=
filp
->
f_dentry
->
d_inode
;
struct
inode
*
inode
=
filp
->
f_dentry
->
d_inode
;
...
@@ -181,7 +181,7 @@ static hfs_rwret_t hfs_file_read(struct file * filp, char * buf,
...
@@ -181,7 +181,7 @@ static hfs_rwret_t hfs_file_read(struct file * filp, char * buf,
* 'file->f_pos' from user-space at the address 'buf'. The return
* 'file->f_pos' from user-space at the address 'buf'. The return
* value is the number of bytes actually transferred.
* value is the number of bytes actually transferred.
*/
*/
static
hfs_rwret_t
hfs_file_write
(
struct
file
*
filp
,
const
char
*
buf
,
static
hfs_rwret_t
hfs_file_write
(
struct
file
*
filp
,
const
char
__user
*
buf
,
hfs_rwarg_t
count
,
loff_t
*
ppos
)
hfs_rwarg_t
count
,
loff_t
*
ppos
)
{
{
struct
inode
*
inode
=
filp
->
f_dentry
->
d_inode
;
struct
inode
*
inode
=
filp
->
f_dentry
->
d_inode
;
...
@@ -242,7 +242,7 @@ static void hfs_file_truncate(struct inode * inode)
...
@@ -242,7 +242,7 @@ static void hfs_file_truncate(struct inode * inode)
*
*
* Like copy_to_user() while translating CR->NL.
* Like copy_to_user() while translating CR->NL.
*/
*/
static
inline
void
xlate_to_user
(
char
*
buf
,
const
char
*
data
,
int
count
)
static
inline
void
xlate_to_user
(
char
__user
*
buf
,
const
char
*
data
,
int
count
)
{
{
char
ch
;
char
ch
;
...
@@ -257,7 +257,8 @@ static inline void xlate_to_user(char *buf, const char *data, int count)
...
@@ -257,7 +257,8 @@ static inline void xlate_to_user(char *buf, const char *data, int count)
*
*
* Like copy_from_user() while translating NL->CR;
* Like copy_from_user() while translating NL->CR;
*/
*/
static
inline
int
xlate_from_user
(
char
*
data
,
const
char
*
buf
,
int
count
)
static
inline
int
xlate_from_user
(
char
*
data
,
const
char
__user
*
buf
,
int
count
)
{
{
int
i
;
int
i
;
...
@@ -290,8 +291,8 @@ static inline int xlate_from_user(char *data, const char *buf, int count)
...
@@ -290,8 +291,8 @@ static inline int xlate_from_user(char *data, const char *buf, int count)
* This is based on Linus's minix_file_read().
* This is based on Linus's minix_file_read().
* It has been changed to take into account that HFS files have no holes.
* It has been changed to take into account that HFS files have no holes.
*/
*/
hfs_s32
hfs_do_read
(
struct
inode
*
inode
,
struct
hfs_fork
*
fork
,
hfs_u32
pos
,
hfs_s32
hfs_do_read
(
struct
inode
*
inode
,
struct
hfs_fork
*
fork
,
hfs_u32
pos
,
char
*
buf
,
hfs_u32
count
)
char
__user
*
buf
,
hfs_u32
count
)
{
{
hfs_s32
size
,
chars
,
offset
,
block
,
blocks
,
read
=
0
;
hfs_s32
size
,
chars
,
offset
,
block
,
blocks
,
read
=
0
;
int
bhrequest
,
uptodate
;
int
bhrequest
,
uptodate
;
...
@@ -436,8 +437,8 @@ hfs_s32 hfs_do_read(struct inode *inode, struct hfs_fork * fork, hfs_u32 pos,
...
@@ -436,8 +437,8 @@ hfs_s32 hfs_do_read(struct inode *inode, struct hfs_fork * fork, hfs_u32 pos,
*
*
* This is just a minor edit of Linus's minix_file_write().
* This is just a minor edit of Linus's minix_file_write().
*/
*/
hfs_s32
hfs_do_write
(
struct
inode
*
inode
,
struct
hfs_fork
*
fork
,
hfs_u32
pos
,
hfs_s32
hfs_do_write
(
struct
inode
*
inode
,
struct
hfs_fork
*
fork
,
hfs_u32
pos
,
const
char
*
buf
,
hfs_u32
count
)
const
char
__user
*
buf
,
hfs_u32
count
)
{
{
hfs_s32
written
,
c
;
hfs_s32
written
,
c
;
struct
buffer_head
*
bh
;
struct
buffer_head
*
bh
;
...
...
fs/hfs/file_cap.c
View file @
27a399fd
...
@@ -29,9 +29,9 @@
...
@@ -29,9 +29,9 @@
/*================ Forward declarations ================*/
/*================ Forward declarations ================*/
static
loff_t
cap_info_llseek
(
struct
file
*
,
loff_t
,
static
loff_t
cap_info_llseek
(
struct
file
*
,
loff_t
,
int
);
int
);
static
hfs_rwret_t
cap_info_read
(
struct
file
*
,
char
*
,
static
hfs_rwret_t
cap_info_read
(
struct
file
*
,
char
__user
*
,
hfs_rwarg_t
,
loff_t
*
);
hfs_rwarg_t
,
loff_t
*
);
static
hfs_rwret_t
cap_info_write
(
struct
file
*
,
const
char
*
,
static
hfs_rwret_t
cap_info_write
(
struct
file
*
,
const
char
__user
*
,
hfs_rwarg_t
,
loff_t
*
);
hfs_rwarg_t
,
loff_t
*
);
/*================ Function-like macros ================*/
/*================ Function-like macros ================*/
...
@@ -121,7 +121,7 @@ static loff_t cap_info_llseek(struct file *file, loff_t offset, int origin)
...
@@ -121,7 +121,7 @@ static loff_t cap_info_llseek(struct file *file, loff_t offset, int origin)
* 'file->f_pos' to user-space at the address 'buf'. The return value
* 'file->f_pos' to user-space at the address 'buf'. The return value
* is the number of bytes actually transferred.
* is the number of bytes actually transferred.
*/
*/
static
hfs_rwret_t
cap_info_read
(
struct
file
*
filp
,
char
*
buf
,
static
hfs_rwret_t
cap_info_read
(
struct
file
*
filp
,
char
__user
*
buf
,
hfs_rwarg_t
count
,
loff_t
*
ppos
)
hfs_rwarg_t
count
,
loff_t
*
ppos
)
{
{
struct
inode
*
inode
=
filp
->
f_dentry
->
d_inode
;
struct
inode
*
inode
=
filp
->
f_dentry
->
d_inode
;
...
@@ -189,7 +189,7 @@ static hfs_rwret_t cap_info_read(struct file *filp, char *buf,
...
@@ -189,7 +189,7 @@ static hfs_rwret_t cap_info_read(struct file *filp, char *buf,
* '*ppos' from user-space at the address 'buf'.
* '*ppos' from user-space at the address 'buf'.
* The return value is the number of bytes actually transferred.
* The return value is the number of bytes actually transferred.
*/
*/
static
hfs_rwret_t
cap_info_write
(
struct
file
*
filp
,
const
char
*
buf
,
static
hfs_rwret_t
cap_info_write
(
struct
file
*
filp
,
const
char
__user
*
buf
,
hfs_rwarg_t
count
,
loff_t
*
ppos
)
hfs_rwarg_t
count
,
loff_t
*
ppos
)
{
{
struct
inode
*
inode
=
filp
->
f_dentry
->
d_inode
;
struct
inode
*
inode
=
filp
->
f_dentry
->
d_inode
;
...
...
fs/hfs/file_hdr.c
View file @
27a399fd
...
@@ -41,8 +41,9 @@
...
@@ -41,8 +41,9 @@
/*================ Forward declarations ================*/
/*================ Forward declarations ================*/
static
loff_t
hdr_llseek
(
struct
file
*
,
loff_t
,
int
);
static
loff_t
hdr_llseek
(
struct
file
*
,
loff_t
,
int
);
static
hfs_rwret_t
hdr_read
(
struct
file
*
,
char
*
,
hfs_rwarg_t
,
loff_t
*
);
static
hfs_rwret_t
hdr_read
(
struct
file
*
,
char
__user
*
,
static
hfs_rwret_t
hdr_write
(
struct
file
*
,
const
char
*
,
hfs_rwarg_t
,
loff_t
*
);
static
hfs_rwret_t
hdr_write
(
struct
file
*
,
const
char
__user
*
,
hfs_rwarg_t
,
loff_t
*
);
hfs_rwarg_t
,
loff_t
*
);
/*================ Global variables ================*/
/*================ Global variables ================*/
...
@@ -382,7 +383,7 @@ loff_t hdr_llseek(struct file *file, loff_t offset, int origin)
...
@@ -382,7 +383,7 @@ loff_t hdr_llseek(struct file *file, loff_t offset, int origin)
* successfully transferred.
* successfully transferred.
*/
*/
/* XXX: what about the entry count changing on us? */
/* XXX: what about the entry count changing on us? */
static
hfs_rwret_t
hdr_read
(
struct
file
*
filp
,
char
*
buf
,
static
hfs_rwret_t
hdr_read
(
struct
file
*
filp
,
char
__user
*
buf
,
hfs_rwarg_t
count
,
loff_t
*
ppos
)
hfs_rwarg_t
count
,
loff_t
*
ppos
)
{
{
struct
inode
*
inode
=
filp
->
f_dentry
->
d_inode
;
struct
inode
*
inode
=
filp
->
f_dentry
->
d_inode
;
...
@@ -633,7 +634,7 @@ static hfs_rwret_t hdr_read(struct file * filp, char * buf,
...
@@ -633,7 +634,7 @@ static hfs_rwret_t hdr_read(struct file * filp, char * buf,
* '*ppos' from user-space at the address 'buf'.
* '*ppos' from user-space at the address 'buf'.
* The return value is the number of bytes actually transferred.
* The return value is the number of bytes actually transferred.
*/
*/
static
hfs_rwret_t
hdr_write
(
struct
file
*
filp
,
const
char
*
buf
,
static
hfs_rwret_t
hdr_write
(
struct
file
*
filp
,
const
char
__user
*
buf
,
hfs_rwarg_t
count
,
loff_t
*
ppos
)
hfs_rwarg_t
count
,
loff_t
*
ppos
)
{
{
struct
inode
*
inode
=
filp
->
f_dentry
->
d_inode
;
struct
inode
*
inode
=
filp
->
f_dentry
->
d_inode
;
...
...
include/linux/hfs_fs.h
View file @
27a399fd
...
@@ -267,9 +267,9 @@ extern void hfs_nat_drop_dentry(struct dentry *, const ino_t);
...
@@ -267,9 +267,9 @@ extern void hfs_nat_drop_dentry(struct dentry *, const ino_t);
/* file.c */
/* file.c */
extern
hfs_s32
hfs_do_read
(
struct
inode
*
,
struct
hfs_fork
*
,
hfs_u32
,
extern
hfs_s32
hfs_do_read
(
struct
inode
*
,
struct
hfs_fork
*
,
hfs_u32
,
char
*
,
hfs_u32
);
char
__user
*
,
hfs_u32
);
extern
hfs_s32
hfs_do_write
(
struct
inode
*
,
struct
hfs_fork
*
,
hfs_u32
,
extern
hfs_s32
hfs_do_write
(
struct
inode
*
,
struct
hfs_fork
*
,
hfs_u32
,
const
char
*
,
hfs_u32
);
const
char
__user
*
,
hfs_u32
);
extern
void
hfs_file_fix_mode
(
struct
hfs_cat_entry
*
entry
);
extern
void
hfs_file_fix_mode
(
struct
hfs_cat_entry
*
entry
);
extern
struct
inode_operations
hfs_file_inode_operations
;
extern
struct
inode_operations
hfs_file_inode_operations
;
extern
struct
file_operations
hfs_file_operations
;
extern
struct
file_operations
hfs_file_operations
;
...
...
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