init/do_mounts.c : try_name()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm quite curious over where read() & open() are defined, as no FS is
yet mounted there can be no fs specific read() & open() right?
Are they wrappers for do_read or sys_read? I couldn't find them at least
(yes I have lxr'ed).

Thanks,
Alex


static dev_t __init try_name(char *name, int part)
56 {
57         char path[64];
58         char buf[32];
59         int range;
60         dev_t res;
61         char *s;
62         int len;
63         int fd;
64         unsigned int maj, min;
65
66         /* read device number from .../dev */
67
68         sprintf(path, "/sys/block/%s/dev", name);
69         fd = open(path, 0, 0);
70         if (fd < 0)
71                 goto fail;
72         len = read(fd, buf, 32);
73         close(fd);


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux