[Debburn-changes] r599 - in cdrkit/trunk: . wodim
Eduard Bloch
blade at alioth.debian.org
Fri Dec 8 16:56:49 CET 2006
Author: blade
Date: 2006-12-08 16:56:49 +0100 (Fri, 08 Dec 2006)
New Revision: 599
Modified:
cdrkit/trunk/Changelog
cdrkit/trunk/wodim/scsi_mmc.c
cdrkit/trunk/wodim/wodim.h
Log:
+ * clear profile names printing (using code from libburnia)
+ * cleanup with unused embedded CVS revision strings from Schilling and
+ more gcc -Wall correctness
Modified: cdrkit/trunk/Changelog
===================================================================
--- cdrkit/trunk/Changelog 2006-12-08 15:29:05 UTC (rev 598)
+++ cdrkit/trunk/Changelog 2006-12-08 15:56:49 UTC (rev 599)
@@ -6,7 +6,10 @@
* more verbose abort message if track is specified with some maintainance
command (#369677)
* Added more DVD related fixes from SuSE's wodim-1.0pre5cvs-6.src.rpm
- * --devices option for wodim
+ * --devices option for wodim (modeled after cdrskin's output)
+ * clear profile names printing (using code from libburnia)
+ * cleanup with unused embedded CVS revision strings from Schilling and
+ more gcc -Wall correctness
[ Thomas Schmidt ]
* workaround for older libmagic API
Modified: cdrkit/trunk/wodim/scsi_mmc.c
===================================================================
--- cdrkit/trunk/wodim/scsi_mmc.c 2006-12-08 15:29:05 UTC (rev 598)
+++ cdrkit/trunk/wodim/scsi_mmc.c 2006-12-08 15:56:49 UTC (rev 599)
@@ -32,6 +32,10 @@
* Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+/*
+Includes code from http://libburnia.pykix.org/browser/libburn/trunk/libburn/mmc.c?format=txt
+*/
+
/*#define DEBUG*/
#include <mconfig.h>
@@ -157,8 +161,8 @@
usal_prbytes("Features: ", cbuf, amt);
if (xdebug > 0)
- printf("feature len: %d current profile 0x%04X len %d\n",
- flen, profile, amt);
+ printf("feature len: %d current profile 0x%04X (%s) len %d\n",
+ flen, profile, mmc_obtain_profile_name(profile), amt);
return (profile);
}
@@ -212,8 +216,8 @@
curprofile = a_to_u_2_byte(&p[6]);
if (xdebug > 0)
- printf("feature len: %d current profile 0x%04X\n",
- flen, curprofile);
+ printf("feature len: %d current profile 0x%04X (%s)\n",
+ flen, curprofile, mmc_obtain_profile_name(curprofile));
printf("Current: 0x%04X\n", curprofile);
@@ -225,10 +229,10 @@
for (i = 0; i < n; i++) {
profile = a_to_u_2_byte(p);
if (xdebug > 0)
- printf("Profile: 0x%04X ", profile);
+ printf("Profile: 0x%04X (%s)", profile, mmc_obtain_profile_name(profile));
else
printf("Profile: ");
- printf("0x%04X %s\n", profile, p[2] & 1 ? "(current)":"");
+ printf("0x%04X (%s) %s\n", profile, mmc_obtain_profile_name(profile), p[2] & 1 ? "(current)":"");
p += 4;
}
return (curprofile);
@@ -261,8 +265,8 @@
curprofile = a_to_u_2_byte(&p[6]);
if (xdebug > 0)
- printf("feature len: %d current profile 0x%04X\n",
- flen, curprofile);
+ printf("feature len: %d current profile 0x%04X (%s)\n",
+ flen, curprofile, mmc_obtain_profile_name(curprofile));
p += 8; /* Skip feature header */
n = p[3]; /* Additional length */
@@ -356,3 +360,45 @@
return (curprofile);
}
+
+/* ts A61201 */
+char *mmc_obtain_profile_name(int profile_number) {
+ static char *texts[0x53] = {NULL};
+ int i, max_pno = 0x53;
+
+ if (texts[0] == NULL) {
+ for (i = 0; i<max_pno; i++)
+ texts[i] = "";
+ /* mmc5r03c.pdf , Table 89, Spelling: guessed cdrecord style */
+ texts[0x01] = "Non-removable disk";
+ texts[0x02] = "Removable disk";
+ texts[0x03] = "MO erasable";
+ texts[0x04] = "Optical write once";
+ texts[0x05] = "AS-MO";
+ texts[0x08] = "CD-ROM";
+ texts[0x09] = "CD-R";
+ texts[0x0a] = "CD-RW";
+ texts[0x10] = "DVD-ROM";
+ texts[0x11] = "DVD-R sequential recording";
+ texts[0x12] = "DVD-RAM";
+ texts[0x13] = "DVD-RW restricted overwrite";
+ texts[0x14] = "DVD-RW sequential overwrite";
+ texts[0x15] = "DVD-R/DL sequential recording";
+ texts[0x16] = "DVD-R/DL layer jump recording";
+ texts[0x1a] = "DVD+RW";
+ texts[0x1b] = "DVD+R";
+ texts[0x2a] = "DVD+RW/DL";
+ texts[0x2b] = "DVD+R/DL";
+ texts[0x40] = "BD-ROM";
+ texts[0x41] = "BD-R sequential recording";
+ texts[0x42] = "BD-R random recording";
+ texts[0x43] = "BD-RE";
+ texts[0x50] = "HD-DVD-ROM";
+ texts[0x51] = "HD-DVD-R";
+ texts[0x52] = "HD-DVD-RAM";
+ }
+ if (profile_number<0 || profile_number>=max_pno)
+ return "";
+ return texts[profile_number];
+}
+
Modified: cdrkit/trunk/wodim/wodim.h
===================================================================
--- cdrkit/trunk/wodim/wodim.h 2006-12-08 15:29:05 UTC (rev 598)
+++ cdrkit/trunk/wodim/wodim.h 2006-12-08 15:56:49 UTC (rev 599)
@@ -1068,6 +1068,7 @@
BOOL *dvdplusp, BOOL *ddcdp);
extern int get_wproflist(SCSI *usalp, BOOL *cdp, BOOL *dvdp,
BOOL *dvdplusp, BOOL *ddcdp);
+extern char *mmc_obtain_profile_name(int profile_number);
#endif
/*
More information about the Debburn-changes
mailing list