/*
* Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan
* Perez-Rathke and Ram Vedam. All rights reserved.
*
* This code was written by Daniel Watt, Walter Deignan, Ryan Gabrys,
* Alan Perez-Rathke and Ram Vedam.
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY DANIEL WATT, WALTER DEIGNAN, RYAN
* GABRYS, ALAN PEREZ-RATHKE AND RAM VEDAM ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL DANIEL WATT, WALTER DEIGNAN, RYAN
* GABRYS, ALAN PEREZ-RATHKE AND RAM VEDAM BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE,DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
* OF SUCH DAMAGE.
*/
#ifndef __ISO9660_RRIP_H__
#define __ISO9660_RRIP_H__
/*
* This will hold all the functions needed to
* write an ISO 9660 image with Rock Ridge Extensions
*/
/* For writing must use ISO_RRIP_EXTREF structure */
#define SUSP_RRIP_ER_EXT_ID "IEEE_P1282"
#define SUSP_RRIP_ER_EXT_DES "THE IEEE P1282 PROTOCOL PROVIDES SUPPORT FOR POSIX FILE SYSTEM SEMANTICS."
#define SUSP_RRIP_ER_EXT_SRC "PLEASE CONTACT THE IEEE STANDARDS DEPARTMENT, PISCATAWAY, NJ, USA FOR THE P1282 SPECIFICATION."
typedef union {
susp_entry su_entry;
rrip_entry rr_entry;
} SUSP_ENTRIES;
struct ISO_SUSP_ATTRIBUTES {
SUSP_ENTRIES attr;
int type;
char type_of[2];
char last_in_suf; /* last entry in the System Use Field? */
/* Dan's addons - will merge later. This allows use of a switch */
char susp_type; /* SUSP or RRIP */
char entry_type; /* Record type */
char write_location;
TAILQ_ENTRY(ISO_SUSP_ATTRIBUTES) rr_ll;
};
/* Recursive function - move later to func pointer code*/
int cd9660_susp_finalize(iso9660_disk *, cd9660node *);
/* These two operate on single nodes */
int cd9660_susp_finalize_node(iso9660_disk *, cd9660node *);
int cd9660_rrip_finalize_node(iso9660_disk *, cd9660node *);
/* Device number */
int cd9660node_rrip_pn(struct ISO_SUSP_ATTRIBUTES *, fsnode *);
/* Symbolic link */
int cd9660node_rrip_SL(struct ISO_SUSP_ATTRIBUTES *, fsnode *);
/* Alternate Name function */
void cd9660_rrip_NM(cd9660node *);
void cd9660_rrip_add_NM(cd9660node *,const char *);
/* Parent and child link function */
int cd9660_rrip_PL(struct ISO_SUSP_ATTRIBUTES *, cd9660node *);
int cd9660_rrip_CL(struct ISO_SUSP_ATTRIBUTES *, cd9660node *);
int cd9660_rrip_RE(struct ISO_SUSP_ATTRIBUTES *, cd9660node *);
int cd9660node_rrip_tf(struct ISO_SUSP_ATTRIBUTES *, fsnode *);
/*
* Relocation directory function. I'm not quite sure what
* sort of parameters are needed, but personally I don't think
* any parameters are needed except for the memory address where
* the information needs to be put in
*/
int cd9660node_rrip_re(void *, fsnode *);
/*
* Don't know if this function is needed because it apparently is an
* optional feature that does not really need to be implemented but I
* thought I should add it anyway.
*/
int cd9660_susp_ce (struct ISO_SUSP_ATTRIBUTES *, cd9660node *);
int cd9660_susp_pd (struct ISO_SUSP_ATTRIBUTES *, int);
int cd9660_susp_sp (struct ISO_SUSP_ATTRIBUTES *, cd9660node *);
int cd9660_susp_st (struct ISO_SUSP_ATTRIBUTES *, cd9660node *);