diff options
Diffstat (limited to 'drivers/block/pktcdvd.c')
-rw-r--r-- | drivers/block/pktcdvd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index eb83197cc36c..bc9b2bcd7dba 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c | |||
@@ -1597,7 +1597,7 @@ static int pkt_probe_settings(struct pktcdvd_device *pd) | |||
1597 | } | 1597 | } |
1598 | 1598 | ||
1599 | if (!pkt_writable_disc(pd, &di)) | 1599 | if (!pkt_writable_disc(pd, &di)) |
1600 | return -ENXIO; | 1600 | return -EROFS; |
1601 | 1601 | ||
1602 | pd->type = di.erasable ? PACKET_CDRW : PACKET_CDR; | 1602 | pd->type = di.erasable ? PACKET_CDRW : PACKET_CDR; |
1603 | 1603 | ||
@@ -1609,7 +1609,7 @@ static int pkt_probe_settings(struct pktcdvd_device *pd) | |||
1609 | 1609 | ||
1610 | if (!pkt_writable_track(pd, &ti)) { | 1610 | if (!pkt_writable_track(pd, &ti)) { |
1611 | printk("pktcdvd: can't write to this track\n"); | 1611 | printk("pktcdvd: can't write to this track\n"); |
1612 | return -ENXIO; | 1612 | return -EROFS; |
1613 | } | 1613 | } |
1614 | 1614 | ||
1615 | /* | 1615 | /* |
@@ -1623,7 +1623,7 @@ static int pkt_probe_settings(struct pktcdvd_device *pd) | |||
1623 | } | 1623 | } |
1624 | if (pd->settings.size > PACKET_MAX_SECTORS) { | 1624 | if (pd->settings.size > PACKET_MAX_SECTORS) { |
1625 | printk("pktcdvd: packet size is too big\n"); | 1625 | printk("pktcdvd: packet size is too big\n"); |
1626 | return -ENXIO; | 1626 | return -EROFS; |
1627 | } | 1627 | } |
1628 | pd->settings.fp = ti.fp; | 1628 | pd->settings.fp = ti.fp; |
1629 | pd->offset = (be32_to_cpu(ti.track_start) << 2) & (pd->settings.size - 1); | 1629 | pd->offset = (be32_to_cpu(ti.track_start) << 2) & (pd->settings.size - 1); |
@@ -1665,7 +1665,7 @@ static int pkt_probe_settings(struct pktcdvd_device *pd) | |||
1665 | break; | 1665 | break; |
1666 | default: | 1666 | default: |
1667 | printk("pktcdvd: unknown data mode\n"); | 1667 | printk("pktcdvd: unknown data mode\n"); |
1668 | return 1; | 1668 | return -EROFS; |
1669 | } | 1669 | } |
1670 | return 0; | 1670 | return 0; |
1671 | } | 1671 | } |
@@ -1876,7 +1876,7 @@ static int pkt_open_write(struct pktcdvd_device *pd) | |||
1876 | 1876 | ||
1877 | if ((ret = pkt_probe_settings(pd))) { | 1877 | if ((ret = pkt_probe_settings(pd))) { |
1878 | VPRINTK("pktcdvd: %s failed probe\n", pd->name); | 1878 | VPRINTK("pktcdvd: %s failed probe\n", pd->name); |
1879 | return -EROFS; | 1879 | return ret; |
1880 | } | 1880 | } |
1881 | 1881 | ||
1882 | if ((ret = pkt_set_write_settings(pd))) { | 1882 | if ((ret = pkt_set_write_settings(pd))) { |