diff options
author | Carlos Rafael Giani <dv@pseudoterminal.org> | 2015-09-23 15:56:03 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2015-10-13 12:27:51 +0200 |
commit | 907c3f909972884cc70952ccfebbe3ec5820e2d3 (patch) | |
tree | eda881868ea81dea544bf8e145d43bd483d5aa49 /meta-multimedia/recipes-multimedia | |
parent | 84d89048b0feffec3c280bac4765e1dd1fce97c5 (diff) | |
download | meta-openembedded-907c3f909972884cc70952ccfebbe3ec5820e2d3.tar.gz |
cdparanoia: add new recipe
Signed-off-by: Etienne Cordonnier <etienne.cordonnier@streamunlimited.com>
Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-multimedia/recipes-multimedia')
3 files changed, 701 insertions, 0 deletions
diff --git a/meta-multimedia/recipes-multimedia/cdparanoia/cdparanoia_10.2.bb b/meta-multimedia/recipes-multimedia/cdparanoia/cdparanoia_10.2.bb new file mode 100644 index 000000000..86ba52784 --- /dev/null +++ b/meta-multimedia/recipes-multimedia/cdparanoia/cdparanoia_10.2.bb | |||
@@ -0,0 +1,26 @@ | |||
1 | SUMMARY = "cdparanoia library" | ||
2 | DESCRIPTION = "library used to read audio CDs, which is able to perform \ | ||
3 | error corrections, hence the name paranoia." | ||
4 | HOMEPAGE = "https://www.xiph.org/" | ||
5 | SECTION = "multimedia" | ||
6 | |||
7 | LICENSE = "LGPLv2.1" | ||
8 | LIC_FILES_CHKSUM = "file://COPYING-LGPL;md5=d370feaa1c9edcdbd29ca27ea3d2304d" | ||
9 | |||
10 | SRC_URI = "http://downloads.xiph.org/releases/cdparanoia/cdparanoia-III-${PV}.src.tgz \ | ||
11 | file://0001-Use-DESTDIR-in-install-Makefile-rule.patch \ | ||
12 | file://0002-interface-remove-C-reserved-keyword.patch \ | ||
13 | " | ||
14 | SRC_URI[md5sum] = "b304bbe8ab63373924a744eac9ebc652" | ||
15 | SRC_URI[sha256sum] = "005db45ef4ee017f5c32ec124f913a0546e77014266c6a1c50df902a55fe64df" | ||
16 | |||
17 | # Uppercase letters are not allowed in the recipe name, thus the recipe can not be named cdparanoia-III and | ||
18 | # we need to add the path to the extracted sources explicitely: | ||
19 | S = "${WORKDIR}/cdparanoia-III-${PV}" | ||
20 | |||
21 | # cdparanoia Makefile can not be used with several threads (because the static library target and the shared | ||
22 | # library target use object files which are compiled in the same directory, the object files are just removed | ||
23 | # between the compilation of those two targets) | ||
24 | PARALLEL_MAKE = "" | ||
25 | |||
26 | inherit autotools-brokensep | ||
diff --git a/meta-multimedia/recipes-multimedia/cdparanoia/files/0001-Use-DESTDIR-in-install-Makefile-rule.patch b/meta-multimedia/recipes-multimedia/cdparanoia/files/0001-Use-DESTDIR-in-install-Makefile-rule.patch new file mode 100644 index 000000000..7b0830034 --- /dev/null +++ b/meta-multimedia/recipes-multimedia/cdparanoia/files/0001-Use-DESTDIR-in-install-Makefile-rule.patch | |||
@@ -0,0 +1,70 @@ | |||
1 | From 97c06ae955b270851f4fd2396c715f9c76591f37 Mon Sep 17 00:00:00 2001 | ||
2 | From: Etienne Cordonnier <etienne.cordonnier@streamunlimited.com> | ||
3 | Date: Thu, 2 Apr 2015 10:15:08 +0200 | ||
4 | Subject: [PATCH] Use DESTDIR in "install" Makefile rule | ||
5 | |||
6 | This change allows to perform installations in a sysroot folder, which is required e.g. by | ||
7 | the recipes inheriting yocto autotool class, and is an autotool standard: | ||
8 | make install DESTDIR=~/mysysroot | ||
9 | |||
10 | Upstream-Status: Inappropriate (the upstream project is dead) | ||
11 | |||
12 | Signed-off-by: Etienne Cordonnier <etienne.cordonnier@streamunlimited.com> | ||
13 | --- | ||
14 | Makefile.in | 36 ++++++++++++++++++------------------ | ||
15 | 1 file changed, 18 insertions(+), 18 deletions(-) | ||
16 | |||
17 | diff --git a/Makefile.in b/Makefile.in | ||
18 | index 3d235ad..df544c7 100644 | ||
19 | --- a/Makefile.in | ||
20 | +++ b/Makefile.in | ||
21 | @@ -63,28 +63,28 @@ slib: | ||
22 | cd paranoia && $(MAKE) slib | ||
23 | |||
24 | install: | ||
25 | - $(INSTALL) -d -m 0755 $(BINDIR) | ||
26 | - $(INSTALL) -m 755 $(srcdir)/cdparanoia $(BINDIR) | ||
27 | - $(INSTALL) -d -m 0755 $(MANDIR) | ||
28 | - $(INSTALL) -d -m 0755 $(MANDIR)/man1 | ||
29 | - $(INSTALL) -m 0644 $(srcdir)/cdparanoia.1 $(MANDIR)/man1 | ||
30 | - $(INSTALL) -d -m 0755 $(INCLUDEDIR) | ||
31 | - $(INSTALL) -m 0644 $(srcdir)/paranoia/cdda_paranoia.h $(INCLUDEDIR) | ||
32 | - $(INSTALL) -d -m 0755 $(LIBDIR) | ||
33 | - $(INSTALL) -m 0644 $(srcdir)/paranoia/libcdda_paranoia.so.0.$(VERSION) $(LIBDIR) | ||
34 | - $(INSTALL) -m 0644 $(srcdir)/paranoia/libcdda_paranoia.a $(LIBDIR) | ||
35 | - $(INSTALL) -m 0644 $(srcdir)/interface/cdda_interface.h $(INCLUDEDIR) | ||
36 | - $(INSTALL) -m 0644 $(srcdir)/interface/libcdda_interface.so.0.$(VERSION) $(LIBDIR) | ||
37 | - $(INSTALL) -m 0644 $(srcdir)/interface/libcdda_interface.a $(LIBDIR) | ||
38 | - $(INSTALL) -m 0644 $(srcdir)/utils.h $(INCLUDEDIR) | ||
39 | + $(INSTALL) -d -m 0755 $(DESTDIR)$(BINDIR) | ||
40 | + $(INSTALL) -m 755 $(srcdir)/cdparanoia $(DESTDIR)$(BINDIR) | ||
41 | + $(INSTALL) -d -m 0755 $(DESTDIR)$(MANDIR) | ||
42 | + $(INSTALL) -d -m 0755 $(DESTDIR)$(MANDIR)/man1 | ||
43 | + $(INSTALL) -m 0644 $(srcdir)/cdparanoia.1 $(DESTDIR)$(MANDIR)/man1 | ||
44 | + $(INSTALL) -d -m 0755 $(DESTDIR)$(INCLUDEDIR) | ||
45 | + $(INSTALL) -m 0644 $(srcdir)/paranoia/cdda_paranoia.h $(DESTDIR)$(INCLUDEDIR) | ||
46 | + $(INSTALL) -d -m 0755 $(DESTDIR)$(LIBDIR) | ||
47 | + $(INSTALL) -m 0644 $(srcdir)/paranoia/libcdda_paranoia.so.0.$(VERSION) $(DESTDIR)$(LIBDIR) | ||
48 | + $(INSTALL) -m 0644 $(srcdir)/paranoia/libcdda_paranoia.a $(DESTDIR)$(LIBDIR) | ||
49 | + $(INSTALL) -m 0644 $(srcdir)/interface/cdda_interface.h $(DESTDIR)$(INCLUDEDIR) | ||
50 | + $(INSTALL) -m 0644 $(srcdir)/interface/libcdda_interface.so.0.$(VERSION) $(DESTDIR)$(LIBDIR) | ||
51 | + $(INSTALL) -m 0644 $(srcdir)/interface/libcdda_interface.a $(DESTDIR)$(LIBDIR) | ||
52 | + $(INSTALL) -m 0644 $(srcdir)/utils.h $(DESTDIR)$(INCLUDEDIR) | ||
53 | ln -fs libcdda_interface.so.0.$(VERSION) \ | ||
54 | - $(LIBDIR)/libcdda_interface.so.0 | ||
55 | + $(DESTDIR)$(LIBDIR)/libcdda_interface.so.0 | ||
56 | ln -fs libcdda_interface.so.0.$(VERSION) \ | ||
57 | - $(LIBDIR)/libcdda_interface.so | ||
58 | + $(DESTDIR)$(LIBDIR)/libcdda_interface.so | ||
59 | ln -fs libcdda_paranoia.so.0.$(VERSION) \ | ||
60 | - $(LIBDIR)/libcdda_paranoia.so.0 | ||
61 | + $(DESTDIR)$(LIBDIR)/libcdda_paranoia.so.0 | ||
62 | ln -fs libcdda_paranoia.so.0.$(VERSION) \ | ||
63 | - $(LIBDIR)/libcdda_paranoia.so | ||
64 | + $(DESTDIR)$(LIBDIR)/libcdda_paranoia.so | ||
65 | |||
66 | cdparanoia: $(OFILES) $(LIBDEP) | ||
67 | $(LD) $(CFLAGS) $(LDFLAGS) $(OFILES) \ | ||
68 | -- | ||
69 | 1.9.1 | ||
70 | |||
diff --git a/meta-multimedia/recipes-multimedia/cdparanoia/files/0002-interface-remove-C-reserved-keyword.patch b/meta-multimedia/recipes-multimedia/cdparanoia/files/0002-interface-remove-C-reserved-keyword.patch new file mode 100644 index 000000000..a5600a1c3 --- /dev/null +++ b/meta-multimedia/recipes-multimedia/cdparanoia/files/0002-interface-remove-C-reserved-keyword.patch | |||
@@ -0,0 +1,605 @@ | |||
1 | From 12ea28398f8e5d4a4a23c62d511fc4f53584e51d Mon Sep 17 00:00:00 2001 | ||
2 | From: Etienne Cordonnier <etienne.cordonnier@streamunlimited.com> | ||
3 | Date: Tue, 7 Apr 2015 11:07:56 +0200 | ||
4 | Subject: [PATCH] interface: remove C++ reserved keyword | ||
5 | |||
6 | Because "private" was used in cdda_interface.h, this header file could not be | ||
7 | compiled in C++. | ||
8 | |||
9 | Upstream-Status: Inappropriate (the upstream project is dead) | ||
10 | |||
11 | Signed-off-by: Etienne Cordonnier <etienne.cordonnier@streamunlimited.com> | ||
12 | --- | ||
13 | interface/cdda_interface.h | 2 +- | ||
14 | interface/cooked_interface.c | 8 +-- | ||
15 | interface/interface.c | 8 +-- | ||
16 | interface/scan_devices.c | 22 ++++---- | ||
17 | interface/scsi_interface.c | 128 +++++++++++++++++++++---------------------- | ||
18 | interface/test_interface.c | 4 +- | ||
19 | 6 files changed, 86 insertions(+), 86 deletions(-) | ||
20 | |||
21 | diff --git a/interface/cdda_interface.h b/interface/cdda_interface.h | ||
22 | index 8487cb7..b738825 100644 | ||
23 | --- a/interface/cdda_interface.h | ||
24 | +++ b/interface/cdda_interface.h | ||
25 | @@ -84,7 +84,7 @@ typedef struct cdrom_drive{ | ||
26 | int is_atapi; | ||
27 | int is_mmc; | ||
28 | |||
29 | - cdda_private_data_t *private; | ||
30 | + cdda_private_data_t *priv; /* private is a C++ reserved keyword */ | ||
31 | void *reserved; | ||
32 | unsigned char inqbytes[4]; | ||
33 | |||
34 | diff --git a/interface/cooked_interface.c b/interface/cooked_interface.c | ||
35 | index de29055..ea9d0fc 100644 | ||
36 | --- a/interface/cooked_interface.c | ||
37 | +++ b/interface/cooked_interface.c | ||
38 | @@ -13,13 +13,13 @@ | ||
39 | static int timed_ioctl(cdrom_drive *d, int fd, int command, void *arg){ | ||
40 | struct timespec tv1; | ||
41 | struct timespec tv2; | ||
42 | - int ret1=clock_gettime(d->private->clock,&tv1); | ||
43 | + int ret1=clock_gettime(d->priv->clock,&tv1); | ||
44 | int ret2=ioctl(fd, command,arg); | ||
45 | - int ret3=clock_gettime(d->private->clock,&tv2); | ||
46 | + int ret3=clock_gettime(d->priv->clock,&tv2); | ||
47 | if(ret1<0 || ret3<0){ | ||
48 | - d->private->last_milliseconds=-1; | ||
49 | + d->priv->last_milliseconds=-1; | ||
50 | }else{ | ||
51 | - d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.; | ||
52 | + d->priv->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.; | ||
53 | } | ||
54 | return ret2; | ||
55 | } | ||
56 | diff --git a/interface/interface.c b/interface/interface.c | ||
57 | index e8a90cd..526c2a9 100644 | ||
58 | --- a/interface/interface.c | ||
59 | +++ b/interface/interface.c | ||
60 | @@ -39,9 +39,9 @@ int cdda_close(cdrom_drive *d){ | ||
61 | if(d->drive_model)free(d->drive_model); | ||
62 | if(d->cdda_fd!=-1)close(d->cdda_fd); | ||
63 | if(d->ioctl_fd!=-1 && d->ioctl_fd!=d->cdda_fd)close(d->ioctl_fd); | ||
64 | - if(d->private){ | ||
65 | - if(d->private->sg_hd)free(d->private->sg_hd); | ||
66 | - free(d->private); | ||
67 | + if(d->priv){ | ||
68 | + if(d->priv->sg_hd)free(d->priv->sg_hd); | ||
69 | + free(d->priv); | ||
70 | } | ||
71 | |||
72 | free(d); | ||
73 | @@ -127,7 +127,7 @@ long cdda_read_timed(cdrom_drive *d, void *buffer, long beginsector, long sector | ||
74 | } | ||
75 | } | ||
76 | } | ||
77 | - if(ms)*ms=d->private->last_milliseconds; | ||
78 | + if(ms)*ms=d->priv->last_milliseconds; | ||
79 | return(sectors); | ||
80 | } | ||
81 | |||
82 | diff --git a/interface/scan_devices.c b/interface/scan_devices.c | ||
83 | index fc58110..5f6c4e3 100644 | ||
84 | --- a/interface/scan_devices.c | ||
85 | +++ b/interface/scan_devices.c | ||
86 | @@ -264,11 +264,11 @@ cdrom_drive *cdda_identify_cooked(const char *dev, int messagedest, | ||
87 | d->interface=COOKED_IOCTL; | ||
88 | d->bigendianp=-1; /* We don't know yet... */ | ||
89 | d->nsectors=-1; | ||
90 | - d->private=calloc(1,sizeof(*d->private)); | ||
91 | + d->priv=calloc(1,sizeof(*d->priv)); | ||
92 | { | ||
93 | /* goddamnit */ | ||
94 | struct timespec tv; | ||
95 | - d->private->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC); | ||
96 | + d->priv->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC); | ||
97 | } | ||
98 | idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",description); | ||
99 | return(d); | ||
100 | @@ -674,15 +674,15 @@ cdrom_drive *cdda_identify_scsi(const char *generic_device, | ||
101 | d->bigendianp=-1; /* We don't know yet... */ | ||
102 | d->nsectors=-1; | ||
103 | d->messagedest = messagedest; | ||
104 | - d->private=calloc(1,sizeof(*d->private)); | ||
105 | + d->priv=calloc(1,sizeof(*d->priv)); | ||
106 | { | ||
107 | /* goddamnit */ | ||
108 | struct timespec tv; | ||
109 | - d->private->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC); | ||
110 | + d->priv->clock=(clock_gettime(CLOCK_MONOTONIC,&tv)<0?CLOCK_REALTIME:CLOCK_MONOTONIC); | ||
111 | } | ||
112 | if(use_sgio){ | ||
113 | d->interface=SGIO_SCSI; | ||
114 | - d->private->sg_buffer=(unsigned char *)(d->private->sg_hd=malloc(MAX_BIG_BUFF_SIZE)); | ||
115 | + d->priv->sg_buffer=(unsigned char *)(d->priv->sg_hd=malloc(MAX_BIG_BUFF_SIZE)); | ||
116 | g_fd=d->cdda_fd=dup(d->ioctl_fd); | ||
117 | }else{ | ||
118 | version=verify_SG_version(d,messagedest,messages); | ||
119 | @@ -696,8 +696,8 @@ cdrom_drive *cdda_identify_scsi(const char *generic_device, | ||
120 | } | ||
121 | |||
122 | /* malloc our big buffer for scsi commands */ | ||
123 | - d->private->sg_hd=malloc(MAX_BIG_BUFF_SIZE); | ||
124 | - d->private->sg_buffer=((unsigned char *)d->private->sg_hd)+SG_OFF; | ||
125 | + d->priv->sg_hd=malloc(MAX_BIG_BUFF_SIZE); | ||
126 | + d->priv->sg_buffer=((unsigned char *)d->priv->sg_hd)+SG_OFF; | ||
127 | } | ||
128 | |||
129 | { | ||
130 | @@ -772,9 +772,9 @@ cdda_identify_scsi_fail: | ||
131 | if(i_fd!=-1)close(i_fd); | ||
132 | if(g_fd!=-1)close(g_fd); | ||
133 | if(d){ | ||
134 | - if(d->private){ | ||
135 | - if(d->private->sg_hd)free(d->private->sg_hd); | ||
136 | - free(d->private); | ||
137 | + if(d->priv){ | ||
138 | + if(d->priv->sg_hd)free(d->priv->sg_hd); | ||
139 | + free(d->priv); | ||
140 | } | ||
141 | free(d); | ||
142 | } | ||
143 | @@ -821,7 +821,7 @@ cdrom_drive *cdda_identify_test(const char *filename, int messagedest, | ||
144 | d->interface=TEST_INTERFACE; | ||
145 | d->bigendianp=-1; /* We don't know yet... */ | ||
146 | d->nsectors=-1; | ||
147 | - d->private=calloc(1,sizeof(*d->private)); | ||
148 | + d->priv=calloc(1,sizeof(*d->priv)); | ||
149 | d->drive_model=copystring("File based test interface"); | ||
150 | idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",d->drive_model); | ||
151 | |||
152 | diff --git a/interface/scsi_interface.c b/interface/scsi_interface.c | ||
153 | index adbb9bf..75d90d4 100644 | ||
154 | --- a/interface/scsi_interface.c | ||
155 | +++ b/interface/scsi_interface.c | ||
156 | @@ -15,13 +15,13 @@ | ||
157 | static int timed_ioctl(cdrom_drive *d, int fd, int command, void *arg){ | ||
158 | struct timespec tv1; | ||
159 | struct timespec tv2; | ||
160 | - int ret1=clock_gettime(d->private->clock,&tv1); | ||
161 | + int ret1=clock_gettime(d->priv->clock,&tv1); | ||
162 | int ret2=ioctl(fd, command,arg); | ||
163 | - int ret3=clock_gettime(d->private->clock,&tv2); | ||
164 | + int ret3=clock_gettime(d->priv->clock,&tv2); | ||
165 | if(ret1<0 || ret3<0){ | ||
166 | - d->private->last_milliseconds=-1; | ||
167 | + d->priv->last_milliseconds=-1; | ||
168 | }else{ | ||
169 | - d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.; | ||
170 | + d->priv->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000. + (tv2.tv_nsec-tv1.tv_nsec)/1000000.; | ||
171 | } | ||
172 | return ret2; | ||
173 | } | ||
174 | @@ -96,7 +96,7 @@ static void tweak_SG_buffer(cdrom_drive *d) { | ||
175 | static void clear_garbage(cdrom_drive *d){ | ||
176 | fd_set fdset; | ||
177 | struct timeval tv; | ||
178 | - struct sg_header *sg_hd=d->private->sg_hd; | ||
179 | + struct sg_header *sg_hd=d->priv->sg_hd; | ||
180 | int flag=0; | ||
181 | |||
182 | /* clear out any possibly preexisting garbage */ | ||
183 | @@ -185,7 +185,7 @@ static int sg2_handle_scsi_cmd(cdrom_drive *d, | ||
184 | struct timespec tv2; | ||
185 | int tret1,tret2; | ||
186 | int status = 0; | ||
187 | - struct sg_header *sg_hd=d->private->sg_hd; | ||
188 | + struct sg_header *sg_hd=d->priv->sg_hd; | ||
189 | long writebytes=SG_OFF+cmd_len+in_size; | ||
190 | |||
191 | /* generic scsi device services */ | ||
192 | @@ -195,7 +195,7 @@ static int sg2_handle_scsi_cmd(cdrom_drive *d, | ||
193 | |||
194 | memset(sg_hd,0,sizeof(sg_hd)); | ||
195 | memset(sense_buffer,0,SG_MAX_SENSE); | ||
196 | - memcpy(d->private->sg_buffer,cmd,cmd_len+in_size); | ||
197 | + memcpy(d->priv->sg_buffer,cmd,cmd_len+in_size); | ||
198 | sg_hd->twelve_byte = cmd_len == 12; | ||
199 | sg_hd->result = 0; | ||
200 | sg_hd->reply_len = SG_OFF + out_size; | ||
201 | @@ -209,7 +209,7 @@ static int sg2_handle_scsi_cmd(cdrom_drive *d, | ||
202 | tell if the command failed. Scared yet? */ | ||
203 | |||
204 | if(bytecheck && out_size>in_size){ | ||
205 | - memset(d->private->sg_buffer+cmd_len+in_size,bytefill,out_size-in_size); | ||
206 | + memset(d->priv->sg_buffer+cmd_len+in_size,bytefill,out_size-in_size); | ||
207 | /* the size does not remove cmd_len due to the way the kernel | ||
208 | driver copies buffers */ | ||
209 | writebytes+=(out_size-in_size); | ||
210 | @@ -243,7 +243,7 @@ static int sg2_handle_scsi_cmd(cdrom_drive *d, | ||
211 | } | ||
212 | |||
213 | sigprocmask (SIG_BLOCK, &(d->sigset), NULL ); | ||
214 | - tret1=clock_gettime(d->private->clock,&tv1); | ||
215 | + tret1=clock_gettime(d->priv->clock,&tv1); | ||
216 | errno=0; | ||
217 | status = write(d->cdda_fd, sg_hd, writebytes ); | ||
218 | |||
219 | @@ -289,7 +289,7 @@ static int sg2_handle_scsi_cmd(cdrom_drive *d, | ||
220 | } | ||
221 | } | ||
222 | |||
223 | - tret2=clock_gettime(d->private->clock,&tv2); | ||
224 | + tret2=clock_gettime(d->priv->clock,&tv2); | ||
225 | errno=0; | ||
226 | status = read(d->cdda_fd, sg_hd, SG_OFF + out_size); | ||
227 | sigprocmask ( SIG_UNBLOCK, &(d->sigset), NULL ); | ||
228 | @@ -313,7 +313,7 @@ static int sg2_handle_scsi_cmd(cdrom_drive *d, | ||
229 | if(bytecheck && in_size+cmd_len<out_size){ | ||
230 | long i,flag=0; | ||
231 | for(i=in_size;i<out_size;i++) | ||
232 | - if(d->private->sg_buffer[i]!=bytefill){ | ||
233 | + if(d->priv->sg_buffer[i]!=bytefill){ | ||
234 | flag=1; | ||
235 | break; | ||
236 | } | ||
237 | @@ -326,9 +326,9 @@ static int sg2_handle_scsi_cmd(cdrom_drive *d, | ||
238 | |||
239 | errno=0; | ||
240 | if(tret1<0 || tret2<0){ | ||
241 | - d->private->last_milliseconds=-1; | ||
242 | + d->priv->last_milliseconds=-1; | ||
243 | }else{ | ||
244 | - d->private->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000 + (tv2.tv_nsec-tv1.tv_nsec)/1000000; | ||
245 | + d->priv->last_milliseconds = (tv2.tv_sec-tv1.tv_sec)*1000 + (tv2.tv_nsec-tv1.tv_nsec)/1000000; | ||
246 | } | ||
247 | return(0); | ||
248 | } | ||
249 | @@ -347,7 +347,7 @@ static int sgio_handle_scsi_cmd(cdrom_drive *d, | ||
250 | |||
251 | memset(&hdr,0,sizeof(hdr)); | ||
252 | memset(sense,0,sizeof(sense)); | ||
253 | - memcpy(d->private->sg_buffer,cmd+cmd_len,in_size); | ||
254 | + memcpy(d->priv->sg_buffer,cmd+cmd_len,in_size); | ||
255 | |||
256 | hdr.cmdp = cmd; | ||
257 | hdr.cmd_len = cmd_len; | ||
258 | @@ -355,7 +355,7 @@ static int sgio_handle_scsi_cmd(cdrom_drive *d, | ||
259 | hdr.mx_sb_len = SG_MAX_SENSE; | ||
260 | hdr.timeout = 50000; | ||
261 | hdr.interface_id = 'S'; | ||
262 | - hdr.dxferp = d->private->sg_buffer; | ||
263 | + hdr.dxferp = d->priv->sg_buffer; | ||
264 | hdr.flags = SG_FLAG_DIRECT_IO; /* direct IO if we can get it */ | ||
265 | |||
266 | /* scary buffer fill hack */ | ||
267 | @@ -400,7 +400,7 @@ static int sgio_handle_scsi_cmd(cdrom_drive *d, | ||
268 | if(bytecheck && in_size<out_size){ | ||
269 | long i,flag=0; | ||
270 | for(i=in_size;i<out_size;i++) | ||
271 | - if(d->private->sg_buffer[i]!=bytefill){ | ||
272 | + if(d->priv->sg_buffer[i]!=bytefill){ | ||
273 | flag=1; | ||
274 | break; | ||
275 | } | ||
276 | @@ -412,7 +412,7 @@ static int sgio_handle_scsi_cmd(cdrom_drive *d, | ||
277 | } | ||
278 | |||
279 | /* Can't rely on .duration because we can't be certain kernel has HZ set to something useful */ | ||
280 | - /* d->private->last_milliseconds = hdr.duration; */ | ||
281 | + /* d->priv->last_milliseconds = hdr.duration; */ | ||
282 | |||
283 | errno = 0; | ||
284 | return 0; | ||
285 | @@ -445,9 +445,9 @@ static int test_unit_ready(cdrom_drive *d){ | ||
286 | |||
287 | handle_scsi_cmd(d, cmd, 6, 0, 56, 0,0, sense); | ||
288 | |||
289 | - key = d->private->sg_buffer[2] & 0xf; | ||
290 | - ASC = d->private->sg_buffer[12]; | ||
291 | - ASCQ = d->private->sg_buffer[13]; | ||
292 | + key = d->priv->sg_buffer[2] & 0xf; | ||
293 | + ASC = d->priv->sg_buffer[12]; | ||
294 | + ASCQ = d->priv->sg_buffer[13]; | ||
295 | |||
296 | if(key == 2 && ASC == 4 && ASCQ == 1) return 0; | ||
297 | return 1; | ||
298 | @@ -492,7 +492,7 @@ static int mode_sense_atapi(cdrom_drive *d,int size,int page){ | ||
299 | if (handle_scsi_cmd (d, cmd, 10, 0, size+4,'\377',1,sense)) return(1); | ||
300 | |||
301 | { | ||
302 | - unsigned char *b=d->private->sg_buffer; | ||
303 | + unsigned char *b=d->priv->sg_buffer; | ||
304 | if(b[0])return(1); /* Handles only up to 256 bytes */ | ||
305 | if(b[6])return(1); /* Handles only up to 256 bytes */ | ||
306 | |||
307 | @@ -604,8 +604,8 @@ static int mode_select(cdrom_drive *d,int density,int secsize){ | ||
308 | static unsigned int get_orig_sectorsize(cdrom_drive *d){ | ||
309 | if(mode_sense(d,12,0x01))return(-1); | ||
310 | |||
311 | - d->orgdens = d->private->sg_buffer[4]; | ||
312 | - return(d->orgsize = ((int)(d->private->sg_buffer[10])<<8)+d->private->sg_buffer[11]); | ||
313 | + d->orgdens = d->priv->sg_buffer[4]; | ||
314 | + return(d->orgsize = ((int)(d->priv->sg_buffer[10])<<8)+d->priv->sg_buffer[11]); | ||
315 | } | ||
316 | |||
317 | /* switch CDROM scsi drives to given sector size */ | ||
318 | @@ -664,8 +664,8 @@ static int scsi_read_toc (cdrom_drive *d){ | ||
319 | return(-4); | ||
320 | } | ||
321 | |||
322 | - first=d->private->sg_buffer[2]; | ||
323 | - last=d->private->sg_buffer[3]; | ||
324 | + first=d->priv->sg_buffer[2]; | ||
325 | + last=d->priv->sg_buffer[3]; | ||
326 | tracks=last-first+1; | ||
327 | |||
328 | if (last > MAXTRK || first > MAXTRK || last<0 || first<0) { | ||
329 | @@ -683,7 +683,7 @@ static int scsi_read_toc (cdrom_drive *d){ | ||
330 | return(-5); | ||
331 | } | ||
332 | { | ||
333 | - scsi_TOC *toc=(scsi_TOC *)(d->private->sg_buffer+4); | ||
334 | + scsi_TOC *toc=(scsi_TOC *)(d->priv->sg_buffer+4); | ||
335 | |||
336 | d->disc_toc[i-first].bFlags=toc->bFlags; | ||
337 | d->disc_toc[i-first].bTrack=i; | ||
338 | @@ -704,7 +704,7 @@ static int scsi_read_toc (cdrom_drive *d){ | ||
339 | return(-2); | ||
340 | } | ||
341 | { | ||
342 | - scsi_TOC *toc=(scsi_TOC *)(d->private->sg_buffer+4); | ||
343 | + scsi_TOC *toc=(scsi_TOC *)(d->priv->sg_buffer+4); | ||
344 | |||
345 | d->disc_toc[i-first].bFlags=toc->bFlags; | ||
346 | d->disc_toc[i-first].bTrack=0xAA; | ||
347 | @@ -738,7 +738,7 @@ static int scsi_read_toc2 (cdrom_drive *d){ | ||
348 | } | ||
349 | |||
350 | /* copy to our structure and convert start sector */ | ||
351 | - tracks = d->private->sg_buffer[1]; | ||
352 | + tracks = d->priv->sg_buffer[1]; | ||
353 | if (tracks > MAXTRK) { | ||
354 | cderror(d,"003: CDROM reporting illegal number of tracks\n"); | ||
355 | return(-3); | ||
356 | @@ -754,33 +754,33 @@ static int scsi_read_toc2 (cdrom_drive *d){ | ||
357 | return(-5); | ||
358 | } | ||
359 | |||
360 | - d->disc_toc[i].bFlags = d->private->sg_buffer[10]; | ||
361 | + d->disc_toc[i].bFlags = d->priv->sg_buffer[10]; | ||
362 | d->disc_toc[i].bTrack = i + 1; | ||
363 | |||
364 | d->disc_toc[i].dwStartSector= d->adjust_ssize * | ||
365 | - (((signed char)(d->private->sg_buffer[2])<<24) | | ||
366 | - (d->private->sg_buffer[3]<<16)| | ||
367 | - (d->private->sg_buffer[4]<<8)| | ||
368 | - (d->private->sg_buffer[5])); | ||
369 | + (((signed char)(d->priv->sg_buffer[2])<<24) | | ||
370 | + (d->priv->sg_buffer[3]<<16)| | ||
371 | + (d->priv->sg_buffer[4]<<8)| | ||
372 | + (d->priv->sg_buffer[5])); | ||
373 | } | ||
374 | |||
375 | d->disc_toc[i].bFlags = 0; | ||
376 | d->disc_toc[i].bTrack = i + 1; | ||
377 | - memcpy (&foo, d->private->sg_buffer+2, 4); | ||
378 | - memcpy (&bar, d->private->sg_buffer+6, 4); | ||
379 | + memcpy (&foo, d->priv->sg_buffer+2, 4); | ||
380 | + memcpy (&bar, d->priv->sg_buffer+6, 4); | ||
381 | d->disc_toc[i].dwStartSector = d->adjust_ssize * (be32_to_cpu(foo) + | ||
382 | be32_to_cpu(bar)); | ||
383 | |||
384 | d->disc_toc[i].dwStartSector= d->adjust_ssize * | ||
385 | - ((((signed char)(d->private->sg_buffer[2])<<24) | | ||
386 | - (d->private->sg_buffer[3]<<16)| | ||
387 | - (d->private->sg_buffer[4]<<8)| | ||
388 | - (d->private->sg_buffer[5]))+ | ||
389 | + ((((signed char)(d->priv->sg_buffer[2])<<24) | | ||
390 | + (d->priv->sg_buffer[3]<<16)| | ||
391 | + (d->priv->sg_buffer[4]<<8)| | ||
392 | + (d->priv->sg_buffer[5]))+ | ||
393 | |||
394 | - ((((signed char)(d->private->sg_buffer[6])<<24) | | ||
395 | - (d->private->sg_buffer[7]<<16)| | ||
396 | - (d->private->sg_buffer[8]<<8)| | ||
397 | - (d->private->sg_buffer[9])))); | ||
398 | + ((((signed char)(d->priv->sg_buffer[6])<<24) | | ||
399 | + (d->priv->sg_buffer[7]<<16)| | ||
400 | + (d->priv->sg_buffer[8]<<8)| | ||
401 | + (d->priv->sg_buffer[9])))); | ||
402 | |||
403 | |||
404 | d->cd_extra = FixupTOC(d,tracks+1); | ||
405 | @@ -817,7 +817,7 @@ static int i_read_28 (cdrom_drive *d, void *p, long begin, long sectors, unsigne | ||
406 | cmd[8] = sectors; | ||
407 | if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) | ||
408 | return(ret); | ||
409 | - if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
410 | + if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
411 | return(0); | ||
412 | } | ||
413 | |||
414 | @@ -836,7 +836,7 @@ static int i_read_A8 (cdrom_drive *d, void *p, long begin, long sectors, unsigne | ||
415 | cmd[9] = sectors; | ||
416 | if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) | ||
417 | return(ret); | ||
418 | - if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
419 | + if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
420 | return(0); | ||
421 | } | ||
422 | |||
423 | @@ -854,7 +854,7 @@ static int i_read_D4_10 (cdrom_drive *d, void *p, long begin, long sectors, unsi | ||
424 | cmd[8] = sectors; | ||
425 | if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) | ||
426 | return(ret); | ||
427 | - if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
428 | + if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
429 | return(0); | ||
430 | } | ||
431 | |||
432 | @@ -872,7 +872,7 @@ static int i_read_D4_12 (cdrom_drive *d, void *p, long begin, long sectors, unsi | ||
433 | cmd[9] = sectors; | ||
434 | if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) | ||
435 | return(ret); | ||
436 | - if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
437 | + if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
438 | return(0); | ||
439 | } | ||
440 | |||
441 | @@ -890,7 +890,7 @@ static int i_read_D5 (cdrom_drive *d, void *p, long begin, long sectors, unsigne | ||
442 | cmd[8] = sectors; | ||
443 | if((ret=handle_scsi_cmd(d,cmd,10,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) | ||
444 | return(ret); | ||
445 | - if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
446 | + if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
447 | return(0); | ||
448 | } | ||
449 | |||
450 | @@ -908,7 +908,7 @@ static int i_read_D8 (cdrom_drive *d, void *p, long begin, long sectors, unsigne | ||
451 | cmd[9] = sectors; | ||
452 | if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) | ||
453 | return(ret); | ||
454 | - if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
455 | + if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
456 | return(0); | ||
457 | } | ||
458 | |||
459 | @@ -922,7 +922,7 @@ static int i_read_mmc (cdrom_drive *d, void *p, long begin, long sectors, unsign | ||
460 | cmd[8] = sectors; | ||
461 | if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) | ||
462 | return(ret); | ||
463 | - if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
464 | + if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
465 | return(0); | ||
466 | } | ||
467 | |||
468 | @@ -936,7 +936,7 @@ static int i_read_mmcB (cdrom_drive *d, void *p, long begin, long sectors, unsig | ||
469 | cmd[8] = sectors; | ||
470 | if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) | ||
471 | return(ret); | ||
472 | - if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
473 | + if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
474 | return(0); | ||
475 | } | ||
476 | |||
477 | @@ -950,7 +950,7 @@ static int i_read_mmc2 (cdrom_drive *d, void *p, long begin, long sectors, unsig | ||
478 | cmd[8] = sectors; | ||
479 | if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) | ||
480 | return(ret); | ||
481 | - if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
482 | + if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
483 | return(0); | ||
484 | } | ||
485 | |||
486 | @@ -964,7 +964,7 @@ static int i_read_mmc2B (cdrom_drive *d, void *p, long begin, long sectors, unsi | ||
487 | cmd[8] = sectors; | ||
488 | if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) | ||
489 | return(ret); | ||
490 | - if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
491 | + if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
492 | return(0); | ||
493 | } | ||
494 | |||
495 | @@ -978,7 +978,7 @@ static int i_read_mmc3 (cdrom_drive *d, void *p, long begin, long sectors, unsig | ||
496 | cmd[8] = sectors; | ||
497 | if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) | ||
498 | return(ret); | ||
499 | - if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
500 | + if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
501 | return(0); | ||
502 | } | ||
503 | |||
504 | @@ -992,7 +992,7 @@ static int i_read_mmc3B (cdrom_drive *d, void *p, long begin, long sectors, unsi | ||
505 | cmd[8] = sectors; | ||
506 | if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) | ||
507 | return(ret); | ||
508 | - if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
509 | + if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
510 | return(0); | ||
511 | } | ||
512 | |||
513 | @@ -1026,7 +1026,7 @@ static int i_read_msf (cdrom_drive *d, void *p, long begin, long sectors, unsign | ||
514 | |||
515 | if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) | ||
516 | return(ret); | ||
517 | - if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
518 | + if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
519 | return(0); | ||
520 | } | ||
521 | |||
522 | @@ -1039,7 +1039,7 @@ static int i_read_msf2 (cdrom_drive *d, void *p, long begin, long sectors, unsig | ||
523 | |||
524 | if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) | ||
525 | return(ret); | ||
526 | - if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
527 | + if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
528 | return(0); | ||
529 | } | ||
530 | |||
531 | @@ -1052,7 +1052,7 @@ static int i_read_msf3 (cdrom_drive *d, void *p, long begin, long sectors, unsig | ||
532 | |||
533 | if((ret=handle_scsi_cmd(d,cmd,12,0,sectors * CD_FRAMESIZE_RAW,'\177',1,sense))) | ||
534 | return(ret); | ||
535 | - if(p)memcpy(p,d->private->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
536 | + if(p)memcpy(p,d->priv->sg_buffer,sectors*CD_FRAMESIZE_RAW); | ||
537 | return(0); | ||
538 | } | ||
539 | |||
540 | @@ -1275,7 +1275,7 @@ long scsi_read_msf3 (cdrom_drive *d, void *p, long begin, | ||
541 | static int count_2352_bytes(cdrom_drive *d){ | ||
542 | long i; | ||
543 | for(i=2351;i>=0;i--) | ||
544 | - if(d->private->sg_buffer[i]!=(unsigned char)'\177') | ||
545 | + if(d->priv->sg_buffer[i]!=(unsigned char)'\177') | ||
546 | return(((i+3)>>2)<<2); | ||
547 | |||
548 | return(0); | ||
549 | @@ -1284,7 +1284,7 @@ static int count_2352_bytes(cdrom_drive *d){ | ||
550 | static int verify_nonzero(cdrom_drive *d){ | ||
551 | long i,flag=0; | ||
552 | for(i=0;i<2352;i++) | ||
553 | - if(d->private->sg_buffer[i]!=0){ | ||
554 | + if(d->priv->sg_buffer[i]!=0){ | ||
555 | flag=1; | ||
556 | break; | ||
557 | } | ||
558 | @@ -1625,7 +1625,7 @@ static int check_mmc(cdrom_drive *d){ | ||
559 | d->is_mmc=0; | ||
560 | if(mode_sense(d,22,0x2A)==0){ | ||
561 | |||
562 | - b=d->private->sg_buffer; | ||
563 | + b=d->priv->sg_buffer; | ||
564 | b+=b[3]+4; | ||
565 | |||
566 | if((b[0]&0x3F)==0x2A){ | ||
567 | @@ -1673,7 +1673,7 @@ unsigned char *scsi_inquiry(cdrom_drive *d){ | ||
568 | cderror(d,"008: Unable to identify CDROM model\n"); | ||
569 | return(NULL); | ||
570 | } | ||
571 | - return (d->private->sg_buffer); | ||
572 | + return (d->priv->sg_buffer); | ||
573 | } | ||
574 | |||
575 | int scsi_init_drive(cdrom_drive *d){ | ||
576 | @@ -1742,8 +1742,8 @@ int scsi_init_drive(cdrom_drive *d){ | ||
577 | check_cache(d); | ||
578 | |||
579 | d->error_retry=1; | ||
580 | - d->private->sg_hd=realloc(d->private->sg_hd,d->nsectors*CD_FRAMESIZE_RAW + SG_OFF + 128); | ||
581 | - d->private->sg_buffer=((unsigned char *)d->private->sg_hd)+SG_OFF; | ||
582 | + d->priv->sg_hd=realloc(d->priv->sg_hd,d->nsectors*CD_FRAMESIZE_RAW + SG_OFF + 128); | ||
583 | + d->priv->sg_buffer=((unsigned char *)d->priv->sg_hd)+SG_OFF; | ||
584 | d->report_all=1; | ||
585 | return(0); | ||
586 | } | ||
587 | diff --git a/interface/test_interface.c b/interface/test_interface.c | ||
588 | index 11bec25..e1cefaa 100644 | ||
589 | --- a/interface/test_interface.c | ||
590 | +++ b/interface/test_interface.c | ||
591 | @@ -66,9 +66,9 @@ static long test_read(cdrom_drive *d, void *p, long begin, long sectors){ | ||
592 | if(!fd)fd=fdopen(d->cdda_fd,"r"); | ||
593 | |||
594 | if(begin<lastread) | ||
595 | - d->private->last_milliseconds=20; | ||
596 | + d->priv->last_milliseconds=20; | ||
597 | else | ||
598 | - d->private->last_milliseconds=sectors; | ||
599 | + d->priv->last_milliseconds=sectors; | ||
600 | |||
601 | #ifdef CDDA_TEST_UNDERRUN | ||
602 | sectors-=1; | ||
603 | -- | ||
604 | 1.9.1 | ||
605 | |||