Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:init\initramfs.c Create Date:2022-07-28 13:54:57
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:unpack_to_rootfs

Proto:static char *__init unpack_to_rootfs(char *buf, unsigned long len)

Type:char

Parameter:

TypeParameterName
char *buf
unsigned longlen
449  static __initdata char msg_buf[64]
451  header_buf = Allocation memory
452  symlink_buf = Allocation memory
453  name_buf = Allocation memory
455  If Not header_buf || Not symlink_buf || Not name_buf Then panic - halt the system*@fmt: The text string to print* Display a message, then perform cleanups.* This function never returns.
458  state = Start
459  this_header = 0
460  message = NULL
461  When Not message && len cycle
462  saved_offset = this_header
463  If buf == '0' && Not (this_header & 3) Then
464  state = Start
466  buf += written
467  len -= written
468  Continue
470  If Not buf Then
471  buf++
472  len--
473  this_header++
474  Continue
476  this_header = 0
477  decompress = decompress_method(buf, len, & compress_name)
478  pr_debug("Detected %s compressed data\n", compress_name)
479  If decompress Then
482  If res Then error("decompressor failed")
484  Else if compress_name Then
485  If Not message Then
491  Else error("invalid magic at start of compressed archive")
493  If (state != Reset) Then error("junk at the end of compressed archive")
495  this_header = saved_offset + dex of next byte to be processed in inbuf
496  buf += dex of next byte to be processed in inbuf
497  len -= dex of next byte to be processed in inbuf
499  dir_utime()
500  free previously allocated memory
501  free previously allocated memory
502  free previously allocated memory
503  Return message
Caller
NameDescribe
populate_rootfs