From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933046AbbBBIgS (ORCPT ); Mon, 2 Feb 2015 03:36:18 -0500 Received: from smtprelay04.ispgateway.de ([80.67.18.16]:54199 "EHLO smtprelay04.ispgateway.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752333AbbBBIgP (ORCPT ); Mon, 2 Feb 2015 03:36:15 -0500 Message-ID: <54CF362A.5050909@ladisch.de> Date: Mon, 02 Feb 2015 09:32:42 +0100 From: Clemens Ladisch User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: =?UTF-8?B?VG9yYWxmIEbDtnJzdGVy?= , Linux Kernel Subject: Re: file name changes between reboots : /sys/class/hwmon/hwmon[0->1]/temp1_input References: <54CB80E9.4030408@gmx.de> In-Reply-To: <54CB80E9.4030408@gmx.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Df-Sender: bGludXgta2VybmVsQGNsLmRvbWFpbmZhY3Rvcnkta3VuZGUuZGU= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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