Commit Graph

33 Commits

Author SHA1 Message Date
rocky
9c32ef00a0 Was accessing outside of check2list causing wild looping. Turn all
sprintf's to snprintf's and check the return.

Turn check1list and check2list looping into a fixed constant number of
iterations rather than rely on a sentinal.
2008-06-25 07:46:20 +00:00
flameeyes
e4afadf511 Make checklists fit entirely in .rodata sections, by marking them constant and using an array of characters rather than a pointer to character. 2008-06-13 19:33:13 +00:00
rocky
62d7731703 Patch from Peter Hartley to allow Cross-compiling to mingw32:
- MinGW doesn't have struct timespec, so udf_time.c doesn't compile
   (changes lib/udf/udf_time.c, configure.ac, config.h.in)

 - The configure test for bitfield ordering uses AC_TRY_RUN and thus
   doesn't work when cross-compiling; use sneakiness to try and
   determine it at compile time, falling back to the existing runtime
   check if the sneakiness doesn't work
   (changes configure.ac; tested on x86_64-linux-gnu and i586-mingw32
   which are bf_lsbf=1, plus sparc64-linux-gnu which is bf_lsbf=0)

 - The configure test for "extern long timezone" needlessly uses
   AC_TRY_RUN when in fact AC_LINK_IFELSE is all we need to know, and
   that latter works when cross-compiling
   (changes configure.ac)

 - MinGW sys/stat.h doesn't have the *GRP or *OTH macros, nor S_IFLNK
   or S_IFSOCK, nor S_ISUID etc
   (changes lib/udf/udf.c and lib/iso9660/xa.c)

 - MinGW doesn't have <sys/wait.h>, so even the header-inclusion bit
   of the Linux driver doesn't compile unless it's moved inside the
   "ifdef HAVE_LINUX_CDROM"
   (changes lib/driver/gnu_linux.c)

 - Because the man pages cd-info.1 etc depend on the binaries themselves
   (for help2man reasons), the configure options --without-cd-info etc
   don't actually stop them being compiled. Fixed by only depending on
   man pages for programs that are actually built, which also stops
   the installation of man pages of programs which aren't themselves
   installed
   (changes src/Makefile.am)
2008-04-24 07:28:00 +00:00
karl
8deec6fcc9 gplv3+ 2008-04-22 15:29:11 +00:00
rocky
4b172d9cc2 netbsd.c: add more ops. Doc functions, bring more in line with other drivers. 2008-03-28 02:03:13 +00:00
rocky
e52da6ef99 lib/driver/gnu_linux.c: bug #19221 (possibly): memory Leak opening an inaccessible device.
cdchange.c: a stray character got added to the file
2007-03-07 04:35:47 +00:00
gmerlin
efc2151bc1 * Better drive detection for Linux
* cdio_add_device_list() now adds devices with symlinks only once
2006-11-27 19:31:37 +00:00
rocky
52ed17c992 gnu_linux.c: Fix bug reported by Burkhard in eject_media_linux() where
we were closing an open tray.

