* How inode of /proc. /sys keep the same number on a given system
@ 2017-11-08 18:22 Lev Olshvang
2017-11-08 18:59 ` valdis.kletnieks at vt.edu
0 siblings, 1 reply; 2+ messages in thread
From: Lev Olshvang @ 2017-11-08 18:22 UTC (permalink / raw)
To: kernelnewbies
Hello all,
I observe that between reboot inode of files in /proc and /sys filesystem keep the same number.
I need to know whether I can rely on this in my program, and under what conditions this assumption became incorrect?
Would inode number be the same on another system burned from the same image ?
I mean when I create 10 of embedded devices, will the inode /proc of same files same between all devices?
Best regards,
Lev
^ permalink raw reply [flat|nested] 2+ messages in thread
* How inode of /proc. /sys keep the same number on a given system
2017-11-08 18:22 How inode of /proc. /sys keep the same number on a given system Lev Olshvang
@ 2017-11-08 18:59 ` valdis.kletnieks at vt.edu
0 siblings, 0 replies; 2+ messages in thread
From: valdis.kletnieks at vt.edu @ 2017-11-08 18:59 UTC (permalink / raw)
To: kernelnewbies
On Wed, 08 Nov 2017 21:22:47 +0300, Lev Olshvang said:
> Hello all,
>
> I observe that between reboot inode of files in /proc and /sys filesystem keep the same number.
>
> I need to know whether I can rely on this in my program, and under what conditions this assumption became incorrect?
If anything *at all* changes. The machine reboots with a USB device plugged in. A race
condition during boot goes the other way for some reason. Daylight savings time has
changed. Phase of the moon (and yes, I did once find an *actual* 'phase of the moon' bug :)
Relying on "My important file always has inode 93423" is a bad way to do things - why are
you doing that rather than using the pathname like /sys/whatever/my/important/file ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 486 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20171108/cc6b339b/attachment.bin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-08 18:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-08 18:22 How inode of /proc. /sys keep the same number on a given system Lev Olshvang
2017-11-08 18:59 ` valdis.kletnieks at vt.edu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).