Systemd/src/udev/mtd_probe
Lennart Poettering 41b9d436b2 mtd: some basic code cleanups
While looking at our exit() invocations I noticed that the mtd_probe
stuff uses 'exit(-1)' at various places, which is not really a good
idea, as exit codes of processes on Linux are supposed to be in the
range of 0…255.

This patch cleans that up a bit, and fixes a number of other things:

1. Let's always let main() exit, nothing intermediary. We generally
   don't like code that invokes exit() on its own.

2. Close the file descriptors opened.

3. Some logging for errors is added, mostly on debug level.

Please review this with extra care. As I don't have the right hardware
to test this patch I only did superficial testing.
2018-05-10 11:02:33 -07:00
..
mtd_probe.c mtd: some basic code cleanups 2018-05-10 11:02:33 -07:00
mtd_probe.h mtd: some basic code cleanups 2018-05-10 11:02:33 -07:00
probe_smartmedia.c mtd: some basic code cleanups 2018-05-10 11:02:33 -07:00