patch-2.1.4 linux/drivers/cdrom/sjcd.c
Next file: linux/drivers/cdrom/sonycd535.c
Previous file: linux/drivers/cdrom/sbpcd.c
Back to the patch index
Back to the overall index
- Lines: 81
- Date:
Sun Oct 13 21:11:10 1996
- Orig file:
v2.1.3/linux/drivers/cdrom/sjcd.c
- Orig date:
Fri Apr 12 09:49:33 1996
diff -u --recursive --new-file v2.1.3/linux/drivers/cdrom/sjcd.c linux/drivers/cdrom/sjcd.c
@@ -722,7 +722,7 @@
printk( "SJCD: ioctl: playtrkind\n" );
#endif
if( ( s = verify_area( VERIFY_READ, (void *)arg, sizeof( ti ) ) ) == 0 ){
- memcpy_fromfs( &ti, (void *)arg, sizeof( ti ) );
+ copy_from_user( &ti, (void *)arg, sizeof( ti ) );
if( ti.cdti_trk0 < sjcd_first_track_no ) return( -EINVAL );
if( ti.cdti_trk1 > sjcd_last_track_no )
@@ -754,7 +754,7 @@
sjcd_audio_status = CDROM_AUDIO_NO_STATUS;
}
- memcpy_fromfs( &sjcd_msf, (void *)arg, sizeof( sjcd_msf ) );
+ copy_from_user( &sjcd_msf, (void *)arg, sizeof( sjcd_msf ) );
sjcd_playing.start.min = bin2bcd( sjcd_msf.cdmsf_min0 );
sjcd_playing.start.sec = bin2bcd( sjcd_msf.cdmsf_sec0 );
@@ -779,7 +779,7 @@
if( ( s = verify_area( VERIFY_WRITE, (void *)arg, sizeof( toc_header ) ) ) == 0 ){
toc_header.cdth_trk0 = sjcd_first_track_no;
toc_header.cdth_trk1 = sjcd_last_track_no;
- memcpy_tofs( (void *)arg, &toc_header, sizeof( toc_header ) );
+ copy_to_user( (void *)arg, &toc_header, sizeof( toc_header ) );
}
return( s );
}
@@ -792,7 +792,7 @@
if( ( s = verify_area( VERIFY_WRITE, (void *)arg, sizeof( toc_entry ) ) ) == 0 ){
struct sjcd_hw_disk_info *tp;
- memcpy_fromfs( &toc_entry, (void *)arg, sizeof( toc_entry ) );
+ copy_from_user( &toc_entry, (void *)arg, sizeof( toc_entry ) );
if( toc_entry.cdte_track == CDROM_LEADOUT )
tp = &sjcd_table_of_contents[ 0 ];
@@ -814,7 +814,7 @@
break;
default: return( -EINVAL );
}
- memcpy_tofs( (void *)arg, &toc_entry, sizeof( toc_entry ) );
+ copy_to_user( (void *)arg, &toc_entry, sizeof( toc_entry ) );
}
return( s );
}
@@ -827,7 +827,7 @@
if( ( s = verify_area( VERIFY_WRITE, (void *)arg, sizeof( subchnl ) ) ) == 0 ){
struct sjcd_hw_qinfo q_info;
- memcpy_fromfs( &subchnl, (void *)arg, sizeof( subchnl ) );
+ copy_from_user( &subchnl, (void *)arg, sizeof( subchnl ) );
if( sjcd_get_q_info( &q_info ) < 0 ) return( -EIO );
subchnl.cdsc_audiostatus = sjcd_audio_status;
@@ -851,7 +851,7 @@
break;
default: return( -EINVAL );
}
- memcpy_tofs( (void *)arg, &subchnl, sizeof( subchnl ) );
+ copy_to_user( (void *)arg, &subchnl, sizeof( subchnl ) );
}
return( s );
}
@@ -864,7 +864,7 @@
if( ( s = verify_area( VERIFY_READ, (void *)arg, sizeof( vol_ctrl ) ) ) == 0 ){
unsigned char dummy[ 4 ];
- memcpy_fromfs( &vol_ctrl, (void *)arg, sizeof( vol_ctrl ) );
+ copy_from_user( &vol_ctrl, (void *)arg, sizeof( vol_ctrl ) );
sjcd_send_4_cmd( SCMD_SET_VOLUME, vol_ctrl.channel0, 0xFF,
vol_ctrl.channel1, 0xFF );
if( sjcd_receive_status() < 0 ) return( -EIO );
@@ -892,7 +892,7 @@
printk( "SJCD: ioctl: statistic\n" );
#endif
if( ( s = verify_area( VERIFY_WRITE, (void *)arg, sizeof( statistic ) ) ) == 0 )
- memcpy_tofs( (void *)arg, &statistic, sizeof( statistic ) );
+ copy_to_user( (void *)arg, &statistic, sizeof( statistic ) );
return( s );
}
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov