From d25c11fbb8f9318c6415e530c803a7747b735e92 Mon Sep 17 00:00:00 2001 From: rocky Date: Thu, 2 Feb 2006 04:37:29 +0000 Subject: [PATCH] cdio_driver_return_code_to_str -> cdio_driver_errmsg --- example/udf2.c | 8 +++----- include/cdio++/cdio.hpp | 4 ++-- include/cdio/device.h | 4 ++-- lib/driver/device.c | 4 ++-- lib/driver/libcdio.sym | 2 +- 5 files changed, 10 insertions(+), 12 deletions(-) diff --git a/example/udf2.c b/example/udf2.c index 24623cdf..2eca8ceb 100644 --- a/example/udf2.c +++ b/example/udf2.c @@ -1,5 +1,5 @@ /* - $Id: udf2.c,v 1.2 2005/11/04 08:15:18 rocky Exp $ + $Id: udf2.c,v 1.3 2006/02/02 04:37:29 rocky Exp $ Copyright (C) 2005 Rocky Bernstein @@ -96,8 +96,8 @@ main(int argc, const char *argv[]) return 1; } else { udf_dirent_t *p_udf_root = udf_get_root(p_udf, true, 0); - udf_dirent_t *p_udf_file; - if (NULL == p_udf_file) { + udf_dirent_t *p_udf_file = NULL; + if (NULL == p_udf_root) { fprintf(stderr, "Sorry, couldn't find / in %s\n", psz_udf_image); return 1; @@ -105,13 +105,11 @@ main(int argc, const char *argv[]) p_udf_file = udf_fopen(p_udf_root, psz_udf_fname); print_file_info(p_udf_file, udf_get_filename(p_udf_file)); -#if 0 { char buf[2048]; udf_read_block(p_udf_file, buf, 1); printf("%s", buf); } -#endif udf_dirent_free(p_udf_file); udf_dirent_free(p_udf_root); } diff --git a/include/cdio++/cdio.hpp b/include/cdio++/cdio.hpp index b9f37318..3669e7ee 100644 --- a/include/cdio++/cdio.hpp +++ b/include/cdio++/cdio.hpp @@ -1,5 +1,5 @@ /* -*- C++ -*- - $Id: cdio.hpp,v 1.7 2006/01/25 07:21:52 rocky Exp $ + $Id: cdio.hpp,v 1.8 2006/02/02 04:37:29 rocky Exp $ Copyright (C) 2005, 2006 Rocky Bernstein @@ -49,7 +49,7 @@ public: return driver_return_code; }; const char *get_msg(void) { - return cdio_driver_return_code_to_str(driver_return_code); + return cdio_driver_errmsg(driver_return_code); }; }; diff --git a/include/cdio/device.h b/include/cdio/device.h index 4732ba16..9b385b44 100644 --- a/include/cdio/device.h +++ b/include/cdio/device.h @@ -1,5 +1,5 @@ /* -*- c -*- - $Id: device.h,v 1.31 2006/01/21 12:02:55 rocky Exp $ + $Id: device.h,v 1.32 2006/02/02 04:37:29 rocky Exp $ Copyright (C) 2005, 2006 Rocky Bernstein @@ -239,7 +239,7 @@ extern "C" { @param drc the return code you want interpreted. @return the string information about drc */ - const char *cdio_driver_return_code_to_str(driver_return_code_t drc); + const char *cdio_driver_errmsg(driver_return_code_t drc); /*! Eject media in CD drive if there is a routine to do so. diff --git a/lib/driver/device.c b/lib/driver/device.c index c35743a5..5c465627 100644 --- a/lib/driver/device.c +++ b/lib/driver/device.c @@ -1,5 +1,5 @@ /* - $Id: device.c,v 1.32 2006/02/01 00:45:45 rocky Exp $ + $Id: device.c,v 1.33 2006/02/02 04:37:29 rocky Exp $ Copyright (C) 2005, 2006 Rocky Bernstein @@ -243,7 +243,7 @@ CdIo_driver_t CdIo_all_drivers[CDIO_MAX_DRIVER+1] = { }; const char * -cdio_driver_return_code_to_str(driver_return_code_t drc) +cdio_driver_errmsg(driver_return_code_t drc) { switch(drc) { case DRIVER_OP_SUCCESS: diff --git a/lib/driver/libcdio.sym b/lib/driver/libcdio.sym index be055a5a..bc71672a 100644 --- a/lib/driver/libcdio.sym +++ b/lib/driver/libcdio.sym @@ -27,7 +27,7 @@ cdio_close_tray cdio_debug cdio_destroy cdio_driver_describe -cdio_driver_return_code_to_str +cdio_driver_errmsg cdio_eject_media cdio_eject_media_drive cdio_error