[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libcdio-devel] CD_MSF_FORMAT vs LBA on NetBSD

From: Thomas Schmitt
Subject: Re: [Libcdio-devel] CD_MSF_FORMAT vs LBA on NetBSD
Date: Sun, 09 Dec 2018 17:57:20 +0100


> To clarify, before the fix I posted in my previous email:

So was the shown cd-info result from the intermediate state before
(Pity, i had it in mind as reason for the cdparanoia complaint.)

But why then didn't this yield an error message ?
  TOTAL_TRACKS + 1 = 6, first_track = 7 , 
  so track_num < first_track
which should have caused get_track_msf_netbsd() to return

So this error indication gets lost on its way to cd-info.c ?

Well, its a bit more off the road. In src/cd-info.c i read:

    if (!cdio_get_track_msf(p_cdio, i, &msf)) {
      err_exit("cdio_track_msf for track %i failed, I give up.\n", i);

lib/driver/track.c has
  if (p_cdio->op.get_track_msf) {
    return p_cdio->op.get_track_msf (p_cdio->env, u_track, msf);

and netbsd.c has

  static cdio_funcs_t _funcs = {
     .get_track_msf = get_track_msf_netbsd,

which returns in the case of bad track number neither "true" nor "false",

include/cdio/track.h :
   extern enum cdio_track_enums {
      CDIO_INVALID_TRACK       = 0xFF, /* ... */

  #define true 1
  #define false 0


So get_track_msf_netbsd() must not return CDIO_INVALID_TRACK but rather
false in case of error.

Alternatively cdio_get_track_msf() could check for values other than
true and false. But CDIO_INVALID_TRACK seems to be intended as pseudo-
track number, not as success indicator. Further get_track_msf_netbsd()
is indeed declared as "bool".

Have a nice day :)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]