kernel.h (deb9bfbd5bcea70c79f70c7091c35d399b40fb0a) kernel.h (c427456fd560d6def83cd3867cc5bf01d20653e5)
1/*-
2 * Copyright (c) 2010 Isilon Systems, Inc.
3 * Copyright (c) 2010 iX Systems, Inc.
4 * Copyright (c) 2010 Panasas, Inc.
5 * Copyright (c) 2013-2016 Mellanox Technologies, Ltd.
6 * Copyright (c) 2014-2015 François Tigeot
7 * All rights reserved.
8 *

--- 452 unchanged lines hidden (view full) ---

461 if (*end == '\n')
462 end++;
463 if (*cp == 0 || *end != 0)
464 return (-EINVAL);
465 return (0);
466}
467
468static inline int
1/*-
2 * Copyright (c) 2010 Isilon Systems, Inc.
3 * Copyright (c) 2010 iX Systems, Inc.
4 * Copyright (c) 2010 Panasas, Inc.
5 * Copyright (c) 2013-2016 Mellanox Technologies, Ltd.
6 * Copyright (c) 2014-2015 François Tigeot
7 * All rights reserved.
8 *

--- 452 unchanged lines hidden (view full) ---

461 if (*end == '\n')
462 end++;
463 if (*cp == 0 || *end != 0)
464 return (-EINVAL);
465 return (0);
466}
467
468static inline int
469kstrtoull(const char *cp, unsigned int base, unsigned long long *res)
470{
471 return (kstrtou64(cp, base, (u64 *)res));
472}
473
474static inline int
469kstrtobool(const char *s, bool *res)
470{
471 int len;
472
473 if (s == NULL || (len = strlen(s)) == 0 || res == NULL)
474 return (-EINVAL);
475
476 /* skip newline character, if any */

--- 249 unchanged lines hidden ---
475kstrtobool(const char *s, bool *res)
476{
477 int len;
478
479 if (s == NULL || (len = strlen(s)) == 0 || res == NULL)
480 return (-EINVAL);
481
482 /* skip newline character, if any */

--- 249 unchanged lines hidden ---