Example #1
0
/*      Close floppy tape device
 */
static int zft_close(struct inode *ino, struct file *filep)
{
	int result;
	TRACE_FUN(ft_t_flow);

	if ( !test_bit(0,&busy_flag) || iminor(ino) != zft_unit) {
		TRACE(ft_t_err, "failed: not busy or wrong unit");
		TRACE_EXIT 0;
	}
	sigfillset(&current->blocked);
	result = _zft_close();
	if (result < 0) {
		TRACE(ft_t_err, "_zft_close failed");
	}
	current->blocked = orig_sigmask; /* restore before open state */
	clear_bit(0,&busy_flag);
	TRACE_EXIT 0;
}
Example #2
0
/*      Close floppy tape device
 */
static int zft_close(struct inode *ino, struct file *filep)
{
	int result;
	TRACE_FUN(ft_t_flow);

	lock_kernel();
	if (!busy_flag || MINOR(ino->i_rdev) != zft_unit) {
		TRACE(ft_t_err, "failed: not busy or wrong unit");
		unlock_kernel();
		TRACE_EXIT 0;
	}
	sigfillset(&current->blocked);
	result = _zft_close();
	if (result < 0) {
		TRACE(ft_t_err, "_zft_close failed");
	}
	current->blocked = orig_sigmask; /* restore before open state */
	busy_flag = 0;
	unlock_kernel();
	TRACE_EXIT 0;
}