NEWS/README: note current changes
2006-10-21 11:38:16 +00:00
gmerlin
63d8add85e * Umount before ejecting
* Ultra simple eject command
2006-10-21 10:55:18 +00:00
rocky
bb7a5244e5 Yet another guess at what happened to the CDROMREADTOCENTRY ioctl
call.  I haven't been able to find anything that documents in any
detail how to use this ioctl let alone the weird behavior where
CDROMREADTOC header beforehand turns and "invalid parameter" into a
valid one. It's not the way other 'nix's work.
2006-08-02 11:00:31 +00:00
rocky
6a7e4c5d8f gnu_linux: get_disc_last_lsn: cdte_format seems to want to be CDROM_MSF
example/tracks.c: add a call to cdio_get_disc_last_lsn()
NEWS - note UDF limitation. correct spelling typo.
2006-07-30 13:19:49 +00:00
rocky
edc8056ec9 Clarify the difference betweeen speed as it is defined in the MMC spec
and drive unit speeds. Add a new mmc routine for the latter.
2006-04-04 02:06:12 +00:00
rocky
10b57b2ddd gnu_linux: Use internal routine to set the speed.
mmc.c: add more debug_ variables for new enums and extern vars in mmc.h
set speed is in the write direction not read
2006-04-03 19:31:18 +00:00
rocky
49bc5ccb3f Security: replace all uses of strcat and strcpy with strncat and strncpy 2006-03-18 00:53:20 +00:00
rocky
2f8e8b9529 Was giving a failure status on eject when it succeeded. The failure
was because ioctl(fd, BLKRRPART) didn't succeed. Turn this into a
cdio_info warning instead.
2005-11-07 07:41:29 +00:00
rocky
fa0848bf90 Try to regularize naming better. More mmc_ -> cdio_mmc_
Add more debug variables to be able to get at enum values in a debugger.
2005-10-21 11:13:54 +00:00
rocky
342d42412a Ooops -- syntax error. 2005-07-23 22:05:29 +00:00
rocky
a42209123c Doc changes. 2005-07-23 21:39:18 +00:00
rocky
8f154dc75d Remove gcc 4 warning 2005-07-07 06:53:04 +00:00
rocky
cb9abde2e4 Remove a valgrind-caught memory leak. 2005-06-07 23:41:38 +00:00
rocky
320c9bd55f Patch from Burkhard Plaum:
1. In the function is_cdrom_linux(...) in the file lib/driver/gnu_linux.c,
   the CDROMREADTOCHDR ioctl gets called, which fails when the drive is
   empty. The CDROM_GET_CAPABILITY ioctl always succeeds for CDrom drives
   and fails for hard disks etc.

2. For some reason, at least my (GNU/Linux 2.6.10) Kernel fails to
   open empty drives, when only O_RDONLY is used. Changing the open flag to
   O_RDONLY|O_NONBLOCK, the call succeeds also for emtpy drives.
   By the way, the cdrom header file in the kernel says explicitely,
   that O_RDONLY|O_NONBLOCK should used whenever a cdrom is touched.

rocky: also made a change to eject to continue even if we can't get
the drive status -- which we can't with an empty CD-ROM drive.
2005-04-23 01:16:19 +00:00
rocky
7f0c18e0ab freebsd.c: forgot initialization.
correct one of the doxygen comments.
2005-03-29 12:00:23 +00:00
rocky
d5221e901f Revise so audio subchannel msf is msf_t (BCD encoded). 2005-03-19 16:17:13 +00:00
rocky
af71247d66 Remove duplicate open on CD. Some warnings turned into info
messages. Remove unnecessary \n's.
2005-03-15 12:11:53 +00:00
rocky
8aaeb8d71c read_subchannel sets format MSF. So caller no longer has to. 2005-03-15 04:16:17 +00:00
rocky
2b53fd1f60 Possibly Solaris close tray fixes. 2005-03-08 04:10:36 +00:00
rocky
068120281b Start of a working close_tray routine.
Add another routines which returns driver id to help reduce driver scans.
Reduce unneeded driver scanning my skipping DRIVER_UNKNOWN.
2005-03-07 07:23:52 +00:00
rocky
c082cedeba solaris: add audio stop
gnu_linux.c: correct comment.
2005-03-06 22:53:50 +00:00
rocky
1fe287e813 More audio control corrections. 2005-03-06 11:21:52 +00:00
rocky
3e84283fa8 Don't rely on compatability with 0.72. Use new type names. 2005-03-06 00:03:53 +00:00
rocky
b0f8934073 get_last_session returns lsn_t not session number.
Add get_track_last_session for Solaris. Correct it's play_msf.
2005-03-05 10:48:41 +00:00
rocky
822a203ba8 Add API routine to get last session number. 2005-03-05 10:10:16 +00:00
rocky
d76eddad1b Revise play_audio_msf for start/end as it should be.
_cdio_*driver*.c -> *driver*.c
2005-03-05 09:26:52 +00:00