Here is the environment cinfiguration: cpu - atom, sd card as bootabl… #704
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…e disk, loist of devices:
/sys/block/zram0
/sys/block/mmcblk0boot0
/sys/block/mmcblk0boot1
/sys/block/mmcblk2
/sys/block/mmcblk0
Hardinfo got nex pathes for reading for the report:
cat /sys/block/mmcblk0/device/oemid
0x0103
2) # cat /sys/block/mmcblk2/device/oemid
0x534d
3) # cat /sys/block/mmcblk0boot0/device/oemid
cat: /sys/block/mmcblk0boot0/device/oemid: No such file or directory 4) # cat /sys/block/mmcblk0boot1/device/oemid
cat: /sys/block/mmcblk0boot1/device/oemid: No such file or directory
In the code no checks if files from previous step for device was read and pointer not NULL:
gchar *oemid_path = g_strdup_printf("/sys/block/%s/device/oemid", e->d->block_dev); gchar *manfid_path = g_strdup_printf("/sys/block/%s/device/manfid", e->d->block_dev); gchar *oemid = NULL, *manfid = NULL;
g_file_get_contents(oemid_path, &oemid, NULL, NULL); g_file_get_contents(manfid_path, &manfid, NULL, NULL);
unsigned int id = strtol(oemid, NULL, 16);
...
id = strtol(manfid, NULL, 16);
Before srttol need check for NULL