Opened 16 years ago
#1453 new defect
libdvdread: conversion from disk to raw disk names incorrect
Reported by: | Owned by: | reimar | |
---|---|---|---|
Priority: | normal | Component: | core |
Version: | HEAD | Severity: | normal |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Reproduced by developer: | no | Analyzed by developer: | no |
Description
On darwin and other bsd based systems, dvd_reader.c converts regular device
names to raw device names. e.g. "/dev/disk4" -> "/dev/rdisk4"
The test that determines if the conversion needs to be done is broken.
It was previously correct in libdvdread version 0.9.7. Looks like someone
"fixed" a "bug" without testing.
The following patch fixes it.
diff -Naur libdvdread.orig/src/dvd_reader.c libdvdread/src/dvd_reader.c
--- libdvdread.orig/src/dvd_reader.c 2009-03-13 21:28:21.000000000 -0400
+++ libdvdread/src/dvd_reader.c 2009-04-24 01:35:43.000000000 -0400
@@ -314,7 +314,7 @@
char *new_path;
/* If it doesn't start with "/dev/" or does start with "/dev/r" exit */
strncmp( path, "/dev/r", 6 ) ) |
!strncmp( path, "/dev/r", 6 ) ) |
return (char *) strdup( path );
/* Replace "/dev/" with "/dev/r" */