Projects
Extra
cdctl
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
cdctl.changes
Added
@@ -0,0 +1,35 @@ +------------------------------------------------------------------- +Sun Nov 17 08:52:23 UTC 2019 - Luigi Baldoni <aloisio@gmx.com> + +- Update to version 0.16 + * Matthew Clarke <Matthew_Clarke@mindlink.bc.ca> fixed a + problem with the memory allocation of a variable in the + volume setting code. + * Better packaging, man page updates. + * "make rpms" works now, if you have rpm configured correctly. + * Removed CDC_IOCTLS, which doesn't exist in the kernel headers + anymore. + +- Refreshed cdctl-0.15-Makefile.in.patch as + cdctl-0.16-Makefile.in.patch + +- Dropped cdctl-0.15-cdc_ioctls.patch (no longer useful) + +- Spec cleanup + +------------------------------------------------------------------- +Sat Jun 13 00:00:00 UTC 2009 - AxelKoellhofer@web.de + +- spec cleanup +- fixed use of RPM_OPT_FLAGS + +------------------------------------------------------------------- +Wed Oct 1 00:00:00 UTC 2008 - AxelKoellhofer@web.de + +- Added patches 0 and 1, rebuild for openSUSE 10.x/11.x + +------------------------------------------------------------------- +Sun Mar 26 00:00:00 UTC 2000 - thalakan@technologist.com + +- First spec file for cdctl, version 0.15 +
View file
cdctl.spec
Changed
@@ -1,5 +1,7 @@ -# spec file for package cdctl (version 0.15) # +# spec file for package cdctl +# +# Copyright (c) 2019 Packman Team <packman@links2linux.de> # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties @@ -10,60 +12,49 @@ # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ + +# Please submit bugfixes or comments via https://bugs.links2linux.org/ # -# norootforbuild -Summary: Controls your cdrom drive -Name: cdctl -Version: 0.15 -Release: 0.pm.0 -Url: http://cdctl.sourceforge.net/ -Source0: %{name}-%{version}.tar.bz2 -Patch0: %{name}-%{version}-Makefile.in.patch -Patch1: %{name}-%{version}-cdc_ioctls.patch -License: Other -Group: System/Base -BuildRoot: %{_tmppath}/%{name}-buildroot -%description +Name: cdctl +Version: 0.16 +Release: 0 +Summary: Controls your cdrom drive +License: SUSE-Permissive +Group: System/Base +URL: http://cdctl.sourceforge.net/ +Source0: https://sourceforge.net/projects/cdctl/files/%{name}-%{version}.tar.gz +Patch0: %{name}-0.16-Makefile.in.patch +BuildRequires: autoconf +BuildRequires: automake + +%description Cdctl controls your cdrom drive under Linux. It is an user-level console application which gives the user access to the ioctl() interfaces of the Uniform CDROM Driver of the Linux kernel. It can play audio CDs, control the drive's tray motor, change the drive's volume levels, read the current type of disc in the drive, and much more. - - %prep -%setup -%patch0 -p0 -%patch1 -p1 +%setup -q -n %{name} +%patch0 -p1 %build +autoreconf -fiv %configure -%__make %{?jobs:-j%{jobs}} +make %{?_smp_mflags} %install -%makeinstall +%make_install %find_lang %{name} -%clean -rm -rf "$RPM_BUILD_ROOT" - -%files -f %{name}.lang -%defattr(-,root,root) -%doc README LICENSE NEWS NUTSANDBOLTS PUBLICKEY +%files -f %{name}.lang +%license LICENSE +%doc README NEWS NUTSANDBOLTS PUBLICKEY %{_bindir}/%{name} -%{_mandir}/man1/%{name}* +%{_mandir}/man1/%{name}.1%{?ext_man} %changelog -* Sat Jun 13 2009 <AxelKoellhofer@web.de> -- spec cleanup -- fixed use of RPM_OPT_FLAGS -* Wed Oct 01 2008 <AxelKoellhofer@web.de> -- Added patches 0 and 1, rebuild for openSUSE 10.x/11.x -* Sun Mar 26 2000 Jason Spence <thalakan@technologist.com> -- First spec file for cdctl, version 0.15
View file
cdctl-0.15-Makefile.in.patch
Deleted
@@ -1,59 +0,0 @@ ---- Makefile.in.orig 2000-03-27 03:06:53.000000000 +0200 -+++ Makefile.in 2009-06-13 02:48:53.576008981 +0200 -@@ -1,11 +1,13 @@ - CC=gcc --CFLAGS=-Wall -g --BINS=cdctl sndreset -+CFLAGS=$(RPM_OPT_FLAGS) -+BINS=cdctl - OBJS=cdctl.o version.o ioctls.o iso_header.o --DOCS=NEWS NUTSANDBOLTS LICENSE PUBLICKEY README SEGFAULTS -+DOCS=NEWS NUTSANDBOLTS LICENSE PUBLICKEY README - MANS=cdctl.1 - MOS=cdctl.mo - -+prefix = @prefix@ -+exec_prefix = @exec_prefix@ - bindir = @bindir@ - mandir = @mandir@ - datadir = @datadir@ -@@ -16,6 +18,10 @@ - INSTALL = @INSTALL@ - INSTALL_DATA = $(INSTALL) -m 644 - -+DESTDIR = -+ -+man1dir = $(mandir)/man1 -+ - all: $(BINS) - - cdctl: $(OBJS) -@@ -26,21 +32,21 @@ - version.o: version.c - iso_header.o: iso_header.c - --install: install-bins install-docs install-mans install-mos -+install: install-bins install-mans install-mos - - install-bins: $(BINS) -- $(INSTALL) -s $(BINS) $(bindir) -- --install-docs: $(DOCS) -- $(INSTALL_DATA) $(DOCS) $(datadir) -+ $(INSTALL) -d $(DESTDIR)$(bindir) -+ $(INSTALL) $(BINS) $(DESTDIR)$(bindir) - - install-mans: $(MANS) -- $(INSTALL_DATA) $(MANS) $(mandir) -+ $(INSTALL) -d $(DESTDIR)$(man1dir) -+ $(INSTALL_DATA) $(MANS) $(DESTDIR)$(man1dir) - - # FIXME: need to deal with other languages besides German - - install-mos: cdctl.mo -- $(INSTALL_DATA) $(MOS) $(localedir)/de/LC_MESSAGES -+ $(INSTALL) -d $(DESTDIR)$(localedir)/de/LC_MESSAGES -+ $(INSTALL_DATA) $(MOS) $(DESTDIR)$(localedir)/de/LC_MESSAGES - - cdctl.mo: cdctl.po - msgfmt cdctl.po -o cdctl.mo
View file
cdctl-0.15-cdc_ioctls.patch
Deleted
@@ -1,13 +0,0 @@ -diff -Naurp cdctl-0.15-orig/cdctl.c cdctl-0.15/cdctl.c ---- cdctl-0.15-orig/cdctl.c 2006-08-08 23:18:44.000000000 +0200 -+++ cdctl-0.15/cdctl.c 2006-08-08 23:19:33.000000000 +0200 -@@ -337,7 +337,9 @@ int do_print_capabilities(int cdrom) { - printf("Can report media change: %i\n", (ret & CDC_MEDIA_CHANGED)?1:0); - printf("Can play audio discs : %i\n", (ret & CDC_PLAY_AUDIO)?1:0); - printf("Can do a hard reset : %i\n", (ret & CDC_RESET)?1:0); -+#ifdef CDC_IOCTLS - printf("Has non-standard ioctls: %i\n", (ret & CDC_IOCTLS)?1:0); -+#endif - printf("Can report drive status: %i\n", (ret & CDC_DRIVE_STATUS)?1:0); - - #ifdef CDROM_CHANGER_NSLOTS
View file
cdctl-0.16-Makefile.in.patch
Added
@@ -0,0 +1,59 @@ +Index: cdctl/Makefile.in +=================================================================== +--- cdctl.orig/Makefile.in ++++ cdctl/Makefile.in +@@ -1,8 +1,8 @@ + CC=gcc +-CFLAGS=-Wall -g +-BINS=cdctl sndreset ++CFLAGS=$(RPM_OPT_FLAGS) ++BINS=cdctl + OBJS=cdctl.o version.o ioctls.o iso_header.o +-DOCS=NEWS NUTSANDBOLTS LICENSE PUBLICKEY README SEGFAULTS ++DOCS=NEWS NUTSANDBOLTS LICENSE PUBLICKEY README + # NOTE: all man pages are installed in $(mandir)/man1 -- see install-mans + MANS=cdctl.1 + MOS=cdctl.mo +@@ -22,6 +22,9 @@ INSTALL = @INSTALL@ + INSTALL_DIR = $(INSTALL) -d + INSTALL_DATA = $(INSTALL) -m 644 + ++DESTDIR = ++man1dir = $(mandir)/man1 ++ + all: $(BINS) + + cdctl: $(OBJS) +@@ -35,25 +38,21 @@ iso_header.o: iso_header.c + indent: + indent -kr -cdb -sc *.c + +-install: install-bins install-docs install-mans install-mos ++install: install-bins install-mans install-mos + + install-bins: $(BINS) +- $(INSTALL_DIR) $(bindir) +- $(INSTALL) -s $(BINS) $(bindir) +- +-install-docs: $(DOCS) +- $(INSTALL_DIR) $(docdir) +- $(INSTALL_DATA) $(DOCS) $(docdir) ++ $(INSTALL) -d $(DESTDIR)$(bindir) ++ $(INSTALL) $(BINS) $(DESTDIR)$(bindir) + + install-mans: $(MANS) +- $(INSTALL_DIR) $(mandir)/man1 +- $(INSTALL_DATA) $(MANS) $(mandir)/man1 ++ $(INSTALL) -d $(DESTDIR)$(man1dir) ++ $(INSTALL_DATA) $(MANS) $(DESTDIR)$(man1dir) + + # FIXME: need to deal with other languages besides German + + install-mos: cdctl.mo +- $(INSTALL_DIR) $(localedir)/de/LC_MESSAGES +- $(INSTALL_DATA) $(MOS) $(localedir)/de/LC_MESSAGES ++ $(INSTALL) -d $(DESTDIR)$(localedir)/de/LC_MESSAGES ++ $(INSTALL_DATA) $(MOS) $(DESTDIR)$(localedir)/de/LC_MESSAGES + + cdctl.mo: cdctl.po + msgfmt cdctl.po -o cdctl.mo
View file
cdctl-0.15.tar.bz2/config.h.in
Deleted
@@ -1,7 +0,0 @@ -/* config.h.in. Generated automatically from configure.in by autoheader. */ - -/* Define if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define if you have the <malloc.h> header file. */ -#undef HAVE_MALLOC_H
View file
cdctl-0.15.tar.bz2/configure
Deleted
@@ -1,1543 +0,0 @@ -#! /bin/sh - -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.14.1 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -# Any additions from configure.in: - -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - -ac_prev= -for ac_option -do - - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case "$ac_option" in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;;
View file
cdctl-0.15.tar.bz2/Makefile.in -> cdctl-0.16.tar.gz/Makefile.in
Changed
@@ -3,17 +3,23 @@ BINS=cdctl sndreset OBJS=cdctl.o version.o ioctls.o iso_header.o DOCS=NEWS NUTSANDBOLTS LICENSE PUBLICKEY README SEGFAULTS +# NOTE: all man pages are installed in $(mandir)/man1 -- see install-mans MANS=cdctl.1 MOS=cdctl.mo +prefix = @prefix@ +exec_prefix = @exec_prefix@ + bindir = @bindir@ mandir = @mandir@ datadir = @datadir@ +docdir = @docdir@ # FIXME: autoconf needs to generate this localedir = /usr/share/locale INSTALL = @INSTALL@ +INSTALL_DIR = $(INSTALL) -d INSTALL_DATA = $(INSTALL) -m 644 all: $(BINS) @@ -26,35 +32,48 @@ version.o: version.c iso_header.o: iso_header.c +indent: + indent -kr -cdb -sc *.c + install: install-bins install-docs install-mans install-mos install-bins: $(BINS) + $(INSTALL_DIR) $(bindir) $(INSTALL) -s $(BINS) $(bindir) install-docs: $(DOCS) - $(INSTALL_DATA) $(DOCS) $(datadir) + $(INSTALL_DIR) $(docdir) + $(INSTALL_DATA) $(DOCS) $(docdir) install-mans: $(MANS) - $(INSTALL_DATA) $(MANS) $(mandir) + $(INSTALL_DIR) $(mandir)/man1 + $(INSTALL_DATA) $(MANS) $(mandir)/man1 # FIXME: need to deal with other languages besides German install-mos: cdctl.mo + $(INSTALL_DIR) $(localedir)/de/LC_MESSAGES $(INSTALL_DATA) $(MOS) $(localedir)/de/LC_MESSAGES cdctl.mo: cdctl.po msgfmt cdctl.po -o cdctl.mo clean: - rm -f $(OBJS) $(BINS) config.cache config.log config.status Makefile *~ + rm -f $(OBJS) $(BINS) + +distclean: clean + rm -f config.cache config.log config.status Makefile config.h *~ commit: clean cvs commit -dist: clean - cd .. && tar czvf cdctl0.15.tar.gz cdctl +rpms: distclean + cd .. && tar czvf cdctl-@VERSION@.tar.gz cdctl + rpm -ta --target=i386 --buildroot ~/RPM ../cdctl-@VERSION@.tar.gz + +dist: distclean rpms + cd .. && tar czvf cdctl-@VERSION@.tar.gz cdctl -dist-devel: clean - cd .. && tar czvf cdctl-devel.tar.gz cdctl +dist-devel: distclean dist # gpg --detach-sign ../cdctl-devel.tar.gz scp ../cdctl-devel.tar.gz* NEWS root@host30.frys.com:/home/thalakan/cdctl
View file
cdctl-0.15.tar.bz2/NEWS -> cdctl-0.16.tar.gz/NEWS
Changed
@@ -1,3 +1,11 @@ +Version 0.16 + - Matthew Clarke <Matthew_Clarke@mindlink.bc.ca> fixed a problem with + the memory allocation of a variable in the volume setting code. + - Better packaging, man page updates. + - "make rpms" works now, if you have rpm configured correctly. + - Removed CDC_IOCTLS, which doesn't exist in the kernel headers anymore. + + Version 0.15 - Fixed an option parsing bug - 2.0 support by Andy Thaller <andy_thaller@physik.tu-muenchen.de> @@ -22,9 +30,7 @@ - NOTE THAT CAPABILITY READBACK IS BROKEN IN 2.2 ON ATAPI DRIVES, says Jens Axboe, the kernel cdrom maintainer. - Granted permission to Debian to make a package for commercial distribution. - - Does anyone know how to make RPMS? Mail thalakan@technologist.com if you - do. - + Version 0.14 - Updated version.c and the usage message; thanks to Andy Piper <andyp@argonet.co.uk> for the diff.
View file
cdctl-0.15.tar.bz2/README -> cdctl-0.16.tar.gz/README
Changed
@@ -1,10 +1,10 @@ cdctl README -Last updated on Sat Mar 25 2000 +Last updated on Tue Apr 11 2000 Hi, thanks for trying out cdctl. I hope you find it useful. cdctl is a program to control your cdrom drive under Linux, and hopefully many other UNIXes in the -future. Right now, it does so much stuff that Í don't even bother maintaining +future. Right now, it does so much stuff that I don't even bother maintaining a list anymore. Build it and do a 'cdctl --help' if you want the complete list for your system. I say "your system" because older Linux kernels can't do certain things. cdctl detects this and doesn't build those features into @@ -64,7 +64,7 @@ If you're the paranoid type, you can verify that this REALLY IS cdctl and not some nefarious subversion of the open source development system by importing my public key, getting the digital signature of the tarball at -http://host30.frys.com/cdctl/cdctl-latest.tar.gz.sig, and verifying the digital +http://cdctl.sourceforge.net/cdctl-latest.tar.gz.sig, and verifying the digital signature matches up with my key. You can get my public key from the file PUBLICKEY in this distribution, by fingering thalakan@host30.frys.com, or from pgpkeys.mit.edu. This should be a simple as @@ -111,3 +111,5 @@ You can reach me at thalakan@technologist.com if you have any questions, patches, or pizza. + +Dedicated to Jo. Thanks for your support, Mistress :)
View file
cdctl-0.15.tar.bz2/cdctl.1 -> cdctl-0.16.tar.gz/cdctl.1
Changed
@@ -1,4 +1,4 @@ -.TH CDCTL 1 "March 25, 1999" +.TH CDCTL 1 "April 5, 2000" .\" defines cdctl with formatting .ds cd \fIcdctl\fP @@ -182,7 +182,11 @@ .TP .I "\-vV, \-\-volume=V" Prints out the current volume if V is not given, otherwise sets the current -volume to V. +volume to V. If V is given, it may be a single number, to set both CD-ROM +channels to that volume, or two numbers (separated by a colon (:), hyphen +(-), or space,) to set each channel independently. For kernels that +support 4 channels in the CD-ROM volume control ioctl, cdctl will report +on all four, but set only the first two. .TP .I "\-V, \-\-version" Prints out the current version of cdctl. @@ -212,6 +216,12 @@ the DRIVE_NOT_FOUND error message, which inspired kernel capability checking using the preprocessor, +Andy Piper <andyp@argonet.co.uk> for a usage message bug report, being +a sounding board, and lots of patches, + +Matthew Clarke <Matthew_Clarke@mindlink.bc.ca>, for a big patch which +fixed many oversights on my part, + Beat Rupp <beat.rupp@gmx.net> for DVD testing and some German localization, Gabor Z Papp <gzp@gzp.org.hu> for testing the jukebox code on his NEC 4x4 ATAPI @@ -220,8 +230,6 @@ Dan Morrison <dmorriso@buffalo.edu> for testing on an ATAPI system, -Andy Piper <andyp@argonet.co.uk> for a usage message bug report and a patch, - Nick <nikk@phreaker.net> for helping to get the autoeject (-u option) working correctly, @@ -229,7 +237,7 @@ line / CDROM env variable logic working right, Fry's Electronics Black Ops <http://host30.frys.com/febo> for hosting the site, -hiring the maintainers, and providing a DS-1 to work on, and +hiring the maintainers, and providing a DS-3 to work on, and Jason Spence <thalakan@technologist.com>. He currently maintains the cdctl source at \fIhttp://host30.frys.com/cdctl\fP in his spare time. Thanks to the
View file
cdctl-0.15.tar.bz2/cdctl.c -> cdctl-0.16.tar.gz/cdctl.c
Changed
@@ -2,7 +2,7 @@ vim:ts=4 -$Id: cdctl.c,v 1.1.1.1 2000/03/27 01:06:54 thalakan Exp $ +$Id: cdctl.c,v 1.5 2009/02/09 00:36:27 thalakan Exp $ 2.0 patches by Andy Thaller <andy_thaller@physik.tu-muenchen.de> MSF patches by Jens Axboe <axboe@image.dk> @@ -47,21 +47,22 @@ int main(int argc, char *argv[]) { - int ret; + int ret; + int i; char *arg = ""; int done = 0; - int cdrom; + int cdrom = -1; int option = 0; - static char options[] = "ab:cd:eghiklmo::p::rst:u:v::V"; + static char options[] = "ab:cd:eghiklmno::p::rst:u:v::V"; static struct option longoptions[] = { - { "pause", 0, NULL, 'a' }, - { "speed", 1, NULL, 'b' }, - { "close", 0, NULL, 'c' }, + { "pause", 0, NULL, 'a' }, + { "speed", 1, NULL, 'b' }, + { "close", 0, NULL, 'c' }, { "disc", 1, NULL, 'd' }, - { "eject", 0, NULL, 'e' }, + { "eject", 0, NULL, 'e' }, { "getstatus", 0, NULL, 'g' }, - { "help", 0, NULL, 'h' }, + { "help", 0, NULL, 'h' }, { "iso-header", 0, NULL, 'i' }, { "iso-header-hex", 0, NULL, '2' }, @@ -76,13 +77,24 @@ #ifdef CDROM_CHANGER_NSLOTS { "numslots", 0, NULL, '1' }, #endif - { "play", 2, NULL, 'p' }, - { "resume", 0, NULL, 'r' }, - { "stop", 0, NULL, 's' }, - { "tocentry", 1, NULL, 't' }, +#ifdef HAVE_DVD_IOCTLS + { "dvdinfo", 0, NULL, 'n' }, +#endif + { "play", 2, NULL, 'p' }, + { "resume", 0, NULL, 'r' }, + { "stop", 0, NULL, 's' }, + { "tocentry", 1, NULL, 't' }, { "autoclose", 1, NULL, 'u' }, - { "volume", 2, NULL, 'v' }, - { "version", 0, NULL, 'V' }, + { "volume", 2, NULL, 'v' }, + { "version", 0, NULL, 'V' }, + }; + + static struct action actions[] = { + { "eject", cd_eject }, + { "shut", cd_close }, + { "open", cd_eject }, + { "close", cd_close }, + { NULL, NULL } }; /* @@ -120,36 +132,35 @@ optarg = arg; /* - * End master initalization + * End master initialization, try to find the cdrom device. + * In order of priority: + * 1: as a command-line argument + * 2: as an environment variable + * 3: "/dev/cdrom" + * - if *that* fails, turn on DEBUG and start from 3 again + * 4: "/dev/scd0" + * 5: "/dev/sr0" */ - - -/* Try to find the cdrom device */ - - if(argv[optind] != 0) { + if(argv[optind] != NULL) { cdrom = open_cdrom(argv[optind]); if(cdrom == -1) { warn(_("can't open %s"), argv[optind]); return 1; } - } else { - cdrom = -1; } - if(getenv("CDROM") != NULL) { cdrom = open_cdrom(getenv("CDROM")); if(cdrom == -1) { warn(_("can't open %s"), getenv("CDROM")); } - } else { - cdrom = -1; } - if(cdrom == -1) { cdrom = open_cdrom("/dev/cdrom"); - } - if(cdrom == -1) { /* I've seen this one a couple times... */ - cdrom = open_cdrom("/dev/cd"); + } + if(cdrom == -1) { + warnx(_("Um, I can't seem to open /dev/cdrom. Trying harder...")); + setenv("DEBUG", "1", 0); + cdrom = open_cdrom("/dev/cdrom"); } if(cdrom == -1) { /* SCSI cdroms */ cdrom = open_cdrom("/dev/scd0"); @@ -157,25 +168,26 @@ if(cdrom == -1) { cdrom = open_cdrom("/dev/sr0"); } - -if (cdrom == -1) { - fprintf(stderr, _("\nUm, I can't seem to open any cd or dvd device. Try setting the\n" - "CDROM environment variable to the device to open.\n" - "Example: \"export CDROM=/dev/hdb\"\n")); - - return 1; -} + if (cdrom == -1) { + warnx(_("Hmm, I can't seem to open any cd or dvd device. Try giving the\n" + "name of a cdrom device (/dev/hdc, maybe?) to cdctl.")); -/* - * A symlink to cdctl named eject will trigger this code. - */ + return 1; + } -if(strstr(argv[0], "eject") != NULL) { - cd_eject(cdrom); - exit(0); -} +/* + * Various possibilities for symlinks to trigger eject or close. + * actions is an array of struct action, and action is a function + * pointer to the action to be performed. + */ + for(i = 0; actions[i].name != NULL; ++i) { + if(strstr(argv[0], actions[i].name) != NULL) { + (* actions[i].action)(cdrom); + return 0; + } + } /* Ok, it's open or we're dead. Proceed. */ switch(option) { @@ -205,7 +217,7 @@ break; case 'r': cd_resume(cdrom); - break; + break; case 'p': do_play(cdrom); break; @@ -218,6 +230,9 @@ case 'm': do_print_mcn(cdrom); break; + case 'n': + do_print_dvdinfo(cdrom); + break; case 'u': cd_set_autoeject(cdrom, atoi(optarg)); break; @@ -337,7 +352,6 @@ printf("Can report media change: %i\n", (ret & CDC_MEDIA_CHANGED)?1:0); printf("Can play audio discs : %i\n", (ret & CDC_PLAY_AUDIO)?1:0); printf("Can do a hard reset : %i\n", (ret & CDC_RESET)?1:0); - printf("Has non-standard ioctls: %i\n", (ret & CDC_IOCTLS)?1:0); printf("Can report drive status: %i\n", (ret & CDC_DRIVE_STATUS)?1:0); #ifdef CDROM_CHANGER_NSLOTS @@ -393,8 +407,8 @@ struct cdrom_volctrl *volume; const char delim[] = ":- "; - char *one; - char *two; + char *one = (char *)NULL; /* initialized here because unconditionally */ + char *two = (char *)NULL; /* freed below, even if never allocated */ char *tmp;
View file
cdctl-0.15.tar.bz2/cdctl.h -> cdctl-0.16.tar.gz/cdctl.h
Changed
@@ -1,4 +1,4 @@ -#define VERSION "cdctl 0.15" +#include "config.h" /* cdctl config header */ /* * rt == red tape, async signal handling in C, arrrgggggghhhhhhhh @@ -15,6 +15,11 @@ struct rt *next_rt; /* pointer to next struct rt */ }; +struct action { + char * name; + int (* action)(int); +}; + /* * NLS stuff */ @@ -63,6 +68,7 @@ extern int do_dump_header(int cdrom, int hex); extern int do_print_status(int cdrom); extern int do_print_volume(int cdrom); +extern int do_print_dvdinfo(int cdrom); extern char * do_parse_iso_date(char *date); extern int do_print_capabilities(int cdrom); extern int do_set_volume(int cdrom, char *input);
View file
cdctl-0.15.tar.bz2/cdctl.spec -> cdctl-0.16.tar.gz/cdctl.spec
Changed
@@ -1,5 +1,5 @@ %define name cdctl -%define version 0.15 +%define version 0.16 %define release 1 Summary: Controls your cdrom drive. @@ -11,7 +11,7 @@ Group: Applications/System BuildRoot: %{_tmppath}/%{name}-buildroot Prefix: %{_prefix} -Requires: +URL: http://cdctl.sourceforge.net %description cdctl controls your cdrom drive under Linux. It is an user-level console @@ -22,31 +22,40 @@ %prep -%setup +%setup -n cdctl %build -CXXFLAGS="$RPM_OPT_FLAGS" %configure -uname -a|grep SMP && make -j 2 || make +#CXXFLAGS="$RPM_OPT_FLAGS" %configure +#uname -a|grep SMP && make -j 2 || make +./configure +make %install rm -rf $RPM_BUILD_ROOT -mkdir -p "$RPM_BUILD_ROOT/usr/local/bin" -mkdir -p "$RPM_BUILD_ROOT/usr/doc/cdctl-$VERSION" +mkdir -p $RPM_BUILD_ROOT/usr/local/bin +mkdir -p $RPM_BUILD_ROOT/usr/local/man/man1 -install -s -m 755 cdctl "$RPM_BUILD_ROOT/usr/local/bin" -install -m 755 LICENSE NEWS NUTSANDBOLTS PUBLICKEY README "$RPM_BUILD_ROOT/usr/doc/cdctl-$VERSION" +install -s -m 755 cdctl $RPM_BUILD_ROOT/usr/local/bin +install -m 644 cdctl.1 $RPM_BUILD_ROOT/usr/local/man/man1 %clean -rm -rf "$RPM_BUILD_ROOT" +rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,775) %doc README LICENSE NEWS NUTSANDBOLTS PUBLICKEY /usr/local/bin/cdctl - +/usr/local/man/man1/cdctl.1 %changelog +* Sun Apr 02 2000 Andy Piper <squiggle@ukgateway.net> +- Added man page to RPM package. + +* Sat Apr 01 2000 Andy Piper <squiggle@ukgateway.net> +- Modified spec file to remove redundant line and follow standards from the +HOWTO. + * Sun Mar 26 2000 Jason Spence <thalakan@technologist.com> - First spec file for cdctl.
View file
cdctl-0.16.tar.gz/cdctl.spec.in
Added
@@ -0,0 +1,62 @@ +%define name cdctl +%define version @VERSION@ +%define release 1 + +Summary: Controls your cdrom drive. +Name: %{name} +Version: %{version} +Release: %{release} +Source0: %{name}-%{version}.tar.gz +Copyright: Free for non-commercial use +Group: Applications/System +BuildRoot: %{_tmppath}/%{name}-buildroot +Prefix: %{_prefix} +URL: http://cdctl.sourceforge.net + +%description +cdctl controls your cdrom drive under Linux. It is an user-level console +application which gives the user access to the ioctl() interfaces of +the Uniform CDROM Driver of the Linux kernel. It can play audio CDs, +control the drive's tray motor, change the drive's volume levels, read +the current type of disc in the drive, and much more. + +%prep + +%setup -n cdctl + +%build +#CXXFLAGS="$RPM_OPT_FLAGS" %configure +#uname -a|grep SMP && make -j 2 || make +./configure +make + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT/usr/local/bin +mkdir -p $RPM_BUILD_ROOT/usr/local/man/man1 + +install -s -m 755 cdctl $RPM_BUILD_ROOT/usr/local/bin +install -m 644 cdctl.1 $RPM_BUILD_ROOT/usr/local/man/man1 + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,775) +%doc README LICENSE NEWS NUTSANDBOLTS PUBLICKEY + +/usr/local/bin/cdctl +/usr/local/man/man1/cdctl.1 + +%changelog +* Sun Apr 02 2000 Andy Piper <squiggle@ukgateway.net> +- Added man page to RPM package. + +* Sat Apr 01 2000 Andy Piper <squiggle@ukgateway.net> +- Modified spec file to remove redundant line and follow standards from the +HOWTO. + +* Sun Mar 26 2000 Jason Spence <thalakan@technologist.com> +- First spec file for cdctl. + +# end of file
View file
cdctl-0.15.tar.bz2/configure.in -> cdctl-0.16.tar.gz/configure.in
Changed
@@ -1,6 +1,11 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(cdctl.c) +dnl JRS: this is where THE version for cdctl is stored. +VERSION="0.16" +AC_DEFINE(VERSION, "$VERSION", The current version of cdctl) +AC_SUBST(VERSION) + dnl Checks for programs. AC_PROG_CC AC_PROG_INSTALL @@ -9,14 +14,52 @@ dnl Checks for header files. AC_HEADER_STDC -AC_CHECK_HEADERS(fcntl.h malloc.h sys/ioctl.h unistd.h) + +dnl Make sure that asm/ioctls.h comes first to catch the case that the +dnl kernel headers aren't available or are symlinked to a Linux kernel +dnl tree that hasn't been compiled yet. +AC_CHECK_HEADERS(fcntl.h malloc.h) +AC_CHECK_HEADERS(asm/ioctls.h,, + [ + echo "You probably don't have your kernel headers installed right." + echo "Look at /usr/include/asm and make sure it's pointing to" + echo "include/asm in a valid kernel source tree. You may have" + echo "to run 'make symlinks' or 'make config' to create the right" + echo "links." + exit 1 + ]) + +AC_CHECK_HEADERS(asm/cdrom.h unistd.h linux/cdrom.h linux/errno.h sys/ioctl.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST +AC_EGREP_HEADER( + struct dvd_layer, linux/cdrom.h, [ + AC_DEFINE(HAVE_DVD_IOCTLS, 1, + Define if <linux/cdrom.h> has the DVD ioctls. + ) + ] +) + dnl Checks for library functions. AC_PROG_GCC_TRADITIONAL AC_TYPE_SIGNAL AC_CHECK_FUNCS(strstr) -AC_OUTPUT(Makefile) +dnl Where to put the documentation (NEWS, INSTALL, etc.) +AC_MSG_CHECKING(where to put the documentation) +AC_ARG_WITH(docdir, + [ --with-docdir=PATH Where to put the documentation [PREFIX/doc/cdctl]], + [cdctl_cv_docdir=$withval], + [ AC_CACHE_VAL(cdctl_cv_docdir, + cdctl_cv_docdir='${prefix}/doc/cdctl' + ) + ]) +docdir=$cdctl_cv_docdir +AC_MSG_RESULT($docdir) +AC_SUBST(docdir) + +AC_CONFIG_HEADER(config.h) + +AC_OUTPUT(Makefile cdctl.spec)
View file
cdctl-0.15.tar.bz2/iso_header.c -> cdctl-0.16.tar.gz/iso_header.c
Changed
@@ -15,7 +15,7 @@ #include "cdctl.h" -/* $Id: iso_header.c,v 1.1.1.1 2000/03/27 01:06:54 thalakan Exp $ */ +/* $Id: iso_header.c,v 1.2 2000/04/11 09:19:58 thalakan Exp $ */ /* * Types of values we find in the ISO 9660 headers for struct iso_header @@ -48,12 +48,12 @@ char * s; /* s is for string */ struct iso_header_entry * current; /* current is for current entry */ struct iso_header_entry iso_header[] = { - { "First Volume Descriptor", 0x8000, 1, ISO_VOLDESC }, - { "Volume ID ", 0x8001, 6, ISO_VOLID }, - { "System ID ", 0x8008, 31, ISO_TEXT }, - { "Application ID ", 0x823e, 127, ISO_TEXT }, - { "Volume Set ID ", 0x827f, 127, ISO_TEXT }, - { "Preparer ID ", 0x81be, 127, ISO_TEXT }, + { "First Volume Descriptor", 0x8000, 1, ISO_VOLDESC }, + { "Volume ID ", 0x8001, 6, ISO_VOLID }, + { "System ID ", 0x8008, 0x1f, ISO_TEXT }, + { "Application ID ", 0x823e, 0x7f, ISO_TEXT }, + { "Volume Set ID ", 0x827f, 0x7f, ISO_TEXT }, + { "Preparer ID ", 0x81be, 0x7f, ISO_TEXT }, { NULL, 0, 0, 0 }, };
View file
cdctl-0.15.tar.bz2/version.c -> cdctl-0.16.tar.gz/version.c
Changed
@@ -1,3 +1,4 @@ +#include "config.h" /* cdctl config header */ #include <stdio.h> /* standard libs */ #ifndef _LINUX_TYPES_H @@ -21,22 +22,15 @@ * fixed in recent kernel headers. */ +static char vcid[] = "$Id: version.c,v 1.3 2001/07/31 09:07:27 thalakan Exp $\n"; + #include <linux/cdrom.h> #include "cdctl.h" -/* - * The GNU coding standards say that you're supposed to give only the program - * name and version, but I want the CVS Id as well. Linus says we should - * burn the coding standards anyway. - */ - -static char vcid[] = "$Id: version.c,v 1.1.1.1 2000/03/27 01:06:54 thalakan Exp $"; - void version(void) { printf("%s\n", VERSION); printf("%s\n", vcid); } - /* * I really wish there was a command like perl's qw// to deal with @@ -62,6 +56,9 @@ #ifdef CDROM_LOCKDOOR "-oA --lockdoor=A lOck or unlock the eject button\n" #endif +#ifdef HAVE_DVD_IOCTLS +"-n --dvdinfo Display info for DVD discs\n" +#endif "-pT --play=T Play track T\n" "-r --resume Resume playing\n" "-s --stop Stop playing\n"
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.