Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1209704
| From | Rasmus Villemoes <linux@rasmusvillemoes.dk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] devpts: allow mounting with uid/gid of uint32_t |
| Date | 2015-08-19 10:40 +0200 |
| Message-ID | <pZ74B-C4-9@gated-at.bofh.it> (permalink) |
| References | <pYQds-BV-11@gated-at.bofh.it> <pYQQb-1B4-23@gated-at.bofh.it> <pYYNI-5lR-7@gated-at.bofh.it> <pZ5YS-7t4-1@gated-at.bofh.it> <pZ6id-7RI-7@gated-at.bofh.it> |
| Organization | D03 |
On Wed, Aug 19 2015, Andrew Morton <akpm@linux-foundation.org> wrote:
>
> whoa, wait, I was looking at the -mm tree which changes kstrtouint():
>
> static inline int __must_check kstrtouint(const char *s, unsigned int base, unsigned int *res)
> {
> return parse_integer(s, base | PARSE_INTEGER_NEWLINE, res);
> }
>
> and
>
> * Return number of characters parsed or -E.
> ...
> */
> #define parse_integer(s, base, val) \
>
>
> Alexey, doesn't this mean that code which does
>
> if (kstrtouint(...))
> return -EFOO;
>
> will break?
No, because PARSE_INTEGER_NEWLINE means more than just accepting a
trailing newline. It also requires the entire string to be consumed, and
changes the return semantics.
I suggested splitting those three things into separate flags and letting
PARSE_INTEGER_KSTRTOX be a shorthand for those.
<http://thread.gmane.org/gmane.linux.kernel/1949066/focus=1949239>
Rasmus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] devpts: allow mounting with uid/gid of uint32_t Dongsu Park <dpark@posteo.net> - 2015-08-18 16:40 +0200
[PATCH v2] devpts: allow mounting with uid/gid of uint32_t Dongsu Park <dpark@posteo.net> - 2015-08-18 17:20 +0200
Re: [PATCH v2] devpts: allow mounting with uid/gid of uint32_t Andrew Morton <akpm@linux-foundation.org> - 2015-08-19 01:50 +0200
Re: [PATCH v2] devpts: allow mounting with uid/gid of uint32_t Dongsu Park <dpark@posteo.net> - 2015-08-19 09:30 +0200
Re: [PATCH v2] devpts: allow mounting with uid/gid of uint32_t Andrew Morton <akpm@linux-foundation.org> - 2015-08-19 09:50 +0200
Re: [PATCH v2] devpts: allow mounting with uid/gid of uint32_t Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2015-08-19 10:40 +0200
Re: [PATCH v2] devpts: allow mounting with uid/gid of uint32_t Alexey Dobriyan <adobriyan@gmail.com> - 2015-08-19 12:50 +0200
Re: [PATCH v2] devpts: allow mounting with uid/gid of uint32_t Peter Hurley <peter@hurleysoftware.com> - 2015-08-28 21:40 +0200
Re: [PATCH v2] devpts: allow mounting with uid/gid of uint32_t Dongsu Park <dpark@posteo.net> - 2015-08-29 13:00 +0200
Re: [PATCH v2] devpts: allow mounting with uid/gid of uint32_t Alexey Dobriyan <adobriyan@gmail.com> - 2015-08-29 23:50 +0200
csiph-web