diff options
author | Alexey Berezhok <bayrepo.info@gmail.com> | 2023-10-13 21:40:11 +0300 |
---|---|---|
committer | L. Pereira <l@tia.mat.br> | 2023-10-13 12:28:28 -0700 |
commit | 01c8928ef55bc2f11bb76401f89c34e0539e6879 (patch) | |
tree | 025d9e74e88fbaa962fe42423aa18265df8c5b54 /pixmaps/devel.png | |
parent | 5996cebeeffad869f3c1bc79dacb87e2ec4d390f (diff) |
Here is the environment cinfiguration: cpu - atom, sd card as bootable 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:
1) # 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
Diffstat (limited to 'pixmaps/devel.png')
0 files changed, 0 insertions, 0 deletions