/***********************************************************************
* *
* 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 solaris flash format
*/
#include "format.h"
static int
flash_getprologue(Pax_t* pax, Format_t* fp, register Archive_t* ap, File_t* f, unsigned char* buf, size_t size)
{
unsigned char* s;
unsigned char* e;
unsigned char* t;
char* v;
int i;
off_t n;
return 0;
/*
* get the flash format version
*/
v = version;
*v++ = *s++;
*v = 0;
/*
* skip over the flash headers to the embedded archive
*/
s = e;
for (;;)
{
if (s >= e)
{
return -1;
s = buf;
e = buf + n;
}
if (t = (unsigned char*)memchr(s, '\n', e - s))
{
{
return -1;
break;
}
if (t < e)
{
s = t + 1;
continue;
}
}
return -1;
s = e;
}
if (getprologue(ap) <= 0)
{
return -1;
}
return 1;
}
{
"flash",
0,
"Solaris flash package encapsulated archive",
0,
0,
0,
0,
};