函数源码

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source File:lib\kstrtox.c Create Date:2022-07-27 07:23:36
首页 Copyright©Brick

277
278
279
280
281
282
283
284
285
286
287
288
289
int kstrtos16(const char *s, unsigned int base, s16 *res)
{
    long long tmp;
    int rv;
 
    rv = kstrtoll(s, base, &tmp);
    if (rv < 0)
        return rv;
    if (tmp != (s16)tmp)
        return -ERANGE;
    *res = tmp;
    return 0;
}