All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: "Toralf Förster" <toralf.foerster@gmx.de>,
	"Linux Kernel" <linux-kernel@vger.kernel.org>
Subject: Re: file name changes between reboots : /sys/class/hwmon/hwmon[0->1]/temp1_input
Date: Mon, 02 Feb 2015 09:32:42 +0100	[thread overview]
Message-ID: <54CF362A.5050909@ladisch.de> (raw)
In-Reply-To: <54CB80E9.4030408@gmx.de>

Toralf Förster wrote:
> I'm wondering where to blame a nagging issue with these file names :
>
> # ls -l /sys/class/hwmon/hwmon?/temp?_input
> -r--r--r-- 1 root root 4096 Jan 30 13:57 /sys/class/hwmon/hwmon1/temp1_input
> -r--r--r-- 1 root root 4096 Jan 30 13:57 /sys/class/hwmon/hwmon2/temp1_input
> -r--r--r-- 1 root root 4096 Jan 30 13:57 /sys/class/hwmon/hwmon2/temp2_input
> -r--r--r-- 1 root root 4096 Jan 30 13:57 /sys/class/hwmon/hwmon2/temp3_input
>
> It appears sometimes after a reboot / new minor stable kernel that the first file name is found in hwmon0 instead of hwmon1.

Those numbers get assigned in the order in which the drivers get
attached, which is essentially random.

You have to use the permanent device path, which isn't as easy.  Run
something like this to find it:

  find /sys -name 'temp*_input'


Regards,
Clemens

      reply	other threads:[~2015-02-02  8:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-30 13:02 file name changes between reboots : /sys/class/hwmon/hwmon[0->1]/temp1_input Toralf Förster
2015-02-02  8:32 ` Clemens Ladisch [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54CF362A.5050909@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=toralf.foerster@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.