Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1484268

Re: [PATCH v2] leds: Introduce userspace leds driver

From Jacek Anaszewski <j.anaszewski@samsung.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2] leds: Introduce userspace leds driver
Date 2016-09-15 17:00 +0200
Message-ID <shGiR-8jb-23@gated-at.bofh.it> (permalink)
References <sfcRY-1jO-23@gated-at.bofh.it> <sfoq5-8mW-5@gated-at.bofh.it> <shGiR-8jb-25@gated-at.bofh.it> <shEAp-7rV-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Pavel,

On 09/15/2016 03:01 PM, Pavel Machek wrote:
> Hi!
>
>>> @@ -0,0 +1,23 @@
>>> +/*
>>> + * Userspace driver support for leds subsystem
>>> + *
>>> + * This program is free software; you can redistribute it and/or modify
>>> + * it under the terms of the GNU General Public License as published by
>>> + * the Free Software Foundation; either version 2 of the License, or
>>> + * (at your option) any later version.
>>> + *
>>> + * This program is distributed in the hope that it will be useful,
>>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>>> + * GNU General Public License for more details.
>>> + */
>>> +#ifndef _UAPI__ULEDS_H_
>>> +#define _UAPI__ULEDS_H_
>>> +
>>> +#define ULEDS_MAX_NAME_SIZE	80
>>> +
>>> +struct uleds_user_dev {
>>> +	char name[ULEDS_MAX_NAME_SIZE];
>>> +};
>
> We already have path component length limit somewhere, right? Just use
> it?
>
> (And is struct with char array good idea at all? Perphaps it can just
> use write() length up to something reasonable, and not bother with new
> header file for userspace?)

In fact in this case the addition of another public header can be
avoided.

-- 
Best regards,
Jacek Anaszewski

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v2] leds: Introduce userspace leds driver Pavel Machek <pavel@ucw.cz> - 2016-09-15 15:10 +0200
  Re: [PATCH v2] leds: Introduce userspace leds driver Jacek Anaszewski <j.anaszewski@samsung.com> - 2016-09-15 17:00 +0200
    Re: [PATCH v2] leds: Introduce userspace leds driver David Lechner <david@lechnology.com> - 2016-09-15 17:30 +0200
      Re: [PATCH v2] leds: Introduce userspace leds driver Jacek Anaszewski <j.anaszewski@samsung.com> - 2016-09-16 09:10 +0200
    Re: [PATCH v2] leds: Introduce userspace leds driver David Lechner <david@lechnology.com> - 2016-09-15 18:20 +0200

csiph-web