[systemd-devel] [PATCH 2/6] readahead-common:fs_on_ssd() stat might not get the real device name
kay.sievers at vrfy.org
Fri Sep 24 03:22:34 PDT 2010
On Fri, Sep 24, 2010 at 12:06, <harald at redhat.com> wrote:
> From: Harald Hoyer <harald at redhat.com>
> btrfs returns a major(0) for its device, so try to find the mountpoint and real device.
> + fp = fopen("/proc/self/mountinfo", "r");
> + if (fp == NULL)
> + return NULL;
> + while (fscanf(fp, "%*s %*s %i:%i %*s %1024s %*s %*s %*s %1024s %*[^\n]", &maj, &min, mp, dev)
Using device names from this file is not nice. I have just /dev/root
here. Shouldn't we just read the kernel commandline instead?
More information about the systemd-devel