futility/updater_archive.c
/*
 * Writes a file into archive.
 * If entry name (fname) is an absolute path (/file), always write into real
 * file system.
 * Returns 0 on success, otherwise non-zero as failure.
 */
Writes a file into archive.
If entry name (fname) is an absolute path (/file), always write into real
file system.
Returns 0 on success, otherwise non-zero as failure.
Writes a file into archive . If entry name ( fname ) is an absolute path ( / file ) always write into real file system . Returns 0 on success otherwise non - zero as failure .
int archive_write_file(struct archive *ar, const char *fname,
		       uint8_t *data, uint32_t size, int64_t mtime)
{
	if (!ar || *fname == '/')
		return archive_fallback_write_file(NULL, fname, data, size, mtime);
	return ar->write_file(ar->handle, fname, data, size, mtime);
}
int archive_write_file ( struct archive * ar , const char * fname , uint8_t * data , uint32_t size , int64_t mtime ) { if ( ! ar || * fname == ' ' ) return archive_fallback_write_file ( NULL , fname , data , size , mtime ) ; return ar -> write_file ( ar -> handle , fname , data , size , mtime ) ; }
Writes a file into archive.
Writes a file into archive .