Files
acrn-hypervisor/devicemodel/include
Conghui Chen e1dab512c2 dm: add string convert API
As function sscanf is banned, to get value from parameter buffer,strto*
is recommended. To reduce the inspection code when using strto*, it's
better to use a string convert API.

Usage:
    For virtio-blk, it has parameters:
        range=<start lba>/<subfile size>
    sscanf:
        if (sscanf(cp, "range=%ld/%ld", &sub_file_start_lba,
                &sub_file_size) == 2)
            sub_file_assign = 1;
    string API:
        if (strsep(&cp, "=") &&
                !dm_strtol(cp, &cp, 10, &sub_file_start_lba) &&
                *cp == '/' &&
                !dm_strtol(cp + 1, &cp, 10, &sub_file_size))
            sub_file_assign = 1;

Tracked-on: #1496
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
Reviewed-by: Shuo Liu <shuo.a.liu@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-10-17 16:22:00 +08:00
..
2018-08-02 13:14:03 +08:00
2018-05-11 14:44:28 +08:00
2018-05-11 14:44:28 +08:00
2018-05-11 14:44:28 +08:00
2018-10-17 16:22:00 +08:00
2018-05-11 14:44:28 +08:00
2018-05-16 15:09:48 +08:00
2018-09-12 09:18:44 +08:00
2018-05-11 14:44:28 +08:00
2018-05-11 14:44:28 +08:00
2018-05-11 14:44:28 +08:00
2018-10-09 13:24:47 +08:00
2018-05-11 14:44:28 +08:00
2018-05-11 14:44:28 +08:00
2018-05-11 14:44:28 +08:00
2018-05-11 14:44:28 +08:00
2018-05-11 14:44:28 +08:00
2018-06-07 16:11:49 +08:00
2018-05-11 14:44:28 +08:00
2018-05-11 14:44:28 +08:00
2018-10-09 13:24:47 +08:00
2018-08-02 13:14:03 +08:00
2018-05-25 10:45:24 +08:00
2018-08-16 09:42:20 +08:00
2018-05-11 14:44:28 +08:00
2018-05-11 14:44:28 +08:00
2018-05-11 14:44:28 +08:00
2018-10-17 14:32:33 +08:00
2018-05-11 14:44:28 +08:00
2018-10-09 13:24:47 +08:00
2018-05-15 17:25:55 +08:00
2018-05-11 14:44:28 +08:00
2018-09-27 16:53:30 +08:00
2018-10-15 09:04:10 +08:00