5 "@(#)rock.c 1.66 12/12/02 joerg";
57#if defined(__QNX__) && !defined(__QNXNTO__)
58#define TF_SIZE (5 + 4 * 7)
59#define TF_SIZE_LONG (5 + 4 * 17)
61#define TF_SIZE (5 + 3 * 7)
62#define TF_SIZE_LONG (5 + 3 * 17)
75 struct stat *lstatbuf,
86#define RR_CUR_USE (CE_SIZE + currlen + (ipnt - recstart))
88#define MAYBE_ADD_CE_ENTRY(BYTES) \
89 (((int)(BYTES)) + CE_SIZE + currlen + (ipnt - recstart) > reclimit ? 1 : 0)
113 while (tlen > 0 && *
f) {
133 _(
"Panic: no space, cannot add RR CE entry (%d bytes mising) for %s line %d.\n"),
197 struct stat *lstatbuf;
231 struct stat *statbuf,
232 struct stat *lstatbuf,
244 struct stat *statbuf,
275 s_entry->
isorec.name_len[0] = 1;
296 if (
S_ISREG(lstatbuf->
st_mode) && apple_ext && s_entry->hfs_ent) {
303 Rock[
ipnt++] = s_entry->hfs_ent->u.file.type[0];
304 Rock[
ipnt++] = s_entry->hfs_ent->u.file.type[1];
305 Rock[
ipnt++] = s_entry->hfs_ent->u.file.type[2];
306 Rock[
ipnt++] = s_entry->hfs_ent->u.file.type[3];
307 Rock[
ipnt++] = s_entry->hfs_ent->u.file.creator[0];
308 Rock[
ipnt++] = s_entry->hfs_ent->u.file.creator[1];
309 Rock[
ipnt++] = s_entry->hfs_ent->u.file.creator[2];
310 Rock[
ipnt++] = s_entry->hfs_ent->u.file.creator[3];
311 Rock[
ipnt++] = (s_entry->hfs_ent->fdflags >> 8) & 0xff;
312 Rock[
ipnt++] = s_entry->hfs_ent->fdflags & 0xff;
356 if (USE_MAC_NAME(s_entry)) {
358 npnt = s_entry->hfs_ent->
name;
385 _(
"Negative RR name length residual: %d\n"),
394 Rock[
ipnt++] = (remain != use ? 1 : 0);
405 if (USE_MAC_NAME(s_entry))
415 if (remain && need_ce)
450#if defined(S_IFCHR) || defined(S_IFBLK)
479 if (
sizeof (
dev_t) <= 2) {
484 }
else if (
sizeof (
dev_t) <= 4) {
486 (lstatbuf->
st_rdev >> 8) >> 8);
493 (lstatbuf->
st_rdev >> 16)>>16);
519 errmsg(
_(
"Cannot read link '%s'.\n"), whole_name);
532 for (cpnt1 = cpnt; *cpnt1 !=
'\0'; cpnt1++) {
539 if (sl_bytes > 250) {
546 _(
"symbolic link ``%s'' to long for one SL System Use Field, splitting"),
562 while (*cpnt || last_sl) {
564 strchr((
char *)cpnt,
'/');
574 if (cpnt[0] ==
'.' && cpnt[1] ==
'.' &&
593 }
else if (cpnt[0] ==
'.' && cpnt[1] == 0) {
611 }
else if (cpnt[0] == 0) {
652 j0 =
strlen((
char *)cpnt);
712 Rock[lenpos] = lenval;
728#if defined(__QNX__) && !defined(__QNXNTO__)
735#if defined(__QNX__) && !defined(__QNXNTO__)
814 static const Uchar zisofs_magic[8] =
815 { 0x37, 0xE4, 0x53, 0x96, 0xC9, 0xDB, 0xD6, 0x07 };
832 zffile =
fopen(whole_name,
"rb");
833 if (zffile !=
NULL) {
838 if (
memcmp(
header, zisofs_magic,
sizeof (zisofs_magic)))
853 blocksize = headersize = 0;
885 Rock[flagpos] = flagval;
920 Rock[lipnt++] =
ER_SIZE + len_id + len_des + len_src;
922 Rock[lipnt++] = len_id;
923 Rock[lipnt++] = len_des;
924 Rock[lipnt++] = len_src;
int strcmp(const char *String1, const char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
char * strncpy(char *DstString, const char *SrcString, ACPI_SIZE Count)
char * strchr(const char *String, int ch)
EXPORT void comerrno(int err, char *msg, va_alist)
EXPORT int errmsgno(int err, char *msg, va_alist)
EXPORT int errmsg(char *msg, va_alist)
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
_Check_return_opt_ _CRTIMP size_t __cdecl fread(_Out_writes_bytes_(_ElementSize *_Count) void *_DstBuf, _In_ size_t _ElementSize, _In_ size_t _Count, _Inout_ FILE *_File)
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
EXPORT void set_722(void *vp, UInt32_t i)
EXPORT UInt32_t get_731(void *vp)
EXPORT void set_733(void *vp, UInt32_t i)
EXPORT void conv_charset(unsigned char *to, size_t *tosizep, unsigned char *from, size_t *fromsizep, siconvt_t *inls, siconvt_t *onls)
EXPORT int iso9660_date(char *result, time_t crtime)
int transparent_compression
EXPORT void * e_malloc(size_t size)
EXPORT int iso9660_ldate(char *result, time_t crtime, int nsec, int gmtoff)
#define memcpy(s1, s2, n)
#define INHIBIT_ISO9660_ENTRY
int readlink(const char *path, char *buf, size_t size)
static unsigned int file_size
LOCAL void add_CE_entry(char *field, int line)
#define MAYBE_ADD_CE_ENTRY(BYTES)
EXPORT int generate_xa_rr_attributes(char *whole_name, char *name, struct directory_entry *s_entry, struct stat *statbuf, struct stat *lstatbuf, int deep_opt)
LOCAL Uchar symlink_buff[PATH_MAX+1]
LOCAL void gen_xa(struct stat *lstatbuf)
LOCAL void rstrncpy(char *t, char *f, size_t tlen, siconvt_t *inls, siconvt_t *onls)
static UConst char sccsid[]
EXPORT char * generate_rr_extension_record(char *id, char *descriptor, char *source, int *size)
LOCAL int gen_xa_attr(mode_t attr)
#define offsetof(TYPE, MEMBER)
unsigned int rr_attr_size
unsigned char * rr_attributes
struct iso_directory_record isorec
unsigned int total_rr_attr_size