]>
glassweightruler.freedombox.rocks Git - Ventoy.git/blob - SQUASHFS/squashfs-tools-4.4/squashfs-tools/unsquash-34.c
2 * Unsquash a squashfs filesystem. This is a highly compressed read only
6 * Phillip Lougher <phillip@squashfs.org.uk>
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2,
11 * or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 * Helper functions used by unsquash-3 and unsquash-4.
27 #include "unsquashfs.h"
29 long long *alloc_index_table(int indexes
)
31 static long long *alloc_table
= NULL
;
32 static int alloc_size
= 0;
33 int length
= indexes
* sizeof(long long);
35 if(alloc_size
< length
|| length
== 0) {
36 long long *table
= realloc(alloc_table
, length
);
38 if(table
== NULL
&& length
!=0)
39 EXIT_UNSQUASH("alloc_index_table: failed to allocate "