Revision 5fafdf24 hw/cdrom.c

b/hw/cdrom.c
1 1
/*
2 2
 * QEMU ATAPI CD-ROM Emulator
3
 * 
3
 *
4 4
 * Copyright (c) 2006 Fabrice Bellard
5
 * 
5
 *
6 6
 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 7
 * of this software and associated documentation files (the "Software"), to deal
8 8
 * in the Software without restriction, including without limitation the rights
......
41 41
{
42 42
    uint8_t *q;
43 43
    int len;
44
    
44
   
45 45
    if (start_track > 1 && start_track != 0xaa)
46 46
        return -1;
47 47
    q = buf + 2;
......
85 85
{
86 86
    uint8_t *q;
87 87
    int len;
88
    
88
   
89 89
    q = buf + 2;
90 90
    *q++ = 1; /* first session */
91 91
    *q++ = 1; /* last session */
......
101 101
    *q++ = 1; /* first track */
102 102
    *q++ = 0x00; /* disk type */
103 103
    *q++ = 0x00;
104
    
104
   
105 105
    *q++ = 1; /* session number */
106 106
    *q++ = 0x14; /* data track */
107 107
    *q++ = 0; /* track number */
......
113 113
    *q++ = 1; /* last track */
114 114
    *q++ = 0x00;
115 115
    *q++ = 0x00;
116
    
116
   
117 117
    *q++ = 1; /* session number */
118 118
    *q++ = 0x14; /* data track */
119 119
    *q++ = 0; /* track number */
......
138 138
    *q++ = 0; /* sec */
139 139
    *q++ = 0; /* frame */
140 140
    if (msf) {
141
        *q++ = 0; 
141
        *q++ = 0;
142 142
        lba_to_msf(q, 0);
143 143
        q += 3;
144 144
    } else {
145
        *q++ = 0; 
146
        *q++ = 0; 
147
        *q++ = 0; 
148
        *q++ = 0; 
145
        *q++ = 0;
146
        *q++ = 0;
147
        *q++ = 0;
148
        *q++ = 0;
149 149
    }
150 150

  
151 151
    len = q - buf;

Also available in: Unified diff