Function report |
Source Code:lib\decompress_unxz.c |
Create Date:2022-07-28 06:17:26 |
| Last Modify:2020-03-15 22:53:09 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:This function implements the API defined in <linux/decompress/generic.h>.* This wrapper will automatically choose single-call or multi-call mode* of the native XZ decoder API. The single-call mode can be used only when
Proto:STATIC int __attribute__((__section__(".init.text"))) __attribute__((__cold__))unxz(unsigned char *in, long in_size, long (*fill)(void *dest, unsigned long size), long (*flush)(void *src, unsigned long size), unsigned char *out, long *in_used, void (*error)(char *x))
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| unsigned char * | in | |
| long | in_size | |
| long (* | fill | |
| long (* | flush | |
| unsigned char * | out | |
| long * | in_used | |
| void (* | error |
| 260 | bool must_free_in = false |
| 263 | xz_crc32_init() |
| 271 | Else s = xz_dec_init(XZ_DYNALLOC, (uint32_t) - 1) |
| 274 | If (s == NULL) Then Go to error_alloc_state |
| 277 | If (flush == NULL) Then |
| 280 | Else |
| 283 | If (out == NULL) Then Go to error_alloc_out |
| 287 | If (in == NULL) Then |
| 288 | must_free_in = true |
| 290 | If (in == NULL) Then Go to error_alloc_in |
| 295 | in_pos = 0 |
| 297 | out_pos = 0 |
| 301 | Else |
| 302 | Do |
| 339 | If must_free_in Then free(in) |
| 349 | xz_dec_end(s) |
| 352 | Case ret == XZ_STREAM_END |
| 353 | Return 0 |
| 355 | Case ret == XZ_MEM_ERROR |
| 357 | error("XZ decompressor ran out of memory") |
| 358 | Break |
| 360 | Case ret == XZ_FORMAT_ERROR |
| 361 | error("Input is not in the XZ format (wrong magic bytes)") |
| 362 | Break |
| 364 | Case ret == XZ_OPTIONS_ERROR |
| 365 | error("Input was encoded with settings that are not supported by this XZ decoder") |
| 367 | Break |
| 369 | Case ret == XZ_DATA_ERROR |
| 370 | Case ret == XZ_BUF_ERROR |
| 371 | error("XZ-compressed data is corrupt") |
| 372 | Break |
| 374 | Default |
| 375 | error("Bug in the XZ decompressor") |
| 376 | Break |
| 379 | Return -1 |
| 381 | error_alloc_in : |
| 385 | error_alloc_out : |
| 386 | xz_dec_end(s) |
| 388 | error_alloc_state : |
| 389 | error("XZ decompressor ran out of memory") |
| 390 | Return -1 |
| Name | Describe |
|---|---|
| __decompress | This macro is used by architecture-specific files to decompress* the kernel image. |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |