Imported Upstream version 1.1.11
[platform/upstream/cdrkit.git] / wodim / scsi_cdr_mmc4.c
1 /*
2  * This file has been modified for the cdrkit suite.
3  *
4  * The behaviour and appearence of the program code below can differ to a major
5  * extent from the version distributed by the original author(s).
6  *
7  * For details, see Changelog file distributed with the cdrkit package. If you
8  * received this file from another source then ask the distributing person for
9  * a log of modifications.
10  *
11  */
12
13 /* @(#)scsi_cdr_mmc4.c  1.1 05/05/16 Copyright 1995-2005 J. Schilling */
14 /*
15  *      SCSI command functions for cdrecord
16  *      covering MMC-4
17  *
18  *      Copyright (c) 1995-2005 J. Schilling
19  */
20 /*
21  * This program is free software; you can redistribute it and/or modify
22  * it under the terms of the GNU General Public License version 2
23  * as published by the Free Software Foundation.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28  * GNU General Public License for more details.
29  *
30  * You should have received a copy of the GNU General Public License along with
31  * this program; see the file COPYING.  If not, write to the Free Software
32  * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
33  */
34
35 #include <mconfig.h>
36
37 #include <stdio.h>
38 #include <standard.h>
39 #include <stdxlib.h>
40 #include <unixstd.h>
41 #include <fctldefs.h>
42 #include <errno.h>
43 #include <strdefs.h>
44 #include <timedefs.h>
45
46 #include <utypes.h>
47 #include <btorder.h>
48 #include <intcvt.h>
49 #include <schily.h>
50
51 #include <usal/usalcmd.h>
52 #include <usal/scsidefs.h>
53 #include <usal/scsireg.h>
54 #include <usal/scsitransp.h>
55
56 #include "scsimmc.h"
57 #include "wodim.h"
58
59 void    print_capabilities_mmc4(SCSI *usalp);
60
61 #define DOES(what, flag)        printf("  Does %s%s\n", flag?"":"not ", what)
62
63
64 void
65 print_capabilities_mmc4(SCSI *usalp)
66 {
67         int     cdrw_types;
68
69         if (usalp->inq->type != INQ_ROMD)
70                 return;
71
72         cdrw_types = get_supported_cdrw_media_types(usalp);
73         if (cdrw_types != -1) {
74                 printf("\nSupported CD-RW media types according to MMC-4 feature 0x37:\n");
75                 DOES("write multi speed       CD-RW media", (cdrw_types & CDR_CDRW_MULTI));
76                 DOES("write high  speed       CD-RW media", (cdrw_types & CDR_CDRW_HIGH));
77                 DOES("write ultra high speed  CD-RW media", (cdrw_types & CDR_CDRW_ULTRA));
78                 DOES("write ultra high speed+ CD-RW media", (cdrw_types & CDR_CDRW_ULTRAP));
79         }
80 }