示例#1
0
/*!
   Return the size of the CD in logical block address (LBA) units.
  @return the lsn. On error return CDIO_INVALID_LSN.
 */
static lsn_t 
get_disc_last_lsn_freebsd (void *p_obj)
{
  _img_private_t *p_env = p_obj;

  if (!p_env) return CDIO_INVALID_LSN;

  if (_AM_CAM == p_env->access_mode) 
    return get_disc_last_lsn_mmc(p_env);
  else 
    return get_disc_last_lsn_freebsd_ioctl(p_env);
}
示例#2
0
/*!
   Return the size of the CD in logical block address (LBA) units.
  @return the lsn. On error return CDIO_INVALID_LSN.
 */
static lsn_t
get_disc_last_lsn_freebsd (void *p_obj)
{
  _img_private_t *p_env = p_obj;

  if (!p_env) return CDIO_INVALID_LSN;

  switch (p_env->access_mode) {
    case _AM_CAM:
    case _AM_MMC_RDWR:
    case _AM_MMC_RDWR_EXCL:
      return get_disc_last_lsn_mmc(p_env);
    case _AM_IOCTL:
      return get_disc_last_lsn_freebsd_ioctl(p_env);
    case _AM_NONE:
      cdio_info ("access mode not set");
      return DRIVER_OP_ERROR;
  }
  return DRIVER_OP_ERROR;
}