linuxgpio: typo in snprintf() format string

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

linuxgpio: typo in snprintf() format string

4ernov
Hello,

I've tried to use recent 6.3 version with linuxgpio programmer enabled
and have failed with it with messages like "Can't export GPIO 31,
already exported/busy?: Device or resource busy". But it have turned
out, that the problem is with the typo in format string used in
"snprintf()" calls to create gpio pin filename: it specifies "%ud" for
unsigned integer value instead of just "%u", that's why we have likes
"31d" names, which "/sys/class/gpio/export" refuses to export.

The patch is applied. Hope it's helpful.

Best regards,
Alexey Chernov

_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev

linuxgpio.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: linuxgpio: typo in snprintf() format string

Joerg Wunsch
Привет Алексей,

> But it have turned
> out, that the problem is with the typo in format string used in
> "snprintf()" calls to create gpio pin filename: it specifies "%ud" for
> unsigned integer value instead of just "%u"

This has already been reported before:

https://savannah.nongnu.org/bugs/index.php?47550

It's fixed in the current source tree, awaiting a new release.
--
cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)

_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev
Reply | Threaded
Open this post in threaded view
|

Re: linuxgpio: typo in snprintf() format string

4ernov
Oh, thank you for pointing out, I've tried to search for some similar
bug in the bugzilla before writing, but missed this one for some
reason. Sorry for disturbing)

2016-10-10 9:39 GMT+03:00 Joerg Wunsch <[hidden email]>:

> Привет Алексей,
>
>> But it have turned
>> out, that the problem is with the typo in format string used in
>> "snprintf()" calls to create gpio pin filename: it specifies "%ud" for
>> unsigned integer value instead of just "%u"
>
> This has already been reported before:
>
> https://savannah.nongnu.org/bugs/index.php?47550
>
> It's fixed in the current source tree, awaiting a new release.
> --
> cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL
>
> http://www.sax.de/~joerg/
> Never trust an operating system you don't have sources for. ;-)
>
> _______________________________________________
> avrdude-dev mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/avrdude-dev

_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev
Reply | Threaded
Open this post in threaded view
|

Re: linuxgpio: typo in snprintf() format string

Joerg Wunsch
As 4ernov wrote:

> Oh, thank you for pointing out, I've tried to search for some similar
> bug in the bugzilla before writing, but missed this one for some
> reason. Sorry for disturbing)

No problem.  Searching the closed bugs in order to see whether it's been
reported before is not quite an obvious thing to do in the Savannah UI.

I wrote a few words on top of the bug submission form suggesting how
to search for old, closed bugs.

Thanks for participating in AVRDUDE!
--
cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)

_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev