drivers/cdrom/cdrom.c fix incorrect test
PATCH 1/1 drivers/cdrom/cdrom.c fix incorrect test
In cleanup-cdrom_ioctl.patch,
the test in CDROMREADTOCENTRY ioctl was changed from
if (!((requested_format == CDROM_MSF) || (requested_format == CDROM_LBA)))
return -EINVAL;
to
if (requested_format != CDROM_MSF || requested_format != CDROM_LBA)
return -EINVAL;
which is not equivalent with morgan's law.
drivers/cdrom/cdrom.c renamed from linux/drivers/cdrom/cdrom.c +1 -1
@@ -2585,7 +2585,7 @@ static int cdrom_ioctl_read_tocentry(strreturn -EFAULT ; requested_format = entry.cdte_format; -if (requested_format !=CDROM_MSF || requested_format !=CDROM_LBA ) +if (requested_format !=CDROM_MSF && requested_format !=CDROM_LBA )return -EINVAL ;/* make interface to low-level uniform */ entry.cdte_format =CDROM_MSF ;
Quoted 5 lines · Benoit Boissinot
In cleanup-cdrom_ioctl.patch,
the test in CDROMREADTOCENTRY ioctl was changed from
if (!((requested_format ==
CDROM_MSF) || (requested_format==CDROM_LBA)))
Quoted 9 lines
return -EINVAL;to
if (
requested_format!=CDROM_MSF||requested_format!=CDROM_LBA)return -EINVAL;which is not equivalent with morgan's law.
sorry, it doesn't apply with -p1 correct patch below:
In cleanup-cdrom_ioctl.patch,
the test in CDROMREADTOCENTRY ioctl was changed from
if (!((requested_format == CDROM_MSF) || (requested_format == CDROM_LBA)))
return -EINVAL;
to
if (requested_format != CDROM_MSF || requested_format != CDROM_LBA)
return -EINVAL;
which is not equivalent with morgan's law.
drivers/cdrom/cdrom.c +1 -1
@@ -2585,7 +2585,7 @@ static int cdrom_ioctl_read_tocentry(strreturn -EFAULT ; requested_format = entry.cdte_format; -if (requested_format !=CDROM_MSF || requested_format !=CDROM_LBA ) +if (requested_format !=CDROM_MSF && requested_format !=CDROM_LBA )return -EINVAL ;/* make interface to low-level uniform */ entry.cdte_format =CDROM_MSF ;
Quoted 36 lines · Benoit Boissinot
Quoted 5 lines · Benoit Boissinot
In cleanup-cdrom_ioctl.patch,
the test in CDROMREADTOCENTRY ioctl was changed from
if (!((requested_format ==
CDROM_MSF) || (requested_format==CDROM_LBA)))Quoted 9 lines
return -EINVAL;to
if (
requested_format!=CDROM_MSF||requested_format!=CDROM_LBA)return -EINVAL;which is not equivalent with morgan's law.
sorry, it doesn't apply with -p1 correct patch below:
In cleanup-cdrom_ioctl.patch,
the test in CDROMREADTOCENTRY ioctl was changed fromif (!((requested_format ==
CDROM_MSF) || (requested_format==CDROM_LBA)))return -EINVAL;to
if (
requested_format!=CDROM_MSF||requested_format!=CDROM_LBA)return -EINVAL;which is not equivalent with morgan's law.
Signed-off-by Benoit Boissinot <[email protected]>diff -Naurp -X
Documentation/dontdiff../linux/drivers/cdrom/cdrom.cdrivers/cdrom/cdrom.c
drivers/cdrom/cdrom.c static int cdrom_ioctl_read_tocentry(str · line 2591
Quoted 8 lines
drivers/cdrom/cdrom.c +1
-1@@ -2585,7 +2585,7 @@ static int cdrom_ioctl_read_tocentry(strreturn -EFAULT ; requested_format = entry.cdte_format; -if (requested_format !=CDROM_MSF || requested_format !=CDROM_LBA ) +if (requested_format !=CDROM_MSF && requested_format !=CDROM_LBA )return -EINVAL ;/* make interface to low-level uniform */ entry.cdte_format =CDROM_MSF ;
Good catch, thanks!
Signature · 1 line
Jens Axboe