LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-17-2005, 06:48 PM   #1
wrat
Member
 
Registered: May 2004
Posts: 245

Rep: Reputation: 30
k3b problem and patch??


how does this patch work??
--- linux-2.6.11-mm1/drivers/block/scsi_ioctl.c.orig 2005-01-17 20:42:40.000000000 +0100
+++ linux-2.6.11-mm1/drivers/block/scsi_ioctl.c 2005-01-17 20:43:14.000000000 +0100
@@ -197,9 +197,7 @@ static int verify_command(struct file *f
if (type & CMD_WRITE_SAFE) {
if (file->f_mode & FMODE_WRITE)
return 0;
- }
-
- if (!(type & CMD_WARNED)) {
+ } else if (!(type & CMD_WARNED)) {
cmd_type[cmd[0]] = CMD_WARNED;
printk(KERN_WARNING "scsi: unknown opcode 0x%02x\n", cmd[0]);
}
 
Old 02-18-2005, 04:22 AM   #2
paxa
LQ Newbie
 
Registered: Feb 2005
Posts: 1

Rep: Reputation: 0
--- linux-2.6.11-mm1/drivers/block/scsi_ioctl.c.orig 2005-01-17 20:42:40.000000000 +0100

Above line is replaced with...

+++ linux-2.6.11-mm1/drivers/block/scsi_ioctl.c 2005-01-17 20:43:14.000000000 +0100

@@ -197,9 +197,7 @@

Above line is a pointer to a line and row in file scsi_ioctl.c...

static int verify_command(struct file *f
if (type & CMD_WRITE_SAFE) {
if (file->f_mode & FMODE_WRITE)
return 0;
}

if (!(type & CMD_WARNED)) {
cmd_type[cmd[0]] = CMD_WARNED;
printk(KERN_WARNING "scsi: unknown opcode 0x%02x\n", cmd[0]);
}

Above function is replaced with...

static int verify_command(struct file *f
if (type & CMD_WRITE_SAFE) {
if (file->f_mode & FMODE_WRITE)
return 0;
} else if (!(type & CMD_WARNED)) {
cmd_type[cmd[0]] = CMD_WARNED;
printk(KERN_WARNING "scsi: unknown opcode 0x%02x\n", cmd[0]);
}

The change connects the first if statement with the last with an else condition and makes the second if dependant on the first.
 
Old 02-18-2005, 04:32 AM   #3
amosf
Senior Member
 
Registered: Jun 2004
Location: Australia
Distribution: Mandriva/Slack - KDE
Posts: 1,672

Rep: Reputation: 46
This is a kernel patch to allow k3b and dvdtools to work with the newer kernels... There are problems with k3b and dvdtools in that they do not send correct commands, which are stopped by the kernal protection - to stop them possibly damaging drives as happened in the past. You could try to get the latest versions of k3b and dvdtools as they may be patched by now... Otherwise you need to edit the kernel (I do it slightly differently than the above, but similar) and recompile...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fix for K3B issue (kernel patch) cb9fl Linux - Software 2 03-07-2005 03:06 PM
k3b and SuSE 9.1 patch mikedeatworld Linux - Software 1 08-30-2004 02:07 PM
K3B on OpenBSD 3.5 patch branch predrag *BSD 5 08-29-2004 05:40 AM
How to Install patch-o-matic(a iptables patch) on redhat 9? itebooks Linux - Security 1 07-23-2004 08:51 AM
How to Apply patch for Mass Storage device to work? (uss725-2.4.20-rc2.patch) cevjr Linux - Hardware 3 04-20-2004 11:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration