函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:init\do_mounts.c Create Date:2022-07-27 15:19:23
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Convert a name into device number

函数原型:dev_t name_to_dev_t(const char *name)

返回类型:dev_t

参数:

类型参数名称
const char *name
227  res等于0
231  如果字符串指定长度比较恒等于0则
232  name加等于9
233  res等于devt_from_partuuid - looks up the dev_t of a partition by its UUID*@uuid_str: char array containing ascii UUID* The function will return the first partition which contains a matching* UUID value in its partition_meta_info struct. This does not search
234  如果非res则转到:fail
236  转到:done
237  否则如果字符串指定长度比较恒等于0则
240  dev等于class_find_device( & block_class, NULL, name + 10, & match_dev_by_label - callback for finding a partition using its label*@dev: device passed in by the caller*@data: opaque pointer to the label to match* Returns 1 if the device matches, and 0 otherwise.)
242  如果非dev则转到:fail
245  res等于 dev_t, creates the sysfs "dev"
246  put_device(dev)
247  转到:done
251  如果字符串指定长度比较不等于0则
257  res等于MKDEV(maj, min)
258  如果maj不等于MAJOR(res)或min不等于MINOR(res)则转到:fail
260  否则
262  如果p则转到:fail
265  转到:done
268  name加等于5
269  res等于Root_NFS
270  如果字符串比较恒等于0则转到:done
272  res等于Root_CIFS
273  如果字符串比较恒等于0则转到:done
275  res等于Root_RAM0
276  如果字符串比较恒等于0则转到:done
279  如果strlen - Find the length of a string*@s: The string to be sized大于31则转到:fail
281  strcpy(s, name)
282 p循环如果p恒等于'/'则
284  p等于'!'
285  res等于blk_lookup_devt(s, 0)
286  如果res则转到:done
293 p大于sisdigit(p[ - 1])循环
294  p自减
295  如果p恒等于s或非pp恒等于'0'则转到:fail
299  part等于转换字符串为无符号整形
300  p等于'\0'
301  res等于blk_lookup_devt(s, part)
302  如果res则转到:done
306  如果p小于s加2或非是数字p[ - 1]不等于'p'则转到:fail
308  p[ - 1]等于'\0'
309  res等于blk_lookup_devt(s, part)
310  如果res则转到:done
313  fail :
314  返回:0
315  done :
316  返回:res
调用者
名称描述
software_resumesoftware_resume - Resume from a saved hibernation image.* This routine is called as a late initcall, when all devices have been* discovered and initialized already.* The image reading code is called to see if there is a hibernation image
resume_store
prepare_namespacePrepare the namespace - decide what/where to mount, load ramdisks, etc.
md_setup_drive