patch-2.4.19 linux-2.4.19/drivers/block/swim3.c
Next file: linux-2.4.19/drivers/block/swim_iop.c
Previous file: linux-2.4.19/drivers/block/smart1,2.h
Back to the patch index
Back to the overall index
- Lines: 31
- Date:
Fri Aug 2 17:39:43 2002
- Orig file:
linux-2.4.18/drivers/block/swim3.c
- Orig date:
Mon Feb 25 11:37:57 2002
diff -urN linux-2.4.18/drivers/block/swim3.c linux-2.4.19/drivers/block/swim3.c
@@ -811,16 +811,6 @@
return err;
}
-int swim3_fd_eject(int devnum)
-{
- if (devnum >= floppy_count)
- return -ENODEV;
- /* Do not check this - this function should ONLY be called early
- * in the boot process! */
- /* if (floppy_states[devnum].ref_count != 1) return -EBUSY; */
- return fd_eject(&floppy_states[devnum]);
-}
-
static struct floppy_struct floppy_type =
{ 2880,18,2,80,0,0x1B,0x00,0xCF,0x6C,NULL }; /* 7 1.44MB 3.5" */
@@ -849,9 +839,10 @@
err = fd_eject(fs);
return err;
case FDGETPRM:
- err = copy_to_user((void *) param, (void *) &floppy_type,
- sizeof(struct floppy_struct));
- return err;
+ if (copy_to_user((void *) param, (void *)&floppy_type,
+ sizeof(struct floppy_struct)))
+ return -EFAULT;
+ return 0;
}
return -ENOTTY;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)