/[debburn]/cdrkit/trunk/wodim/scsi_mmc4.c
ViewVC logotype

Contents of /cdrkit/trunk/wodim/scsi_mmc4.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 430 - (show annotations) (download)
Thu Nov 23 18:57:28 2006 UTC (6 years, 5 months ago) by blade
File MIME type: text/plain
File size: 2294 byte(s)
Crash and burn, big renaming action, part I
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_mmc4.c 1.1 05/05/16 Copyright 2002-2005 J. Schilling */
14 #ifndef lint
15 static char sccsid[] =
16 "@(#)scsi_mmc4.c 1.1 05/05/16 Copyright 2002-2005 J. Schilling";
17 #endif
18 /*
19 * SCSI command functions for cdrecord
20 * covering MMC-4 level and above
21 *
22 * Copyright (c) 2002-2005 J. Schilling
23 */
24 /*
25 * This program is free software; you can redistribute it and/or modify
26 * it under the terms of the GNU General Public License version 2
27 * as published by the Free Software Foundation.
28 *
29 * This program is distributed in the hope that it will be useful,
30 * but WITHOUT ANY WARRANTY; without even the implied warranty of
31 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 * GNU General Public License for more details.
33 *
34 * You should have received a copy of the GNU General Public License along with
35 * this program; see the file COPYING. If not, write to the Free Software
36 * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
37 */
38
39 /* #define DEBUG */
40 #include <mconfig.h>
41
42 #include <stdio.h>
43 #include <standard.h>
44 #include <stdxlib.h>
45 #include <unixstd.h>
46 #include <fctldefs.h>
47 #include <errno.h>
48 #include <strdefs.h>
49 #include <timedefs.h>
50
51 #include <utypes.h>
52 #include <btorder.h>
53 #include <intcvt.h>
54 #include <schily.h>
55
56 #include <usal/usalcmd.h>
57 #include <usal/scsidefs.h>
58 #include <usal/scsireg.h>
59 #include <usal/scsitransp.h>
60
61 #include "scsimmc.h"
62 #include "wodim.h"
63
64 int get_supported_cdrw_media_types(SCSI *usalp);
65
66 /*
67 * Retrieve list of supported cd-rw media types (feature 0x37)
68 */
69 int
70 get_supported_cdrw_media_types(SCSI *usalp)
71 {
72 Uchar cbuf[16];
73 int ret;
74 fillbytes(cbuf, sizeof (cbuf), '\0');
75
76 usalp->silent++;
77 ret = get_configuration(usalp, (char *)cbuf, sizeof (cbuf), 0x37, 2);
78 usalp->silent--;
79
80 if (ret < 0)
81 return (-1);
82
83 if (cbuf[3] < 12) /* Couldn't retrieve feature 0x37 */
84 return (-1);
85
86 return (int)(cbuf[13]);
87 }

  ViewVC Help
Powered by ViewVC 1.1.5