/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1987-2011 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
/*
* pax rpm format
*/
#include "format.h"
typedef struct
{
} Rpm_magic_t;
typedef struct
{
} Rpm_lead_t;
typedef struct
{
typedef struct
{
} Rpm_head_t;
typedef struct
{
} Rpm_entry_t;
static int
rpm_getprologue(Pax_t* pax, Format_t* fp, register Archive_t* ap, File_t* f, unsigned char* buf, size_t size)
{
char* s;
int i;
int swap;
long num;
return 0;
return 0;
message((-2, "%s: magic swap=%d magic=%08x major=%d minor=%d", ap->name, swap, magic.magic, magic.major, magic.minor));
{
return 0;
return 0;
if (swap)
{
return -1;
}
}
{
return 0;
return 0;
if (swap & 1)
message((-2, "%s: lead name=%s archnum=%d osnum=%d sigtype=%d", ap->name, state.volume, lead.archnum, lead.osnum, lead.sigtype));
s++;
else
{
case 0:
num = 0;
break;
case 1:
num = 256;
{
return -1;
}
break;
case 5:
for (;;)
{
{
error(2, "%s: %s format header magic expected at offset %ld", ap->name, fp->name, ap->io->offset + ap->io->count);
return -1;
}
{
break;
}
switch (num)
{
case 0:
break;
case 7:
break;
case 6:
break;
default:
{
return -1;
}
break;
}
{
error(2, "%s: %s format header magic expected at offset %ld", ap->name, fp->name, ap->io->offset + ap->io->count);
return -1;
}
{
break;
}
if (swap)
{
if (swap & 1)
}
message((-2, "%s: verify magic=%08x major=%d minor=%d type=%d", ap->name, verify.magic, verify.major, verify.minor, verify.type));
{
return -1;
}
{
return -1;
}
if (swap)
message((-2, "%s: head entries=%lu datalen=%lu num=%lu", ap->name, head.entries, head.datalen, num));
{
return -1;
}
}
break;
default:
error(2, "%s: %s format version %d.%d signature type %d not supported", ap->name, fp->name, magic.major, magic.minor, lead.sigtype);
return -1;
}
}
else
{
error(2, "%s: %s format version %d.%d not supported", ap->name, fp->name, magic.major, magic.minor);
return -1;
}
if (getprologue(ap) <= 0)
{
return -1;
}
return 1;
}
{
"rpm",
0,
"Redhat rpm package encapsulated cpio",
0,
0,
0,
0,
};