2 iso9660 - An iso9660 CDI driver with Rockridge support
3 Copyright (C) 2008 Janosch Gräf <janosch.graef@gmx.net>
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
24 #include "iso9660_cdi.h"
25 #include "iso9660def.h"
27 struct iso9660_driver
{
28 struct cdi_fs_driver drv
;
31 static struct iso9660_driver iso9660_driver
;
32 static const char* driver_name
= "iso9660";
34 static int iso9660_driver_init(struct iso9660_driver
*driver
);
35 static void iso9660_driver_destroy(struct cdi_driver
* driver
);
45 if (iso9660_driver_init(&iso9660_driver
)!=0) return -1;
46 cdi_fs_driver_register((struct cdi_fs_driver
*)&iso9660_driver
);
56 * Initializes the data structures for the iso9660 driver
58 static int iso9660_driver_init(struct iso9660_driver
*driver
) {
59 // Konstruktor der Vaterklasse
60 cdi_fs_driver_init((struct cdi_fs_driver
*)driver
);
63 driver
->drv
.drv
.name
= driver_name
;
64 driver
->drv
.fs_init
= iso9660_fs_init
;
65 driver
->drv
.fs_destroy
= iso9660_fs_destroy
;
66 driver
->drv
.drv
.destroy
= iso9660_driver_destroy
;
71 * Deinitialize the data structures for the iso9660 driver
73 static void iso9660_driver_destroy(struct cdi_driver
* driver
)
75 cdi_fs_driver_destroy((struct cdi_fs_driver
*)driver
);
79 * If DEBUG is definded, it outputs the debug message onto the stream
81 * @param fmt Format (see printf)
82 * @param ... Parameters
83 * @return Amount of output characters
85 int debug(const char *fmt
,...) {
89 int ret
= vfprintf(DEBUG
,fmt
,args
);