📄 blank.c.htm
字号:
<?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"><head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <meta name="generator" content="OpenGrok v0.6beta (5cad370c5aab)"/> <link rel="icon" href="/source/default/img/icon.png" type="image/png"/> <link rel="stylesheet" type="text/css" href="/source/default/style.css"/> <link rel="stylesheet" type="text/css" href="/source/default/print.css" media="print" /> <link rel="alternate stylesheet" type="text/css" media="all" title="Paper White" href="/source/default/print.css"/> <title>Cross Reference: /onnv/onnv-gate/usr/src/cmd/cdrw/blank.c</title><script type="text/javascript"><!--function toggle_annotations() { var spans = document.getElementsByTagName("span"); for (var i = 0; i < spans.length; i++) { var span = spans[i]; if (span.className == 'blame') { span.className = 'blame-hidden'; } else if (span.className == 'blame-hidden') { span.className = 'blame'; } }}// --></script><style type="text/css"> div#Iconbar a { font-size: 11px; color: #444; text-decoration: none; background-position: 50% 0%; background-repeat: no-repeat; display: block; float: left; margin: 0 0.6em; padding-top: 34px;}div#Iconbar a#DiscussionsIcon { background-image: url(http://www.opensolaris.org/images/discussions.gif);}div#Iconbar a#CommunitiesIcon { background-image: url(http://www.opensolaris.org/images/communities.gif);}div#Iconbar a#ProjectsIcon { background-image: url(http://www.opensolaris.org/images/projects.gif);}div#Iconbar a#DownloadIcon { background-image: url(http://www.opensolaris.org/images/download.gif);}div#Iconbar a#SourceBrowserIcon { background-image: url(http://www.opensolaris.org/images/srcbrowse.gif);}</style></head><body><div id="page"><form action="/source/search"> <div id="header"><div id="MastheadLogo"><a id="MastheadLogo" href="http://www.opensolaris.org"></a></div> <div id="pagetitle"><b id="filename">Cross Reference: blank.c</b><br/></div> </div><div id="Masthead"><tt><a href="/source/xref/">xref</a>: /<a href="/source/xref/onnv/">onnv</a>/<a href="/source/xref/onnv/onnv-gate/">onnv-gate</a>/<a href="/source/xref/onnv/onnv-gate/usr/">usr</a>/<a href="/source/xref/onnv/onnv-gate/usr/src/">src</a>/<a href="/source/xref/onnv/onnv-gate/usr/src/cmd/">cmd</a>/<a href="/source/xref/onnv/onnv-gate/usr/src/cmd/cdrw/">cdrw</a>/<a href="/source/xref/onnv/onnv-gate/usr/src/cmd/cdrw/blank.c">blank.c</a></tt></div> <div id="bar"><a href="/source" id="home">Home</a> | <a id="history" href="/source/history/onnv/onnv-gate/usr/src/cmd/cdrw/blank.c">History</a> | <a href="/source/xref/onnv/onnv-gate/usr/src/cmd/cdrw/blank.c?a=true">Annotate</a> | <a id="download" href="/source/raw/onnv/onnv-gate/usr/src/cmd/cdrw/blank.c">Download</a> | <input id="search" name="q" class="q"/><input type="submit" value="Search" class="submit"/><input type="checkbox" name="path" value="/onnv/onnv-gate/usr/src/cmd/cdrw"/> only in <b>cdrw</b></div></form><div id="src"><pre><a class="l" name="1"> 1 </a><span class="c">/*<a class="l" name="2"> 2 </a> * CDDL HEADER START<a class="l" name="3"> 3 </a> *<a class="l" name="4"> 4 </a> * The contents of this file are subject to the terms of the<a class="l" name="5"> 5 </a> * Common Development and Distribution License, Version 1.0 only<a class="l" name="6"> 6 </a> * (the "License"). You may not use this file except in compliance<a class="l" name="7"> 7 </a> * with the License.<a class="l" name="8"> 8 </a> *<a class="l" name="9"> 9 </a> * You can obtain a copy of the license at <a href="/source/s?path=usr/">usr</a>/<a href="/source/s?path=usr/src/">src</a>/<a href="/source/s?path=usr/src/OPENSOLARIS.LICENSE">OPENSOLARIS.LICENSE</a><a class="hl" name="10"> 10 </a> * or <a href="http://www.opensolaris.org/os/licensing">http://www.opensolaris.org/os/licensing</a>.<a class="l" name="11"> 11 </a> * See the License for the specific language governing permissions<a class="l" name="12"> 12 </a> * and limitations under the License.<a class="l" name="13"> 13 </a> *<a class="l" name="14"> 14 </a> * When distributing Covered Code, include this CDDL HEADER in each<a class="l" name="15"> 15 </a> * file and include the License file at <a href="/source/s?path=usr/">usr</a>/<a href="/source/s?path=usr/src/">src</a>/<a href="/source/s?path=usr/src/OPENSOLARIS.LICENSE">OPENSOLARIS.LICENSE</a>.<a class="l" name="16"> 16 </a> * If applicable, add the following below this CDDL HEADER, with the<a class="l" name="17"> 17 </a> * fields enclosed by brackets "[]" replaced with your own identifying<a class="l" name="18"> 18 </a> * information: Portions Copyright [yyyy] [name of copyright owner]<a class="l" name="19"> 19 </a> *<a class="hl" name="20"> 20 </a> * CDDL HEADER END<a class="l" name="21"> 21 </a> */</span><a class="l" name="22"> 22 </a><span class="c">/*<a class="l" name="23"> 23 </a> * Copyright 2005 Sun Microsystems, Inc. All rights reserved.<a class="l" name="24"> 24 </a> * Use is subject to license terms.<a class="l" name="25"> 25 </a> */</span><a class="l" name="26"> 26 </a><a class="l" name="27"> 27 </a>#<b>pragma</b> <b>ident</b> <span class="s">"%Z%%M% %I% %E% SMI"</span><a class="l" name="28"> 28 </a><a class="l" name="29"> 29 </a>#<b>include</b> <<a href="/source/s?path=sys/types.h">sys/types.h</a>><a class="hl" name="30"> 30 </a>#<b>include</b> <<a href="/source/s?path=stdlib.h">stdlib.h</a>><a class="l" name="31"> 31 </a>#<b>include</b> <<a href="/source/s?path=string.h">string.h</a>><a class="l" name="32"> 32 </a>#<b>include</b> <<a href="/source/s?path=libintl.h">libintl.h</a>><a class="l" name="33"> 33 </a>#<b>include</b> <<a href="/source/s?path=unistd.h">unistd.h</a>><a class="l" name="34"> 34 </a><a class="l" name="35"> 35 </a>#<b>include</b> <span class="s">"<a href="/source/s?path=msgs.h">msgs.h</a>"</span><a class="l" name="36"> 36 </a>#<b>include</b> <span class="s">"<a href="/source/s?path=mmc.h">mmc.h</a>"</span><a class="l" name="37"> 37 </a>#<b>include</b> <span class="s">"<a href="/source/s?path=util.h">util.h</a>"</span><a class="l" name="38"> 38 </a>#<b>include</b> <span class="s">"<a href="/source/s?path=transport.h">transport.h</a>"</span><a class="l" name="39"> 39 </a>#<b>include</b> <span class="s">"<a href="/source/s?path=main.h">main.h</a>"</span><a class="hl" name="40"> 40 </a>#<b>include</b> <span class="s">"<a href="/source/s?path=misc_scsi.h">misc_scsi.h</a>"</span><a class="l" name="41"> 41 </a><a class="l" name="42"> 42 </a><span class="c">/*<a class="l" name="43"> 43 </a> * This is called recursively once, if an ALL blank succeeds but the<a class="l" name="44"> 44 </a> * media is not blank we call blank() again to perform a fast blank.<a class="l" name="45"> 45 </a> * This is a workaround for some drives such as older Toshiba DVD-RW<a class="l" name="46"> 46 </a> * which has this problem with ALL blanking.<a class="l" name="47"> 47 </a> */</span><a class="l" name="48"> 48 </a><b>void</b><a class="l" name="49"> 49 </a><a href="/source/s?defs=blank">blank</a>(<b>void</b>)<a class="hl" name="50"> 50 </a>{<a class="l" name="51"> 51 </a> <b>int</b> <a href="/source/s?defs=type">type</a>, <a href="/source/s?defs=invalid">invalid</a>;<a class="l" name="52"> 52 </a> <b>int</b> <a href="/source/s?defs=count">count</a>, <a href="/source/s?defs=ret">ret</a>;<a class="l" name="53"> 53 </a> <a href="/source/s?defs=uchar_t">uchar_t</a> *<a href="/source/s?defs=di">di</a>, *<a href="/source/s?defs=buf">buf</a>;<a class="l" name="54"> 54 </a> <b>int</b> <a href="/source/s?defs=immediate">immediate</a>, <a href="/source/s?defs=err">err</a>;<a class="l" name="55"> 55 </a> <b>int</b> <a href="/source/s?defs=silent_pass">silent_pass</a> = <span class="n">0</span>;<a class="l" name="56"> 56 </a> <span class="c">/*
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -