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
2f3c3a9b
Commit
2f3c3a9b
authored
Nov 25, 2002
by
Alan Cox
Committed by
Linus Torvalds
Nov 25, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] rescue ftape from the ravages of that Rusty chap
parent
bfdfd4c3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
83 deletions
+4
-83
drivers/char/ftape/lowlevel/ftape-init.h
drivers/char/ftape/lowlevel/ftape-init.h
+0
-11
drivers/char/ftape/zftape/zftape-ctl.c
drivers/char/ftape/zftape/zftape-ctl.c
+0
-44
drivers/char/ftape/zftape/zftape-init.c
drivers/char/ftape/zftape/zftape-init.c
+4
-21
drivers/char/ftape/zftape/zftape-init.h
drivers/char/ftape/zftape/zftape-init.h
+0
-7
No files found.
drivers/char/ftape/lowlevel/ftape-init.h
View file @
2f3c3a9b
...
...
@@ -40,15 +40,4 @@
#define QIC117_TAPE_MAJOR 27
#endif
/* ftape-init.c defined global variables.
*/
/* ftape-init.c defined global functions not defined in ftape.h
*/
#ifdef MODULE
asmlinkage
extern
int
init_module
(
void
);
asmlinkage
extern
void
cleanup_module
(
void
);
#endif
#endif
drivers/char/ftape/zftape/zftape-ctl.c
View file @
2f3c3a9b
...
...
@@ -648,50 +648,6 @@ int zft_check_write_access(zft_position *pos)
TRACE_EXIT
0
;
}
/* decide when we should lock the module in memory, even when calling
* the release routine. This really is necessary for use with
* kerneld.
*
* NOTE: we MUST NOT use zft_write_protected, because this includes
* the file access mode as well which has no meaning with our
* asynchronous update scheme.
*
* Ugly, ugly. We need to look the module if we changed the block size.
* How sad! Need persistent modules storage!
*
* NOTE: I don't want to lock the module if the number of dma buffers
* has been changed. It's enough! Stop the story! Give me persisitent
* module storage! Do it!
*/
int
zft_dirty
(
void
)
{
if
(
!
ft_formatted
||
zft_offline
)
{
/* cannot be dirty if not formatted or offline */
return
0
;
}
if
(
zft_blk_sz
!=
CONFIG_ZFT_DFLT_BLK_SZ
)
{
/* blocksize changed, must lock */
return
1
;
}
if
(
zft_mt_compression
!=
0
)
{
/* compression mode with /dev/qft, must lock */
return
1
;
}
if
(
!
zft_header_read
)
{
/* tape is logical at BOT, no lock */
return
0
;
}
if
(
!
zft_tape_at_lbot
(
&
zft_pos
))
{
/* somewhere inside a volume, lock tape */
return
1
;
}
if
(
zft_volume_table_changed
||
zft_header_changed
)
{
/* header segments dirty if tape not write protected */
return
!
(
ft_write_protected
||
zft_old_ftape
);
}
return
0
;
}
/* OPEN routine called by kernel-interface code
*
* NOTE: this is also called by mt_reset() with dev_minor == -1
...
...
drivers/char/ftape/zftape/zftape-init.c
View file @
2f3c3a9b
...
...
@@ -314,7 +314,7 @@ extern int zft_compressor_init(void);
/* Called by modules package when installing the driver or by kernel
* during the initialization phase
*/
int
__init
zft_init
(
void
)
static
int
__init
zft_init
(
void
)
{
int
i
;
TRACE_FUN
(
ft_t_flow
);
...
...
@@ -392,27 +392,9 @@ KERN_INFO
}
#ifdef MODULE
/* Called by modules package before trying to unload the module
*/
static
int
can_unload
(
void
)
{
return
(
GET_USE_COUNT
(
THIS_MODULE
)
||
zft_dirty
()
||
test_bit
(
0
,
&
busy_flag
))
?-
EBUSY
:
0
;
}
/* Called by modules package when installing the driver
*/
int
init_module
(
void
)
{
if
(
!
mod_member_present
(
&
__this_module
,
can_unload
))
{
return
-
EBUSY
;
}
__this_module
.
can_unload
=
can_unload
;
return
zft_init
();
}
/* Called by modules package when removing the driver
*/
void
cleanup_module
(
void
)
static
void
zft_exit
(
void
)
{
int
i
;
TRACE_FUN
(
ft_t_flow
);
...
...
@@ -435,4 +417,5 @@ void cleanup_module(void)
TRACE_EXIT
;
}
#endif
/* MODULE */
module_init
(
zft_init
);
module_exit
(
zft_exit
);
drivers/char/ftape/zftape/zftape-init.h
View file @
2f3c3a9b
...
...
@@ -73,13 +73,6 @@ extern int zft_cmpr_register(struct zft_cmpr_ops *new_ops);
extern
struct
zft_cmpr_ops
*
zft_cmpr_unregister
(
void
);
extern
int
zft_cmpr_lock
(
int
try_to_load
);
#ifdef MODULE
asmlinkage
extern
int
init_module
(
void
);
asmlinkage
extern
void
cleanup_module
(
void
);
#endif
#endif
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