1

I've been writing a Linux device driver for some measurement devices I'm attaching to my Raspberry Pi. I've created my kernel module and an application to access the character device driver, but the device needs to be calibrated regularly and I need to store the calibration data somewhere. Where is that data usually stored? My best guess is /etc, but I'd like to hear from someone who knows more about this than I do.

1 Answer 1

2

Per the Filesystem Hierarchy Standard, /var/lib/ might be the right place:

This hierarchy holds state information pertaining to an application or the system. State information is data that programs modify while they run, and that pertains to one specific host. Users must never need to modify files in /var/lib to configure a package's operation.

State information is generally used to preserve the condition of an application (or a group of inter-related applications) between invocations and between different instances of the same application. State information should generally remain valid after a reboot, should not be logging output, and should not be spooled data.

/etc isn't right for calibration data, since /etc should be able to be mounted read-only.

1
  • Haha, well, I'm glad I asked! Commented Sep 2, 2015 at 19:21

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.