Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:do_header

Proto:static int __init do_header(void)

Type:int

Parameter:Nothing

246  If memcmp(collected, "070707", 6) == 0 Then
247  error("incorrect cpio method used: use -H newc option")
248  Return 1
250  If memcmp(collected, "070701", 6) Then
251  error("no cpio magic")
252  Return 1
254  parse_header(collected)
255  next_header = this_header + link hash (name_len) + body_len
256  next_header = next_header + 3 & ~3
257  state = SkipIt
258  If name_len <= 0 || name_len > # chars in a path name including nul Then Return 0
260  If S_ISLNK(mode) Then
261  If body_len > # chars in a path name including nul Then Return 0
263  collect = collected = symlink_buf
264  remains = link hash (name_len) + body_len
265  FSM = GotSymlink
266  state = Collect
267  Return 0
269  If S_ISREG(mode) || Not body_len Then read_into(name_buf, link hash (name_len), GotName)
271  Return 0