udf_find_file -> udf_fopen and made closer to fopen(). It also
simplifies things a little bit. Start testing.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# $Id: Makefile.am,v 1.27 2005/10/25 14:16:41 pjcreath Exp $
|
||||
# $Id: Makefile.am,v 1.28 2005/11/01 13:07:01 rocky Exp $
|
||||
#
|
||||
# Copyright (C) 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
|
||||
#
|
||||
@@ -28,7 +28,7 @@ paranoia_progs = paranoia paranoia2
|
||||
endif
|
||||
noinst_PROGRAMS = audio cdtext device drives iso1 iso2 iso3 isofuzzy \
|
||||
mmc1 mmc2 $(paranoia_progs) tracks \
|
||||
sample3 sample4 udf1
|
||||
sample3 sample4 udf1 udf2
|
||||
|
||||
INCLUDES = -I$(top_srcdir) $(LIBCDIO_CFLAGS)
|
||||
|
||||
@@ -61,6 +61,9 @@ tracks_LDADD = $(LIBCDIO_LIBS)
|
||||
udf1_DEPENDENCIES = $(LIBUDF_LIBS) $(LIBCDIO_DEPS)
|
||||
udf1_LDADD = $(LIBUDF_LIBS) $(LIBCDIO_LIBS)
|
||||
|
||||
udf2_DEPENDENCIES = $(LIBUDF_LIBS) $(LIBCDIO_DEPS)
|
||||
udf2_LDADD = $(LIBUDF_LIBS) $(LIBCDIO_LIBS)
|
||||
|
||||
|
||||
# iso programs create file "copying"
|
||||
MOSTLYCLEANFILES = copying
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: udf1.c,v 1.15 2005/11/01 03:21:04 rocky Exp $
|
||||
$Id: udf1.c,v 1.16 2005/11/01 13:07:01 rocky Exp $
|
||||
|
||||
Copyright (C) 2005 Rocky Bernstein <rocky@panix.com>
|
||||
|
||||
@@ -97,24 +97,24 @@ int
|
||||
main(int argc, const char *argv[])
|
||||
{
|
||||
udf_t *p_udf;
|
||||
char const *psz_fname;
|
||||
char const *psz_udf_image;
|
||||
|
||||
if (argc > 1)
|
||||
psz_fname = argv[1];
|
||||
psz_udf_image = argv[1];
|
||||
else
|
||||
psz_fname = UDF_IMAGE;
|
||||
psz_udf_image = UDF_IMAGE;
|
||||
|
||||
p_udf = udf_open (psz_fname);
|
||||
p_udf = udf_open (psz_udf_image);
|
||||
|
||||
if (NULL == p_udf) {
|
||||
fprintf(stderr, "Sorry, couldn't open %s as something using UDF\n",
|
||||
psz_fname);
|
||||
psz_udf_image);
|
||||
return 1;
|
||||
} else {
|
||||
udf_dirent_t *p_udf_dirent = udf_get_root(p_udf, true, 0);
|
||||
if (NULL == p_udf_dirent) {
|
||||
udf_dirent_t *p_udf_root = udf_get_root(p_udf, true, 0);
|
||||
if (NULL == p_udf_root) {
|
||||
fprintf(stderr, "Sorry, couldn't find / in %s\n",
|
||||
psz_fname);
|
||||
psz_udf_image);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ main(int argc, const char *argv[])
|
||||
|
||||
}
|
||||
|
||||
list_files(p_udf, p_udf_dirent, "");
|
||||
list_files(p_udf, p_udf_root, "");
|
||||
}
|
||||
|
||||
udf_close(p_udf);
|
||||
|
||||
Reference in New Issue
Block a user