Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Convert a name into device number

Proto:dev_t name_to_dev_t(const char *name)

Type:dev_t

Parameter:

TypeParameterName
const char *name
227  res = 0
231  If strncmp(name, "PARTUUID=", 9) == 0 Then
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  If Not res Then Go to fail
236  Go to done
237  Else if strncmp(name, "PARTLABEL=", 10) == 0 Then
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  If Not dev Then Go to fail
245  res = dev_t, creates the sysfs "dev"
246  put_device(dev)
247  Go to done
251  If strncmp(name, "/dev/", 5) != 0 Then
257  res = MKDEV(maj, min)
258  If maj != MAJOR(res) || min != MINOR(res) Then Go to fail
260  Else
262  If p Then Go to fail
265  Go to done
268  name += 5
269  res = Root_NFS
270  If strcmp(name, "nfs") == 0 Then Go to done
272  res = Root_CIFS
273  If strcmp(name, "cifs") == 0 Then Go to done
275  res = Root_RAM0
276  If strcmp(name, "ram") == 0 Then Go to done
279  If strlen - Find the length of a string*@s: The string to be sized > 31 Then Go to fail
281  strcpy(s, name)
282  When p cycle If p == '/' Then
284  p = '!'
285  res = blk_lookup_devt(s, 0)
286  If res Then Go to done
293  When p > s && isdigit(p[ - 1]) cycle
294  p--
295  If p == s || Not p || p == '0' Then Go to fail
299  part = simple_strtoul - convert a string to an unsigned long*@cp: The start of the string*@endp: A pointer to the end of the parsed string will be placed here*@base: The number base to use* This function is obsolete. Please use kstrtoul instead.
300  p = '\0'
301  res = blk_lookup_devt(s, part)
302  If res Then Go to done
306  If p < s + 2 || Not isdigit(p[ - 2]) || p[ - 1] != 'p' Then Go to fail
308  p[ - 1] = '\0'
309  res = blk_lookup_devt(s, part)
310  If res Then Go to done
313  fail :
314  Return 0
315  done :
316  Return res
Caller
NameDescribe
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