Compare commits
23 Commits
release-0.
...
release-0.
Author | SHA1 | Date | |
---|---|---|---|
386ce0e60a | |||
9fe4172f0d | |||
61f2cdd02b | |||
f87c63da41 | |||
afebbe187d | |||
3951df25be | |||
4b0f175a89 | |||
633a8ada9e | |||
ce723a8c39 | |||
83ace3b486 | |||
23d3c43022 | |||
00470cbfea | |||
4c1abdf2bd | |||
f7842518fb | |||
d756551385 | |||
ced02f5903 | |||
819e3218f6 | |||
c874a159e2 | |||
a68e108333 | |||
da23a8166c | |||
cbb376a137 | |||
3852621bc0 | |||
0ff4cb34ed |
@ -1,12 +1,12 @@
|
||||
Vreixo Formoso <metalpain2002@yahoo.es>,
|
||||
Mario Danic <mario.danic@gmail.com>,
|
||||
Thomas Schmitt <scdbackup@gmx.net>
|
||||
Copyright (C) 2007-2008 Vreixo Formoso, Mario Danic, Thomas Schmitt
|
||||
Copyright (C) 2007-2010 Vreixo Formoso, Mario Danic, Thomas Schmitt
|
||||
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License version 2 as
|
||||
published by the Free Software Foundation.
|
||||
it under the terms of the GNU General Public License version 2 or later
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
|
260
README
260
README
@ -4,15 +4,17 @@
|
||||
|
||||
Released under GPL (see COPYING file for details).
|
||||
|
||||
Copyright (C) 2008 Vreixo Formoso, Mario Danic, Thomas Schmitt
|
||||
Copyright (C) 2008 - 2010 Vreixo Formoso, Mario Danic, Thomas Schmitt
|
||||
|
||||
libisofs is part of the libburnia project (libburnia-project.org)
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
libisofs is a library to create an ISO-9660 filesystem, and supports extensions
|
||||
like RockRidge or Joliet. It is also a full featured ISO-9660 editor, allowing
|
||||
you to modify an ISO image or multisession disc, including file addition and
|
||||
removal, change of file names and attributes, etc
|
||||
libisofs is a library to create an ISO-9660 filesystem, supports extensions
|
||||
like RockRidge or Joliet, and introduces an own extension AAIP.
|
||||
It is a full featured ISO-9660 editor which composes and changes the directory
|
||||
tree of an ISO image. This tree and its newly imported data file contents get
|
||||
then written as independent single-session image or as add-on session for the
|
||||
image from where the tree was originally loaded.
|
||||
|
||||
Features:
|
||||
---------
|
||||
@ -20,24 +22,45 @@ Features:
|
||||
- Image creation
|
||||
- Creates ISO-9660 images from local files.
|
||||
- Support for RockRidge and Joliet extensions.
|
||||
- Support for ISO-9660:1999 (version 2)
|
||||
- Support for ISO-9660:1999 (version 2).
|
||||
- Support for El-Torito bootable images.
|
||||
- Full featured edition of file names and attributes on the image.
|
||||
- Several options to relax ISO-9660 constraints.
|
||||
- Special options for images intended for distribution (suitable default
|
||||
modes for files, hiding of real timestamps...)
|
||||
- Multisession
|
||||
- Support for growing an existing image
|
||||
- Support for multi-extent data files up to 400 GB (level 3).
|
||||
- Full-featured edition of the image files, including: addition of new
|
||||
files, removing of existent files, moving files, renaming files,
|
||||
change file attributes (permissions, timestamps...)
|
||||
- Support for "emulated multisession" or image growing, suitable for non
|
||||
multisession media such as DVD+RW
|
||||
- Optional recording per file of non-ISO 9660 features:
|
||||
ACL, xattr, content MD5, hard link relations.
|
||||
They do not hamper image readability by operating systems but can be
|
||||
retrieved only via libisofs.
|
||||
- Optional zisofs compression, gzip compression, external filter
|
||||
processes.
|
||||
- Several options to relax ISO-9660 constraints.
|
||||
- Special options for images intended for distribution (suitable
|
||||
default modes for files, hiding of real timestamps...).
|
||||
- Image reading
|
||||
- Image tree and data heap can be verified by stream reading and
|
||||
eventually recorded MD5 tags.
|
||||
- Directory tree and file attributes of ISO 9660 session get loaded
|
||||
into memory for editing or for extraction into local filesystem.
|
||||
- File content can be read by applications.
|
||||
- Automatic zisofs decompression.
|
||||
- Optional application of gzip decompression or external filter
|
||||
processes.
|
||||
- Eventually recorded MD5 of data file can be obtained, MD5 of data
|
||||
stream can be computed and compared.
|
||||
- Helper functions for restoring ACL and/or xattr to the local
|
||||
filesystem.
|
||||
- Multisession
|
||||
- Support for growing an existing image on multi-session media.
|
||||
- Support for "emulated multisession" on overwriteable media such as
|
||||
DVD+RW, USB sticks, regular files.
|
||||
- Support for blindly prepared add-on sessions (mkisofs style -M -C)
|
||||
suitable for pipes which lead to an external burn program.
|
||||
- Image modification
|
||||
- It can create a completely new image from files on another image.
|
||||
- Full-featured edition of image contents
|
||||
- Creates a completely new image from files out of another image and
|
||||
eventual editing operations. Suitable for any target medium.
|
||||
- Others
|
||||
- Handling of different input and output charset
|
||||
- Handling of different input and output charset.
|
||||
- Good integration with libburn for image burning.
|
||||
- Reliable, good handling of different kind of errors.
|
||||
|
||||
@ -56,9 +79,8 @@ a) Images with unsupported features, such as:
|
||||
- UDF.
|
||||
- HSF/HFS+ or other Mac extensions.
|
||||
- El-Torito with multiple entries.
|
||||
- ECMA-119 with extended attributes, multiple extends per file.
|
||||
- ECMA-119 with extended attributes.
|
||||
- Non El-Torito boot info.
|
||||
- zisofs compressed images.
|
||||
- ...
|
||||
In all these cases, the resulting new image (or new session) could lack some
|
||||
features of the original image.
|
||||
@ -123,178 +145,11 @@ To make the libraries accessible for running resp. developing applications
|
||||
See INSTALL file for further details.
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Overview of libburnia-project.org
|
||||
|
||||
libburnia-project.org is an open-source software project for reading, mastering
|
||||
and writing optical discs.
|
||||
For now this means only CD media and all single layer DVD media except DVD+R.
|
||||
|
||||
The project comprises of several more or less interdependent parts which
|
||||
together strive to be a usable foundation for application development.
|
||||
These are libraries, language bindings, and middleware binaries which emulate
|
||||
classical (and valuable) Linux tools.
|
||||
|
||||
Our scope is currently Linux 2.4 and 2.6 only. For ports to other systems
|
||||
we would need : login on a development machine resp. a live OS on CD or DVD,
|
||||
advise from a system person about the equivalent of Linux sg or FreeBSD CAM,
|
||||
volunteers for testing of realistic use cases.
|
||||
|
||||
We have a workable code base for burning CD and most single layer DVD.
|
||||
The burn API is quite comprehensively documented and can be used to build a
|
||||
presentable application.
|
||||
We have a functional binary which emulates parts of cdrecord in order to
|
||||
prove that usability, and in order to allow you to explore libburnia's scope
|
||||
by help of existing cdrecord frontends.
|
||||
|
||||
The project components (list subject to growth, hopefully):
|
||||
|
||||
- libburn is the library by which preformatted data get onto optical media.
|
||||
It uses either /dev/sgN (e.g. on kernel 2.4 with ide-scsi) or
|
||||
/dev/hdX (e.g. on kernel 2.6).
|
||||
libburn is the foundation of our cdrecord emulation. Its code is
|
||||
independent of cdrecord. Its DVD capabilities are learned from
|
||||
studying the code of dvd+rw-tools and MMC-5 specs. No code but only
|
||||
the pure SCSI knowledge has been taken from dvd+rw-tools, though.
|
||||
|
||||
- libisofs is the library to pack up hard disk files and directories into a
|
||||
ISO 9660 disk image. This may then be brought to media via libburn.
|
||||
libisofs is to be the foundation of our upcoming mkisofs emulation.
|
||||
|
||||
- cdrskin is a limited cdrecord compatibility wrapper for libburn.
|
||||
Cdrecord is a powerful GPL'ed burn program included in Joerg
|
||||
Schilling's cdrtools. cdrskin strives to be a second source for
|
||||
the services traditionally provided by cdrecord. Additionally it
|
||||
provides libburn's DVD capabilities, where only -sao is compatible
|
||||
with cdrecord.
|
||||
cdrskin does not contain any bytes copied from cdrecord's sources.
|
||||
Many bytes have been copied from the message output of cdrecord
|
||||
runs, though.
|
||||
See cdrskin/README and man cdrskin/cdrskin.1 for more.
|
||||
|
||||
- test is a collection of application gestures and examples given by the
|
||||
authors of the library features. The main API example for libburn
|
||||
is test/libburner.c .
|
||||
Explore these examples if you look for inspiration.
|
||||
|
||||
We plan to be a responsive upstream. Bear with us. We are still practicing.
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
Project history as far as known to me:
|
||||
|
||||
- Founded in 2002 as it seems. See mailing list archives
|
||||
http://lists.freedesktop.org/archives/libburn/
|
||||
The site of this founder team is reachable and offers download of a
|
||||
(somewhat outdated) tarball and from CVS :
|
||||
http://icculus.org/burn/
|
||||
Copyright holders and most probably founders:
|
||||
Derek Foreman and Ben Jansens.
|
||||
|
||||
- I came to using libburn in 2005. Founded the cdrskin project and submitted
|
||||
necessary patches which were accepted or implemented better. Except one
|
||||
remaining patch which prevented cdrskin from using vanilla libburn from CVS.
|
||||
The cdrskin project site is reachable and offers download of the heavily
|
||||
patched (elsewise outdated) tarball under the name cdrskin-0.1.2 :
|
||||
http://scdbackup.sourceforge.net/cdrskin_eng.html
|
||||
It has meanwhile moved to use vanilla libburn.pykix.org , though.
|
||||
Version 0.1.4 constitutes the first release of this kind.
|
||||
|
||||
- In July 2006 our team mate Mario Danic announced a revival of libburn
|
||||
which by about nearly everybody else was perceived as unfriendly fork.
|
||||
Derek Foreman four days later posted a message which expressed his
|
||||
discontent.
|
||||
The situation first caused me to publically regret it and then - after i
|
||||
got the opportunity to move in with cdrskin - gave me true reason to
|
||||
personally apologize to Derek Foreman, Ben Jansens and the contibutors at
|
||||
icculus.org/burn. Posted to both projects:
|
||||
http://lists.freedesktop.org/archives/libburn/2006-August/000446.html
|
||||
http://mailman-mail1.webfaction.com/pipermail/libburn-hackers/2006-August/000024.html
|
||||
|
||||
- Mid August 2006 project cdrskin established a branch office in
|
||||
libburn.pykix.org so that all maintainers of our tools have one single place
|
||||
to get the current (at least slightely) usable coordinated versions of
|
||||
everything.
|
||||
Project cdrskin will live forth independendly for a while but it is committed
|
||||
to stay in sync with libburn.pykix.org (or some successor, if ever).
|
||||
cdrskin is also committed to support icculus.org/burn if the pending fork
|
||||
is made reality by content changes in that project. It will cease to maintain
|
||||
a patched version of icculus.org/burn though. Precondition for a new
|
||||
release of cdrskin on base of icculus.org/burn would be the pending
|
||||
"whitelist patch" therefore.
|
||||
I would rather prefer if both projects find consense and merge, or at least
|
||||
cooperate. I have not given up hope totally, yet.
|
||||
I, personally, will honor any approach.
|
||||
|
||||
- 2nd September 2006 the decision is made to strive for a consolidation of
|
||||
copyright and a commitment to GPL in a reasonable and open minded way.
|
||||
This is to avoid long term problems with code of unknown origin and
|
||||
with finding consense among the not so clearly defined group of copyright
|
||||
claimers and -holders.
|
||||
libisofs is already claimed sole copyright Mario Danic.
|
||||
cdrskin and libburner are already claimed sole copyright Thomas Schmitt.
|
||||
Rewrites of other components will follow and concluded by claiming full
|
||||
copyright within the group of libburn.pykix.org-copyright holders.
|
||||
|
||||
- 16th September 2006 feature freeze for release of libburn-0.2.2 .
|
||||
|
||||
- 20th September 2006 release of libburn-0.2.2 .
|
||||
|
||||
- 26th October 2006 feature freeze for cdrskin-0.2.4 based on libburn-0.2.3 .
|
||||
This version of cdrskin is much more cdrecord compatible in repect
|
||||
to drive addressing and audio features.
|
||||
|
||||
- 30th October 2006 release of cdrskin-0.2.4 .
|
||||
|
||||
- 13th November 2006 splitting releases of libburn+cdrskin from libisofs.
|
||||
|
||||
- 24th November 2006 release of libburn-0.2.6 and cdrskin-0.2.6 . cdrskin has
|
||||
become suitable for unaware frontends as long as they perform only the core
|
||||
of cdrecord use cases (including open-ended input streams, audio, and
|
||||
multi-session).
|
||||
|
||||
- 28th November 2006 the umbrella project which encloses both, libisofs and
|
||||
libburn, is now called libburnia. For the origin of this name, see
|
||||
http://en.wikipedia.org/wiki/Liburnians .
|
||||
|
||||
- 16th January 2007 release of libburn-0.3.0 and cdrskin-0.3.0 . Now the scope
|
||||
is widened to a first class of DVD media: overwriteable single layer types
|
||||
DVD-RAM, DVD+RW, DVD-RW. This is not a cdrecord emulation but rather inspired
|
||||
by dvd+rw-tools' "poor man" writing facility for this class of media.
|
||||
Taking a bow towards Andy Polyakov.
|
||||
|
||||
- 11th February 2007 version 0.3.2 covers sequential DVD-RW and DVD-R with
|
||||
multi-session and with DAO.
|
||||
|
||||
- 12th March 2007 version 0.3.4 supports DVD+R and thus covers all single layer
|
||||
DVD media. Code for double layer DVD+/-R is implemented but awaits a tester
|
||||
yet.
|
||||
|
||||
- 23th April 2007 version 0.3.6 follows the unanimous opinion of Linux kernel
|
||||
people that one should not use /dev/sg on kernel 2.6.
|
||||
|
||||
- 31st July 2007 version 0.3.8 marks the first anniversary of libburn revival.
|
||||
We look back on improved stability, a substantially extended list of media
|
||||
and write modes, and better protection against typical user mishaps.
|
||||
|
||||
- 24th October 2007 version 0.4.0 is the foundation of new library libisoburn
|
||||
and an upcomming integrated application for manipulating and writing
|
||||
ISO 9660 + Rock Ridge images. cdrskin-0.4.0 got capabilities like growisofs
|
||||
by these enhancements: growing of overwriteable media and disk files.
|
||||
Taking again a bow towards Andy Polyakov.
|
||||
|
||||
- 26th Januar 2008 version 0.4.2 rectifies the version numbering so that we
|
||||
reliably release libburn.so.4 as should have been done since libburn-0.3.2.
|
||||
cdrskin now is by default linked dynamically and does a runtime check
|
||||
to ensure not to be started with a libburn which is older than itself.
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation. To be exact: version 2 of that License.
|
||||
it under the terms of the GNU General Public License version 2 or later
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -309,19 +164,19 @@ Project history as far as known to me:
|
||||
Clarification in my name and in the name of Mario Danic, upcoming copyright
|
||||
holders on toplevel of libburnia. To be fully in effect after the remaining
|
||||
other copyrighted code has been replaced by ours and by copyright-free
|
||||
contributions of our friends:
|
||||
contributions of our friends.
|
||||
|
||||
Note:
|
||||
In the particular case of libisofs there is no foreign copyright involved.
|
||||
As of 2010 foreign copyright is only in component libburn.
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
We, the copyright holders, agree on the interpretation that
|
||||
dynamical linking of our libraries constitutes "use of" and
|
||||
not "derivation from" our work in the sense of GPL, provided
|
||||
those libraries are compiled from our unaltered code.
|
||||
|
||||
Thus you may link our libraries dynamically with applications
|
||||
which are not under GPL. You may distribute our libraries and
|
||||
application tools in binary form, if you fulfill the usual
|
||||
condition of GPL to offer a copy of the source code -altered
|
||||
or unaltered- under GPL.
|
||||
We will not raise any legal protest to dynamic linking of our libraries
|
||||
with applications that are not under GPL, as long as they fulfill
|
||||
the condition of offering the library source code used, whether
|
||||
altered or unaltered, under the GPLv2+, along with the application.
|
||||
Nevertheless, the safest legal position is not to link libburn with
|
||||
non-GPL compatible programs.
|
||||
|
||||
We ask you politely to use our work in open source spirit
|
||||
and with the due reference to the entire open source community.
|
||||
@ -335,7 +190,10 @@ It is the open source idea of responsible freedom which will be
|
||||
decisive and you will have to prove that you exhausted all own
|
||||
means to qualify for GPL.
|
||||
|
||||
For now we are firmly committed to maintain one single license: GPL.
|
||||
We are firmly committed to allow GPLv2+ now and with future releases.
|
||||
|
||||
signed: Mario Danic, Thomas Schmitt
|
||||
Signed: Mario Danic, Thomas Schmitt
|
||||
Agreement joined later by: Vreixo Formoso
|
||||
|
||||
Public contact: <libburn-hackers@pykix.org>
|
||||
|
||||
|
11
acinclude.m4
11
acinclude.m4
@ -1,3 +1,14 @@
|
||||
AC_DEFUN([LIBBURNIA_SET_FLAGS],
|
||||
[
|
||||
case $target_os in
|
||||
freebsd*)
|
||||
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
||||
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([TARGET_SHIZZLE],
|
||||
[
|
||||
ARCH=""
|
||||
|
20
configure.ac
20
configure.ac
@ -1,10 +1,12 @@
|
||||
AC_INIT([libisofs], [0.6.24], [http://libburnia-project.org])
|
||||
AC_INIT([libisofs], [0.6.28], [http://libburnia-project.org])
|
||||
AC_PREREQ([2.50])
|
||||
dnl AC_CONFIG_HEADER([config.h])
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
AC_CANONICAL_TARGET
|
||||
|
||||
LIBBURNIA_SET_FLAGS
|
||||
|
||||
AM_INIT_AUTOMAKE([subdir-objects])
|
||||
|
||||
dnl A61101 This breaks Linux build (makes 32 bit off_t)
|
||||
@ -44,7 +46,7 @@ dnl If LIBISOFS_*_VERSION changes, be sure to change AC_INIT above to match.
|
||||
dnl
|
||||
LIBISOFS_MAJOR_VERSION=0
|
||||
LIBISOFS_MINOR_VERSION=6
|
||||
LIBISOFS_MICRO_VERSION=24
|
||||
LIBISOFS_MICRO_VERSION=28
|
||||
LIBISOFS_VERSION=$LIBISOFS_MAJOR_VERSION.$LIBISOFS_MINOR_VERSION.$LIBISOFS_MICRO_VERSION
|
||||
|
||||
AC_SUBST(LIBISOFS_MAJOR_VERSION)
|
||||
@ -54,11 +56,11 @@ AC_SUBST(LIBISOFS_VERSION)
|
||||
|
||||
dnl Libtool versioning
|
||||
LT_RELEASE=$LIBISOFS_MAJOR_VERSION.$LIBISOFS_MINOR_VERSION
|
||||
# 2009.10.08 development jump has not yet happened
|
||||
# SONAME = 26 - 20 = 6 . Library name = libisofs.6.20.0
|
||||
LT_CURRENT=26
|
||||
# 2010.02.10 development jump has not yet happened
|
||||
# SONAME = 30 - 24 = 6 . Library name = libisofs.6.24.0
|
||||
LT_CURRENT=30
|
||||
LT_AGE=24
|
||||
LT_REVISION=0
|
||||
LT_AGE=20
|
||||
LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
|
||||
|
||||
AC_SUBST(LT_RELEASE)
|
||||
@ -196,9 +198,11 @@ AC_ARG_ENABLE(zlib,
|
||||
if test "x$enable_zlib" = xyes; then
|
||||
dnl Check whether there is the header for zlib.
|
||||
dnl If not, erase this macro which would enable use of compress2() and others.
|
||||
dnl The empty parameter after "compress2" causes -lz.
|
||||
dnl Linking fails on SuSE 9.0 because zlib has compress2() but lacks
|
||||
dnl compressBound(). So compressBound is the more modern thing to test.
|
||||
dnl The empty parameter after "compressBound" causes -lz.
|
||||
ZLIB_DEF="-DLibisofs_with_zliB"
|
||||
AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, compress2, , ZLIB_DEF= ), ZLIB_DEF= )
|
||||
AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, compressBound, , ZLIB_DEF= ), ZLIB_DEF= )
|
||||
else
|
||||
ZLIB_DEF=
|
||||
fi
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2007 Vreixo Formoso
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#include "libisofs.h"
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2007 Vreixo Formoso
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#include "libisofs.h"
|
||||
|
11
demo/demo.c
11
demo/demo.c
@ -3,9 +3,9 @@
|
||||
* Copyright (c) 2007 - 2009 Vreixo Formoso, Thomas Schmitt
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
*
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
static char helptext[][80] = {
|
||||
@ -65,6 +65,11 @@ static char helptext[][80] = {
|
||||
#include <fcntl.h>
|
||||
#include <err.h>
|
||||
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX Libisofs_default_path_maX
|
||||
#endif
|
||||
|
||||
|
||||
/* ------------------------- from demo/tree.c ----------------------- */
|
||||
|
||||
static void
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2007 Vreixo Formoso
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -10,6 +10,12 @@
|
||||
|
||||
#include "libisofs.h"
|
||||
|
||||
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX Libisofs_default_path_maX
|
||||
#endif
|
||||
|
||||
|
||||
static void
|
||||
print_permissions(mode_t mode)
|
||||
{
|
||||
|
11
demo/lsl.c
11
demo/lsl.c
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2007 Vreixo Formoso
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#include "libisofs.h"
|
||||
@ -13,6 +14,12 @@
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
|
||||
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX Libisofs_default_path_maX
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Little test program to test filesystem implementations.
|
||||
*
|
||||
|
@ -59,7 +59,7 @@ Entry number N + 1 holds the MD5 checksum of entries 0 to N.
|
||||
|
||||
Because the inquiry of AAIP attributes demands loading of the image tree,
|
||||
there are also checksum tags which can be detected on the fly when reading
|
||||
and checksumming the session from the start point as learned from a media
|
||||
and checksumming the session from its start point as learned from a media
|
||||
table-of-content.
|
||||
|
||||
The superblock checksum tag is written after the ECMA-119 volume descriptors.
|
||||
@ -79,7 +79,7 @@ Tag_id distinguishes the following tag types
|
||||
"libisofs_checksum_tag_v1" Session tag
|
||||
|
||||
A relocated superblock may appear at LBA 0 of an image which was produced for
|
||||
being stored in a disk file or on overwriteable media (e.g. DVD+R, BD-RE).
|
||||
being stored in a disk file or on overwriteable media (e.g. DVD+RW, BD-RE).
|
||||
Typically there is a first session recorded with a superblock at LBA 32 and
|
||||
the next session may follow shortly after its session tag. (Typically at the
|
||||
next block address which is divisible by 32.) Normally no session starts after
|
||||
@ -280,3 +280,28 @@ to iso_image_import() when reading the image. If this source is associated
|
||||
to a libburn drive, then libburn function burn_read_data() can read directly
|
||||
from it.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
scdbackup Checksum Tags
|
||||
|
||||
The session checksum tag does not occupy its whole block. So there is room to
|
||||
store a scdbackup stream checksum tag, which is an ancestor format of the tags
|
||||
described here. This feature allows scdbackup to omit its own checksum filter
|
||||
if using xorriso as ISO 9660 formatter program.
|
||||
Such a tag makes only sense if the session begins at LBA 0.
|
||||
|
||||
See scdbackup-*/README, appendix VERIFY for a specification.
|
||||
|
||||
Example of a scdbackup checksum tag:
|
||||
scdbackup_checksum_tag_v0.1 2456606865 61 2_2 B00109.143415 2456606865 485bbef110870c45754d7adcc844a72c c2355d5ea3c94d792ff5893dfe0d6d7b
|
||||
|
||||
The tag is located at byte position 2456606865, contains 61 bytes of scdbackup
|
||||
checksum record (the next four words):
|
||||
Name of the backup volume is "2_2".
|
||||
Written in year B0 = 2010 (A9 = 2009, B1 = 2011), January (01), 9th (09),
|
||||
14:34:15 local time.
|
||||
The size of the volume is 2456606865 bytes, which have a MD5 sum of
|
||||
485bbef110870c45754d7adcc844a72c.
|
||||
The checksum of "2_2 B00109.143415 2456606865 485bbef110870c45754d7adcc844a72c"
|
||||
is c2355d5ea3c94d792ff5893dfe0d6d7b.
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifndef Libisofs_with_aaip_acL
|
||||
/* It seems ACL is fixely integrated in FreeBSD libc. There is no libacl. */
|
||||
@ -37,13 +38,14 @@
|
||||
finally has to be freed by a call to this function
|
||||
with bit15 of flag.
|
||||
@param flag Bitfield for control purposes
|
||||
bit0= obtain default ACL rather than access ACL
|
||||
(bit0= obtain default ACL rather than access ACL)
|
||||
bit4= set *text = NULL and return 2
|
||||
if the ACL matches st_mode permissions.
|
||||
bit5= in case of symbolic link: inquire link target
|
||||
bit15= free text and return 1
|
||||
@return > 0 ok
|
||||
0 ACL support not enabled at compile time
|
||||
or filesystem does not support ACL
|
||||
-1 failure of system ACL service (see errno)
|
||||
-2 attempt to inquire ACL of a symbolic
|
||||
link without bit4 or bit5
|
||||
@ -88,8 +90,18 @@ int aaip_get_acl_text(char *path, char **text, int flag)
|
||||
|
||||
acl= acl_get_file(path, ACL_TYPE_ACCESS);
|
||||
|
||||
if(acl == NULL)
|
||||
if(acl == NULL) {
|
||||
if(errno == EOPNOTSUPP) {
|
||||
/* filesystem does not support ACL */
|
||||
if(flag & 16)
|
||||
return(2);
|
||||
|
||||
/* >>> ??? fake ACL from POSIX permissions ? */;
|
||||
|
||||
return(0);
|
||||
}
|
||||
return(-1);
|
||||
}
|
||||
*text= acl_to_text(acl, NULL);
|
||||
acl_free(acl);
|
||||
|
||||
@ -181,10 +193,8 @@ int aaip_get_attr_list(char *path, size_t *num_attrs, char ***names,
|
||||
|
||||
if(flag & 1) { /* Obtain ACL */
|
||||
/* access-ACL */
|
||||
ret= aaip_get_acl_text(path, &acl_text, flag & (16 | 32));
|
||||
if(ret <= 0)
|
||||
goto ex;
|
||||
if(ret == 2)
|
||||
aaip_get_acl_text(path, &acl_text, flag & (16 | 32));
|
||||
if(acl_text == NULL)
|
||||
{ret= 1; goto ex;} /* empty ACL / only st_mode info was found in ACL */
|
||||
ret= aaip_encode_acl(acl_text, (mode_t) 0, &a_acl_len, &a_acl, flag & 2);
|
||||
if(ret <= 0)
|
||||
|
@ -18,6 +18,8 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
||||
#ifdef Libisofs_with_aaip_acL
|
||||
#include <sys/acl.h>
|
||||
@ -46,6 +48,7 @@
|
||||
2 only st_mode permissions exist and bit 4 is set
|
||||
or empty ACL and bit0 is set
|
||||
0 ACL support not enabled at compile time
|
||||
or filesystem does not support ACL
|
||||
-1 failure of system ACL service (see errno)
|
||||
-2 attempt to inquire ACL of a symbolic link without
|
||||
bit4 or bit5 resp. with no suitable link target
|
||||
@ -79,8 +82,18 @@ int aaip_get_acl_text(char *path, char **text, int flag)
|
||||
}
|
||||
|
||||
acl= acl_get_file(path, (flag & 1) ? ACL_TYPE_DEFAULT : ACL_TYPE_ACCESS);
|
||||
if(acl == NULL)
|
||||
if(acl == NULL) {
|
||||
if(errno == ENOTSUP) {
|
||||
/* filesystem does not support ACL */
|
||||
if(flag & 16)
|
||||
return(2);
|
||||
|
||||
/* >>> ??? fake ACL from POSIX permissions ? */;
|
||||
|
||||
return(0);
|
||||
}
|
||||
return(-1);
|
||||
}
|
||||
*text= acl_to_text(acl, NULL);
|
||||
acl_free(acl);
|
||||
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2007 Vreixo Formoso
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2007 Vreixo Formoso
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#ifndef LIBISO_BUFFER_H_
|
||||
|
@ -3,8 +3,9 @@
|
||||
* Copyright (c) 2009 Thomas Schmitt
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
/* libisofs.h defines aaip_xinfo_func */
|
||||
@ -21,6 +22,11 @@
|
||||
#include <limits.h>
|
||||
|
||||
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX Libisofs_default_path_maX
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
void iso_node_builder_ref(IsoNodeBuilder *builder)
|
||||
{
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2007 Vreixo Formoso
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#ifndef LIBISO_BUILDER_H_
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2007 Vreixo Formoso
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#include "libisofs.h"
|
||||
|
@ -4,8 +4,9 @@
|
||||
* Copyright (c) 2009 Thomas Schmitt
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -923,7 +924,12 @@ void *write_function(void *arg)
|
||||
#endif
|
||||
|
||||
iso_ring_buffer_writer_close(target->buffer, 0);
|
||||
|
||||
#ifdef Libisofs_with_pthread_exiT
|
||||
pthread_exit(NULL);
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
write_error: ;
|
||||
if (res == ISO_CANCELED) {
|
||||
@ -938,12 +944,19 @@ void *write_function(void *arg)
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
/* Transplant checksum buffer from Ecma119Image to IsoImage */
|
||||
/* Transplant checksum buffer away from Ecma119Image */
|
||||
transplant_checksum_buffer(target, 0);
|
||||
/* Invalidate the transplanted checksum buffer in IsoImage */
|
||||
iso_image_free_checksums(target->image, 0);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef Libisofs_with_pthread_exiT
|
||||
pthread_exit(NULL);
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1050,7 +1063,7 @@ int checksum_prepare_nodes(Ecma119Image *target, IsoNode *node, int flag)
|
||||
static
|
||||
int ecma119_image_new(IsoImage *src, IsoWriteOpts *opts, Ecma119Image **img)
|
||||
{
|
||||
int ret, i, voldesc_size, nwriters, image_checksums_mad = 0;
|
||||
int ret, i, voldesc_size, nwriters, image_checksums_mad = 0, tag_pos;
|
||||
Ecma119Image *target;
|
||||
int el_torito_writer_index = -1, file_src_writer_index= -1;
|
||||
|
||||
@ -1367,8 +1380,9 @@ int ecma119_image_new(IsoImage *src, IsoWriteOpts *opts, Ecma119Image **img)
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
/* Write relocated superblock checksum tag */
|
||||
tag_pos = voldesc_size / BLOCK_SIZE + 16 + 1;
|
||||
if (target->md5_session_checksum) {
|
||||
target->checksum_rlsb_tag_pos = voldesc_size / BLOCK_SIZE + 16 + 1;
|
||||
target->checksum_rlsb_tag_pos = tag_pos;
|
||||
if (target->checksum_rlsb_tag_pos < 32) {
|
||||
ret = iso_md5_start(&(target->checksum_ctx));
|
||||
if (ret < 0)
|
||||
@ -1381,6 +1395,20 @@ int ecma119_image_new(IsoImage *src, IsoWriteOpts *opts, Ecma119Image **img)
|
||||
if (ret < 0)
|
||||
goto target_cleanup;
|
||||
}
|
||||
tag_pos++;
|
||||
}
|
||||
|
||||
/* Clean out eventual checksum tags */
|
||||
for (i = tag_pos; i < 32; i++) {
|
||||
int tag_type;
|
||||
uint32_t pos, range_start, range_size, next_tag;
|
||||
char md5[16];
|
||||
|
||||
ret = iso_util_decode_md5_tag((char *)(opts->overwrite + i * 2048),
|
||||
&tag_type, &pos, &range_start,
|
||||
&range_size, &next_tag, md5, 0);
|
||||
if (ret > 0)
|
||||
opts->overwrite[i * 2048] = 0;
|
||||
}
|
||||
|
||||
#endif /* Libisofs_with_checksumS */
|
||||
|
@ -3,8 +3,9 @@
|
||||
* Copyright (c) 2009 Thomas Schmitt
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#ifndef LIBISO_ECMA119_H_
|
||||
|
@ -3,8 +3,9 @@
|
||||
* Copyright (c) 2009 Thomas Schmitt
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#include "ecma119_tree.h"
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2007 Vreixo Formoso
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#ifndef LIBISO_ECMA119_TREE_H_
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2007 Vreixo Formoso
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#include "eltorito.h"
|
||||
@ -407,7 +408,7 @@ int iso_image_set_boot_image(IsoImage *image, const char *image_path,
|
||||
}
|
||||
|
||||
/* creates the catalog with the given image */
|
||||
catalog = malloc(sizeof(struct el_torito_boot_catalog));
|
||||
catalog = calloc(1, sizeof(struct el_torito_boot_catalog));
|
||||
if (catalog == NULL) {
|
||||
ret = ISO_OUT_OF_MEM;
|
||||
goto boot_image_cleanup;
|
||||
@ -702,11 +703,11 @@ int catalog_stream_new(Ecma119Image *target, IsoStream **stream)
|
||||
return ISO_NULL_POINTER;
|
||||
}
|
||||
|
||||
str = malloc(sizeof(IsoStream));
|
||||
str = calloc(1, sizeof(IsoStream));
|
||||
if (str == NULL) {
|
||||
return ISO_OUT_OF_MEM;
|
||||
}
|
||||
data = malloc(sizeof(struct catalog_stream));
|
||||
data = calloc(1, sizeof(struct catalog_stream));
|
||||
if (str == NULL) {
|
||||
free(str);
|
||||
return ISO_OUT_OF_MEM;
|
||||
@ -740,7 +741,7 @@ int el_torito_catalog_file_src_create(Ecma119Image *target, IsoFileSrc **src)
|
||||
return ISO_SUCCESS;
|
||||
}
|
||||
|
||||
file = malloc(sizeof(IsoFileSrc));
|
||||
file = calloc(1, sizeof(IsoFileSrc));
|
||||
if (file == NULL) {
|
||||
return ISO_OUT_OF_MEM;
|
||||
}
|
||||
@ -753,6 +754,7 @@ int el_torito_catalog_file_src_create(Ecma119Image *target, IsoFileSrc **src)
|
||||
|
||||
/* fill fields */
|
||||
file->prev_img = 0; /* TODO allow copy of old img catalog???? */
|
||||
file->checksum_index = 0;
|
||||
file->nsections = 1;
|
||||
file->sections = calloc(1, sizeof(struct iso_file_section));
|
||||
file->sort_weight = 1000; /* slightly high */
|
||||
@ -839,7 +841,7 @@ int eltorito_writer_compute_data_blocks(IsoImageWriter *writer)
|
||||
IsoStream *new = NULL;
|
||||
IsoStream *original = t->bootimg->stream;
|
||||
size = (size_t) iso_stream_get_size(original);
|
||||
buf = malloc(size);
|
||||
buf = calloc(1, size);
|
||||
if (buf == NULL) {
|
||||
return ISO_OUT_OF_MEM;
|
||||
}
|
||||
@ -921,7 +923,7 @@ int eltorito_writer_create(Ecma119Image *target)
|
||||
IsoFile *bootimg;
|
||||
IsoFileSrc *src;
|
||||
|
||||
writer = malloc(sizeof(IsoImageWriter));
|
||||
writer = calloc(1, sizeof(IsoImageWriter));
|
||||
if (writer == NULL) {
|
||||
return ISO_OUT_OF_MEM;
|
||||
}
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2007 Vreixo Formoso
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2007 Vreixo Formoso
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#include "filesrc.h"
|
||||
@ -23,6 +24,11 @@
|
||||
#include <limits.h>
|
||||
|
||||
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX Libisofs_default_path_maX
|
||||
#endif
|
||||
|
||||
|
||||
int iso_file_src_cmp(const void *n1, const void *n2)
|
||||
{
|
||||
int ret;
|
||||
@ -132,11 +138,11 @@ int iso_file_src_create(Ecma119Image *img, IsoFile *file, IsoFileSrc **src)
|
||||
|
||||
if ((img->md5_file_checksums & 1) && !no_md5) {
|
||||
img->checksum_idx_counter++;
|
||||
if (img->checksum_idx_counter < 0x80000000) {
|
||||
if (img->checksum_idx_counter < 0x7fffffff) {
|
||||
fsrc->checksum_index = img->checksum_idx_counter;
|
||||
} else {
|
||||
fsrc->checksum_index= 0;
|
||||
img->checksum_idx_counter= 0x80000000; /* keep from rolling over */
|
||||
img->checksum_idx_counter= 0x7fffffff; /* keep from rolling over */
|
||||
}
|
||||
cret = iso_file_set_isofscx(file, (*src)->checksum_index, 0);
|
||||
if (cret < 0)
|
||||
@ -499,7 +505,8 @@ int filesrc_writer_write_data(IsoImageWriter *writer)
|
||||
|
||||
#ifdef Libisofs_with_checksumS
|
||||
|
||||
if (file->checksum_index > 0) {
|
||||
if (file->checksum_index > 0 &&
|
||||
file->checksum_index <= t->checksum_idx_counter) {
|
||||
/* Obtain checksum and dispose checksum context */
|
||||
res = iso_md5_end(&ctx, md5);
|
||||
if (res <= 0)
|
||||
@ -550,7 +557,7 @@ int iso_file_src_writer_create(Ecma119Image *target)
|
||||
{
|
||||
IsoImageWriter *writer;
|
||||
|
||||
writer = malloc(sizeof(IsoImageWriter));
|
||||
writer = calloc(1, sizeof(IsoImageWriter));
|
||||
if (writer == NULL) {
|
||||
return ISO_OUT_OF_MEM;
|
||||
}
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2007 Vreixo Formoso
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
#ifndef LIBISO_FILESRC_H_
|
||||
#define LIBISO_FILESRC_H_
|
||||
|
@ -3,8 +3,9 @@
|
||||
* Copyright (c) 2009 Thomas Schmitt
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#include "libisofs.h"
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2008 Vreixo Formoso
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
#ifndef LIBISO_FILTER_H_
|
||||
#define LIBISO_FILTER_H_
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2009 Thomas Schmitt
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*
|
||||
* It implements a filter facility which can pipe a IsoStream into an external
|
||||
* process, read its output and forward it as IsoStream output to an IsoFile.
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2009 Thomas Schmitt
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*
|
||||
* It implements a filter facility which can pipe a IsoStream into gzip
|
||||
* compression resp. uncompression, read its output and forward it as IsoStream
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2008 Vreixo Formoso
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#include "../libisofs.h"
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2009 Thomas Schmitt
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*
|
||||
* It implements a filter facility which can pipe a IsoStream into zisofs
|
||||
* compression resp. uncompression, read its output and forward it as IsoStream
|
||||
@ -912,6 +913,8 @@ int ziso_filter_get_uncompressor(FilterContext *filter, IsoStream *original,
|
||||
}
|
||||
|
||||
|
||||
#ifdef Libisofs_with_zliB
|
||||
|
||||
/* Produce a parameter object suitable for iso_file_add_filter().
|
||||
* It may be disposed by free() after all those calls are made.
|
||||
*
|
||||
@ -938,6 +941,7 @@ int ziso_create_context(FilterContext **filter, int flag)
|
||||
return ISO_SUCCESS;
|
||||
}
|
||||
|
||||
#endif /* Libisofs_with_zliB */
|
||||
|
||||
/*
|
||||
* @param flag bit0= if_block_reduction rather than if_reduction
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2008 Vreixo Formoso
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#include "libisofs.h"
|
||||
|
@ -3,8 +3,9 @@
|
||||
* Copyright (c) 2009 Thomas Schmitt
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -30,6 +31,11 @@
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX Libisofs_default_path_maX
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* Options for image reading.
|
||||
* There are four kind of options:
|
||||
|
@ -3,8 +3,9 @@
|
||||
* Copyright (c) 2009 Thomas Schmitt
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2007 Vreixo Formoso
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#include "fsource.h"
|
||||
|
@ -3,8 +3,9 @@
|
||||
* Copyright (c) 2009 Thomas Schmitt
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#ifndef LIBISO_FSOURCE_H_
|
||||
|
@ -3,8 +3,9 @@
|
||||
* Copyright (c) 2009 Thomas Schmitt
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#include "libisofs.h"
|
||||
|
@ -3,8 +3,9 @@
|
||||
* Copyright (c) 2009 Thomas Schmitt
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
#ifndef LIBISO_IMAGE_H_
|
||||
#define LIBISO_IMAGE_H_
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2007 Vreixo Formoso
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#include "iso1999.h"
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2007 Vreixo Formoso
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -3,8 +3,9 @@
|
||||
* Copyright (c) 2007 Mario Danic
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#include "joliet.h"
|
||||
|
@ -3,8 +3,9 @@
|
||||
* Copyright (c) 2007 Mario Danic
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -2,7 +2,7 @@
|
||||
/* libiso_msgs (generated from libdax_msgs : Fri Feb 22 19:42:52 CET 2008)
|
||||
Message handling facility of libisofs.
|
||||
Copyright (C) 2006 - 2008 Thomas Schmitt <scdbackup@gmx.net>,
|
||||
provided under GPL version 2
|
||||
provided under GPL version 2 or later
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -2,7 +2,7 @@
|
||||
/* libiso_msgs (generated from libdax_msgs : Fri Feb 22 19:42:52 CET 2008)
|
||||
Message handling facility of libisofs.
|
||||
Copyright (C) 2006-2008 Thomas Schmitt <scdbackup@gmx.net>,
|
||||
provided under GPL version 2
|
||||
provided under GPL version 2 or later
|
||||
*/
|
||||
|
||||
|
||||
|
@ -3,8 +3,9 @@
|
||||
* Copyright (c) 2009 Thomas Schmitt
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -483,7 +484,7 @@ struct IsoFileSource_Iface
|
||||
int version;
|
||||
|
||||
/**
|
||||
* Get the path, relative to the filesystem this file source belongs to.
|
||||
* Get the absolute path in the filesystem this file source belongs to.
|
||||
*
|
||||
* @return
|
||||
* the path of the FileSource inside the filesystem, it should be
|
||||
@ -1090,7 +1091,7 @@ int iso_lib_is_compatible(int major, int minor, int micro);
|
||||
*/
|
||||
#define iso_lib_header_version_major 0
|
||||
#define iso_lib_header_version_minor 6
|
||||
#define iso_lib_header_version_micro 24
|
||||
#define iso_lib_header_version_micro 28
|
||||
|
||||
/**
|
||||
* Usage discussion:
|
||||
@ -2202,8 +2203,8 @@ const char *iso_image_get_biblio_file_id(const IsoImage *image);
|
||||
* The image to make bootable. If it was already bootable this function
|
||||
* returns an error and the image remains unmodified.
|
||||
* @param image_path
|
||||
* The path on the image tree of a regular file to use as default boot
|
||||
* image.
|
||||
* The absolute path on the image tree of a regular file to use as
|
||||
* default boot image.
|
||||
* @param type
|
||||
* The boot media type. This can be one of 3 types:
|
||||
* - Floppy emulation: Boot image file must be exactly
|
||||
@ -2213,9 +2214,9 @@ const char *iso_image_get_biblio_file_id(const IsoImage *image);
|
||||
* - No emulation. You should specify load segment and load size
|
||||
* of image.
|
||||
* @param catalog_path
|
||||
* The path on the image tree where the catalog will be stored. The
|
||||
* directory component of this path must be a directory existent on the
|
||||
* image tree, and the filename component must be unique among all
|
||||
* The absolute path in the image tree where the catalog will be stored.
|
||||
* The directory component of this path must be a directory existent on
|
||||
* the image tree, and the filename component must be unique among all
|
||||
* children of that directory on image. Otherwise a correspodent error
|
||||
* code will be returned. This function will add an IsoBoot node that acts
|
||||
* as a placeholder for the real catalog, that will be generated at image
|
||||
@ -2330,7 +2331,7 @@ void el_torito_patch_isolinux_image(ElToritoBootImage *bootimg);
|
||||
* @param options
|
||||
* bitmask style flag. The following values are defined:
|
||||
*
|
||||
* bit 0 -> 1 to path the image, 0 to not
|
||||
* bit 0 -> 1 to patch the image, 0 to not
|
||||
* Patching the image involves the writing of a 56 bytes
|
||||
* boot information table at offset 8 of the boot image file.
|
||||
* The original boot image file will not be modified. This is
|
||||
@ -3346,8 +3347,8 @@ void iso_tree_set_ignore_special(IsoImage *image, int skip);
|
||||
int iso_tree_get_ignore_special(IsoImage *image);
|
||||
|
||||
/**
|
||||
* Add a excluded path. These are paths that won't never added to image,
|
||||
* and will be excluded even when adding recursively its parent directory.
|
||||
* Add a excluded path. These are paths that won't never added to image, and
|
||||
* will be excluded even when adding recursively its parent directory.
|
||||
*
|
||||
* For example, in
|
||||
*
|
||||
@ -3439,7 +3440,9 @@ void iso_tree_set_report_callback(IsoImage *image,
|
||||
* @param parent
|
||||
* The directory in the image tree where the node will be added.
|
||||
* @param path
|
||||
* The path of the file to add in the filesystem.
|
||||
* The absolute path of the file in the local filesystem.
|
||||
* The node will have the same leaf name as the file on disk.
|
||||
* Its directory path depends on the parent node.
|
||||
* @param node
|
||||
* place where to store a pointer to the newly added file. No
|
||||
* extra ref is addded, so you will need to call iso_node_ref() if you
|
||||
@ -3469,9 +3472,10 @@ int iso_tree_add_node(IsoImage *image, IsoDir *parent, const char *path,
|
||||
* @param parent
|
||||
* The directory in the image tree where the node will be added.
|
||||
* @param name
|
||||
* The name that the node will have on image.
|
||||
* The leaf name that the node will have on image.
|
||||
* Its directory path depends on the parent node.
|
||||
* @param path
|
||||
* The path of the file to add in the filesystem.
|
||||
* The absolute path of the file in the local filesystem.
|
||||
* @param node
|
||||
* place where to store a pointer to the newly added file. No
|
||||
* extra ref is addded, so you will need to call iso_node_ref() if you
|
||||
@ -3490,24 +3494,25 @@ int iso_tree_add_new_node(IsoImage *image, IsoDir *parent, const char *name,
|
||||
const char *path, IsoNode **node);
|
||||
|
||||
/**
|
||||
* Add a new node to the image tree, from an existing file, and with the
|
||||
* given name, that must not exist on dir. The node will be cut-out to the
|
||||
* submitted size, and its contents will be read from the given offset. This
|
||||
* function is thus suitable for adding only a piece of a file to the image.
|
||||
* Add a new node to the image tree with the given name that must not exist
|
||||
* on dir. The node data content will be a byte interval out of the data
|
||||
* content of a file in the local filesystem.
|
||||
*
|
||||
* @param image
|
||||
* The image
|
||||
* @param parent
|
||||
* The directory in the image tree where the node will be added.
|
||||
* @param name
|
||||
* The name that the node will have on image.
|
||||
* The leaf name that the node will have on image.
|
||||
* Its directory path depends on the parent node.
|
||||
* @param path
|
||||
* The path of the file to add in the filesystem. For now only regular
|
||||
* files and symlinks to regular files are supported.
|
||||
* The absolute path of the file in the local filesystem. For now
|
||||
* only regular files and symlinks to regular files are supported.
|
||||
* @param offset
|
||||
* Offset on the given file from where to start reading data.
|
||||
* Byte number in the given file from where to start reading data.
|
||||
* @param size
|
||||
* Max size of the file.
|
||||
* Max size of the file. This may be more than actually available from
|
||||
* byte offset to the end of the file in the local filesystem.
|
||||
* @param node
|
||||
* place where to store a pointer to the newly added file. No
|
||||
* extra ref is addded, so you will need to call iso_node_ref() if you
|
||||
@ -3550,7 +3555,7 @@ int iso_tree_add_new_cut_out_node(IsoImage *image, IsoDir *parent,
|
||||
int iso_tree_add_dir_rec(IsoImage *image, IsoDir *parent, const char *dir);
|
||||
|
||||
/**
|
||||
* Locate a node by its path on image.
|
||||
* Locate a node by its absolute path on image.
|
||||
*
|
||||
* @param node
|
||||
* Location for a pointer to the node, it will filled with NULL if the
|
||||
@ -3567,7 +3572,7 @@ int iso_tree_add_dir_rec(IsoImage *image, IsoDir *parent, const char *dir);
|
||||
int iso_tree_path_to_node(IsoImage *image, const char *path, IsoNode **node);
|
||||
|
||||
/**
|
||||
* Get the path on image of the given node.
|
||||
* Get the absolute path on image of the given node.
|
||||
*
|
||||
* @return
|
||||
* The path on the image, that must be freed when no more needed. If the
|
||||
@ -3593,11 +3598,10 @@ void iso_data_source_unref(IsoDataSource *src);
|
||||
|
||||
/**
|
||||
* Create a new IsoDataSource from a local file. This is suitable for
|
||||
* accessing regular .iso images, or to acces drives via its block device
|
||||
* and standard POSIX I/O calls.
|
||||
* accessing regular files or block devices with ISO images.
|
||||
*
|
||||
* @param path
|
||||
* The path of the file
|
||||
* The absolute path of the file
|
||||
* @param src
|
||||
* Will be filled with the pointer to the newly created data source.
|
||||
* @return
|
||||
@ -3832,8 +3836,7 @@ void iso_file_source_unref(IsoFileSource *src);
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get the path, relative to the filesystem this file source
|
||||
* belongs to.
|
||||
* Get the absolute path in the filesystem this file source belongs to.
|
||||
*
|
||||
* @return
|
||||
* the path of the FileSource inside the filesystem, it should be
|
||||
@ -4549,7 +4552,7 @@ int iso_node_set_attrs(IsoNode *node, size_t num_attrs, char **names,
|
||||
* Get an ACL of the given file in the local filesystem in long text form.
|
||||
*
|
||||
* @param disk_path
|
||||
* Path to the file
|
||||
* Absolute path to the file
|
||||
* @param text
|
||||
* Will return a pointer to the ACL text. If not NULL the text will be
|
||||
* 0 terminated and finally has to be disposed by a call to this function
|
||||
@ -4564,7 +4567,7 @@ int iso_node_set_attrs(IsoNode *node, size_t num_attrs, char **names,
|
||||
* @return
|
||||
* 1 ok
|
||||
* 2 ok, trivial ACL found while bit4 is set, *text is NULL
|
||||
* 0 no ACL manipulation adapter available
|
||||
* 0 no ACL manipulation adapter available / ACL not supported on fs
|
||||
* -1 failure of system ACL service (see errno)
|
||||
* -2 attempt to inquire ACL of a symbolic link without bit4 or bit5
|
||||
* resp. with no suitable link target
|
||||
@ -4579,7 +4582,7 @@ int iso_local_get_acl_text(char *disk_path, char **text, int flag);
|
||||
* in long text form.
|
||||
*
|
||||
* @param disk_path
|
||||
* Path to the file
|
||||
* Absolute path to the file
|
||||
* @param text
|
||||
* The input text (0 terminated, ACL long text form)
|
||||
* @param flag
|
||||
@ -4604,7 +4607,7 @@ int iso_local_set_acl_text(char *disk_path, char *text, int flag);
|
||||
* necessary if the permissions of a disk file with ACL shall be copied to
|
||||
* an object which has no ACL.
|
||||
* @param disk_path
|
||||
* Path to the local file which may have an "access" ACL or not.
|
||||
* Absolute path to the local file which may have an "access" ACL or not.
|
||||
* @param flag
|
||||
* Bitfield for control purposes
|
||||
* bit5= in case of symbolic link: inquire link target
|
||||
@ -4629,7 +4632,7 @@ int iso_local_get_perms_wo_acl(char *disk_path, mode_t *st_mode, int flag);
|
||||
* will not be put into the result.
|
||||
*
|
||||
* @param disk_path
|
||||
* Path to the file
|
||||
* Absolute path to the file
|
||||
* @param num_attrs
|
||||
* Will return the number of name-value pairs
|
||||
* @param names
|
||||
@ -4662,7 +4665,7 @@ int iso_local_get_attrs(char *disk_path, size_t *num_attrs, char ***names,
|
||||
* Eventual ACLs have to be encoded as attribute pair with empty name.
|
||||
*
|
||||
* @param disk_path
|
||||
* Path to the file
|
||||
* Absolute path to the file
|
||||
* @param num_attrs
|
||||
* Number of attributes
|
||||
* @param names
|
||||
@ -4687,6 +4690,11 @@ int iso_local_set_attrs(char *disk_path, size_t num_attrs, char **names,
|
||||
size_t *value_lengths, char **values, int flag);
|
||||
|
||||
|
||||
/* Default in case that the compile environment has no macro PATH_MAX.
|
||||
*/
|
||||
#define Libisofs_default_path_maX 4096
|
||||
|
||||
|
||||
/* --------------------------- Filters in General -------------------------- */
|
||||
|
||||
/*
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2009 Thomas Schmitt
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2009 Thomas Schmitt
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#ifndef LIBISO_MD5_H_
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2007 Vreixo Formoso
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2007 Vreixo Formoso
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -3,8 +3,9 @@
|
||||
* Copyright (c) 2009 Thomas Schmitt
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#include "libisofs.h"
|
||||
@ -22,6 +23,12 @@
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX Libisofs_default_path_maX
|
||||
#endif
|
||||
|
||||
|
||||
struct dir_iter_data
|
||||
{
|
||||
/* points to the last visited child, to NULL before start */
|
||||
@ -201,6 +208,7 @@ int iso_node_get_xinfo(IsoNode *node, iso_node_xinfo_func proc, void **data)
|
||||
return ISO_NULL_POINTER;
|
||||
}
|
||||
|
||||
*data = NULL;
|
||||
pos = node->xinfo;
|
||||
while (pos != NULL) {
|
||||
if (pos->process == proc) {
|
||||
|
@ -3,8 +3,9 @@
|
||||
* Copyright (c) 2009 Thomas Schmitt
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
#ifndef LIBISO_NODE_H_
|
||||
#define LIBISO_NODE_H_
|
||||
|
@ -4,8 +4,9 @@
|
||||
* Copyright (c) 2009 Thomas Schmitt
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#include "rockridge.h"
|
||||
|
@ -4,8 +4,9 @@
|
||||
* Copyright (c) 2009 Thomas Schmitt
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -3,8 +3,9 @@
|
||||
* Copyright (c) 2009 Thomas Schmitt
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -3,8 +3,9 @@
|
||||
* Copyright (c) 2009 Thomas Schmitt
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#include "libisofs.h"
|
||||
@ -17,6 +18,12 @@
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX Libisofs_default_path_maX
|
||||
#endif
|
||||
|
||||
|
||||
ino_t serial_id = (ino_t)1;
|
||||
ino_t mem_serial_id = (ino_t)1;
|
||||
ino_t cut_out_serial_id = (ino_t)1;
|
||||
|
@ -3,8 +3,9 @@
|
||||
* Copyright (c) 2009 Thomas Schmitt
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
#ifndef LIBISO_STREAM_H_
|
||||
#define LIBISO_STREAM_H_
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2008 Vreixo Formoso
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#include "system_area.h"
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2008 Vreixo Formoso
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2007 Vreixo Formoso
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -25,6 +26,12 @@
|
||||
#include <stdio.h>
|
||||
#include <fnmatch.h>
|
||||
|
||||
|
||||
#ifndef PATH_MAX
|
||||
#define PATH_MAX Libisofs_default_path_maX
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* Add a new directory to the iso tree.
|
||||
*
|
||||
@ -914,7 +921,7 @@ int iso_tree_path_to_node(IsoImage *image, const char *path, IsoNode **node)
|
||||
int result;
|
||||
IsoNode *n;
|
||||
IsoDir *dir;
|
||||
char *ptr, *brk_info, *component;
|
||||
char *ptr, *brk_info = NULL, *component;
|
||||
|
||||
if (image == NULL || path == NULL) {
|
||||
return ISO_NULL_POINTER;
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2007 Vreixo Formoso
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
#ifndef LIBISO_IMAGE_TREE_H_
|
||||
#define LIBISO_IMAGE_TREE_H_
|
||||
|
@ -1,10 +1,12 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Vreixo Formoso
|
||||
* Copyright (c) 2007 Mario Danic
|
||||
* Copyright (c) 2009 Thomas Schmitt
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#include "util.h"
|
||||
|
@ -1,9 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2007 Vreixo Formoso
|
||||
* Copyright (c) 2009 Thomas Schmitt
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#ifndef LIBISO_UTIL_H_
|
||||
@ -246,20 +248,6 @@ time_t iso_datetime_read_17(const uint8_t *buf);
|
||||
*/
|
||||
int iso_eaccess(const char *path);
|
||||
|
||||
#ifdef NIX
|
||||
/* <<< Buggy and not used any more */
|
||||
|
||||
/**
|
||||
* Copy up to \p len chars from \p buf and return this newly allocated
|
||||
* string. The new string is null-terminated.
|
||||
* Note:
|
||||
* Trailing blanks will be removed. But the first one of an all blank string
|
||||
* persists. It is unclear whether this is a bug or a feature.
|
||||
*/
|
||||
char *strcopy(const char *buf, size_t len);
|
||||
|
||||
#endif /* NIX */
|
||||
|
||||
/**
|
||||
* Copy up to \p len chars from \p buf and return this newly allocated
|
||||
* string. The new string is null-terminated.
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2007 Vreixo Formoso
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#include "util.h"
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2007 Vreixo Formoso
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
|
||||
#include "util.h"
|
||||
|
@ -2,8 +2,9 @@
|
||||
* Copyright (c) 2007 Vreixo Formoso
|
||||
*
|
||||
* This file is part of the libisofs project; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation. See COPYING file for details.
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* or later as published by the Free Software Foundation.
|
||||
* See COPYING file for details.
|
||||
*/
|
||||
#ifndef LIBISO_IMAGE_WRITER_H_
|
||||
#define LIBISO_IMAGE_WRITER_H_
|
||||
|
Reference in New Issue
Block a user