-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix return values attribute writes #2
Merged
lclausen-adi
merged 3 commits into
analogdevicesinc:master
from
gizero:fix-return-values-attribute-writes
Jul 30, 2014
Merged
Fix return values attribute writes #2
lclausen-adi
merged 3 commits into
analogdevicesinc:master
from
gizero:fix-return-values-attribute-writes
Jul 30, 2014
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
make these functions return 0 on success instead of the number of bytes written in accordance with the API
make these functions return 0 on success instead of the number of bytes written, in accordance with the API
make the functions return 0 on success instead of the number of bytes written, in accordance with the API
lclausen-adi
pushed a commit
that referenced
this pull request
Jul 30, 2014
Fix return values attribute writes
pcercuei
pushed a commit
that referenced
this pull request
Apr 15, 2016
Signed-off-by: Paul Cercueil <[email protected]>
Closed
rgetz
added a commit
that referenced
this pull request
Apr 3, 2020
CID 355432 (#2 of 2): Resource leak (RESOURCE_LEAK) 3. leaked_storage: Variable ddata going out of scope leaks the storage it points to. Ensure we free anything that was allocated Signed-off-by: Robin Getz <[email protected]>
rgetz
added a commit
that referenced
this pull request
Mar 3, 2022
rgetz
added a commit
that referenced
this pull request
Mar 7, 2022
rgetz
added a commit
that referenced
this pull request
Mar 8, 2022
rgetz
added a commit
to rgetz/libiio
that referenced
this pull request
Nov 10, 2023
In the past, we were only checking hostname, as a way to see if the network was ready, but unfortunately - that doesn't work. The kernel really only needs to have a hostname set for uname() to work, which is what glibc and uclibc implement in gethostname(). So - now we check there is a working, configured ethernet card, that supports mdns (ie. multicast) that is up before moving on to making sure there is a hostname. We also don't allow "none" or "(none)" to be the hostname until after things time out (3 min). This fixes analogdevicesinc#1072 and turns: 192.168.2.1:5353 : answer _iio._tcp.local. PTR "iiod on (none)._iio._tcp.local." rclass 0x1 ttl 10 length 17 into: 192.168.2.1:5353 : answer _iio._tcp.local. PTR "iiod on pluto._iio._tcp.local." rclass 0x1 ttl 10 length 16 and when you have multiple on network (with same name): 192.168.1.110:5353 : answer _iio._tcp.local. PTR "iiod on pluto._iio._tcp.local." rclass 0x1 ttl 10 length 16 192.168.1.110:5353 : answer pluto.local. A 192.168.1.110 192.168.1.115:5353 : answer _iio._tcp.local. PTR "iiod on pluto analogdevicesinc#2._iio._tcp.local." rclass 0x1 ttl 10 length 19 192.168.1.115:5353 : answer pluto-2.local. A 192.168.1.115 Signed-off-by: Robin Getz <[email protected]>
rgetz
added a commit
to rgetz/libiio
that referenced
this pull request
Nov 10, 2023
In the past, we were only checking hostname, as a way to see if the network was ready, but unfortunately - that doesn't work. The kernel really only needs to have a hostname set for uname() to work, which is what glibc and uclibc implement in gethostname(). So - now we check there is a working, configured ethernet card, that supports mdns (ie. multicast) that is up before moving on to making sure there is a hostname. We also don't allow "none" or "(none)" to be the hostname until after things time out (3 min). This fixes analogdevicesinc#1072 and turns: 192.168.2.1:5353 : answer _iio._tcp.local. PTR "iiod on (none)._iio._tcp.local." rclass 0x1 ttl 10 length 17 into: 192.168.2.1:5353 : answer _iio._tcp.local. PTR "iiod on pluto._iio._tcp.local." rclass 0x1 ttl 10 length 16 and when you have multiple on network (with same name): 192.168.1.110:5353 : answer _iio._tcp.local. PTR "iiod on pluto._iio._tcp.local." rclass 0x1 ttl 10 length 16 192.168.1.110:5353 : answer pluto.local. A 192.168.1.110 192.168.1.115:5353 : answer _iio._tcp.local. PTR "iiod on pluto analogdevicesinc#2._iio._tcp.local." rclass 0x1 ttl 10 length 19 192.168.1.115:5353 : answer pluto-2.local. A 192.168.1.115 Signed-off-by: Robin Getz <[email protected]>
rgetz
added a commit
to rgetz/libiio
that referenced
this pull request
Nov 10, 2023
In the past, we were only checking hostname, as a way to see if the network was ready, but unfortunately - that doesn't work. The kernel really only needs to have a hostname set for uname() to work, which is what glibc and uclibc implement in gethostname(). So - now we check there is a working, configured ethernet card, that supports mdns (ie. multicast) that is up before moving on to making sure there is a hostname. We also don't allow "none" or "(none)" to be the hostname until after things time out (3 min). This fixes analogdevicesinc#1072 and turns: 192.168.2.1:5353 : answer _iio._tcp.local. PTR "iiod on (none)._iio._tcp.local." rclass 0x1 ttl 10 length 17 into: 192.168.2.1:5353 : answer _iio._tcp.local. PTR "iiod on pluto._iio._tcp.local." rclass 0x1 ttl 10 length 16 and when you have multiple on network (with same name): 192.168.1.110:5353 : answer _iio._tcp.local. PTR "iiod on pluto._iio._tcp.local." rclass 0x1 ttl 10 length 16 192.168.1.110:5353 : answer pluto.local. A 192.168.1.110 192.168.1.115:5353 : answer _iio._tcp.local. PTR "iiod on pluto analogdevicesinc#2._iio._tcp.local." rclass 0x1 ttl 10 length 19 192.168.1.115:5353 : answer pluto-2.local. A 192.168.1.115 Signed-off-by: Robin Getz <[email protected]>
pcercuei
pushed a commit
that referenced
this pull request
Nov 13, 2023
In the past, we were only checking hostname, as a way to see if the network was ready, but unfortunately - that doesn't work. The kernel really only needs to have a hostname set for uname() to work, which is what glibc and uclibc implement in gethostname(). So - now we check there is a working, configured ethernet card, that supports mdns (ie. multicast) that is up before moving on to making sure there is a hostname. We also don't allow "none" or "(none)" to be the hostname until after things time out (3 min). This fixes #1072 and turns: 192.168.2.1:5353 : answer _iio._tcp.local. PTR "iiod on (none)._iio._tcp.local." rclass 0x1 ttl 10 length 17 into: 192.168.2.1:5353 : answer _iio._tcp.local. PTR "iiod on pluto._iio._tcp.local." rclass 0x1 ttl 10 length 16 and when you have multiple on network (with same name): 192.168.1.110:5353 : answer _iio._tcp.local. PTR "iiod on pluto._iio._tcp.local." rclass 0x1 ttl 10 length 16 192.168.1.110:5353 : answer pluto.local. A 192.168.1.110 192.168.1.115:5353 : answer _iio._tcp.local. PTR "iiod on pluto #2._iio._tcp.local." rclass 0x1 ttl 10 length 19 192.168.1.115:5353 : answer pluto-2.local. A 192.168.1.115 Signed-off-by: Robin Getz <[email protected]>
pcercuei
pushed a commit
that referenced
this pull request
Nov 13, 2023
In the past, we were only checking hostname, as a way to see if the network was ready, but unfortunately - that doesn't work. The kernel really only needs to have a hostname set for uname() to work, which is what glibc and uclibc implement in gethostname(). So - now we check there is a working, configured ethernet card, that supports mdns (ie. multicast) that is up before moving on to making sure there is a hostname. We also don't allow "none" or "(none)" to be the hostname until after things time out (3 min). This fixes #1072 and turns: 192.168.2.1:5353 : answer _iio._tcp.local. PTR "iiod on (none)._iio._tcp.local." rclass 0x1 ttl 10 length 17 into: 192.168.2.1:5353 : answer _iio._tcp.local. PTR "iiod on pluto._iio._tcp.local." rclass 0x1 ttl 10 length 16 and when you have multiple on network (with same name): 192.168.1.110:5353 : answer _iio._tcp.local. PTR "iiod on pluto._iio._tcp.local." rclass 0x1 ttl 10 length 16 192.168.1.110:5353 : answer pluto.local. A 192.168.1.110 192.168.1.115:5353 : answer _iio._tcp.local. PTR "iiod on pluto #2._iio._tcp.local." rclass 0x1 ttl 10 length 19 192.168.1.115:5353 : answer pluto-2.local. A 192.168.1.115 Signed-off-by: Robin Getz <[email protected]> [pcercuei: change %d to %ld in print format string] Signed-off-by: Paul Cercueil <[email protected]>
pcercuei
pushed a commit
that referenced
this pull request
Nov 13, 2023
In the past, we were only checking hostname, as a way to see if the network was ready, but unfortunately - that doesn't work. The kernel really only needs to have a hostname set for uname() to work, which is what glibc and uclibc implement in gethostname(). So - now we check there is a working, configured ethernet card, that supports mdns (ie. multicast) that is up before moving on to making sure there is a hostname. We also don't allow "none" or "(none)" to be the hostname until after things time out (3 min). This fixes #1072 and turns: 192.168.2.1:5353 : answer _iio._tcp.local. PTR "iiod on (none)._iio._tcp.local." rclass 0x1 ttl 10 length 17 into: 192.168.2.1:5353 : answer _iio._tcp.local. PTR "iiod on pluto._iio._tcp.local." rclass 0x1 ttl 10 length 16 and when you have multiple on network (with same name): 192.168.1.110:5353 : answer _iio._tcp.local. PTR "iiod on pluto._iio._tcp.local." rclass 0x1 ttl 10 length 16 192.168.1.110:5353 : answer pluto.local. A 192.168.1.110 192.168.1.115:5353 : answer _iio._tcp.local. PTR "iiod on pluto #2._iio._tcp.local." rclass 0x1 ttl 10 length 19 192.168.1.115:5353 : answer pluto-2.local. A 192.168.1.115 Signed-off-by: Robin Getz <[email protected]> [pcercuei: change %d to %ld in print format string] Signed-off-by: Paul Cercueil <[email protected]>
SRaus
pushed a commit
that referenced
this pull request
Feb 27, 2024
In the past, we were only checking hostname, as a way to see if the network was ready, but unfortunately - that doesn't work. The kernel really only needs to have a hostname set for uname() to work, which is what glibc and uclibc implement in gethostname(). So - now we check there is a working, configured ethernet card, that supports mdns (ie. multicast) that is up before moving on to making sure there is a hostname. We also don't allow "none" or "(none)" to be the hostname until after things time out (3 min). This fixes #1072 and turns: 192.168.2.1:5353 : answer _iio._tcp.local. PTR "iiod on (none)._iio._tcp.local." rclass 0x1 ttl 10 length 17 into: 192.168.2.1:5353 : answer _iio._tcp.local. PTR "iiod on pluto._iio._tcp.local." rclass 0x1 ttl 10 length 16 and when you have multiple on network (with same name): 192.168.1.110:5353 : answer _iio._tcp.local. PTR "iiod on pluto._iio._tcp.local." rclass 0x1 ttl 10 length 16 192.168.1.110:5353 : answer pluto.local. A 192.168.1.110 192.168.1.115:5353 : answer _iio._tcp.local. PTR "iiod on pluto #2._iio._tcp.local." rclass 0x1 ttl 10 length 19 192.168.1.115:5353 : answer pluto-2.local. A 192.168.1.115 Signed-off-by: Robin Getz <[email protected]> [pcercuei: change %d to %ld in print format string] Signed-off-by: Paul Cercueil <[email protected]> (cherry picked from commit 38483f3)
SRaus
pushed a commit
that referenced
this pull request
Feb 28, 2024
In the past, we were only checking hostname, as a way to see if the network was ready, but unfortunately - that doesn't work. The kernel really only needs to have a hostname set for uname() to work, which is what glibc and uclibc implement in gethostname(). So - now we check there is a working, configured ethernet card, that supports mdns (ie. multicast) that is up before moving on to making sure there is a hostname. We also don't allow "none" or "(none)" to be the hostname until after things time out (3 min). This fixes #1072 and turns: 192.168.2.1:5353 : answer _iio._tcp.local. PTR "iiod on (none)._iio._tcp.local." rclass 0x1 ttl 10 length 17 into: 192.168.2.1:5353 : answer _iio._tcp.local. PTR "iiod on pluto._iio._tcp.local." rclass 0x1 ttl 10 length 16 and when you have multiple on network (with same name): 192.168.1.110:5353 : answer _iio._tcp.local. PTR "iiod on pluto._iio._tcp.local." rclass 0x1 ttl 10 length 16 192.168.1.110:5353 : answer pluto.local. A 192.168.1.110 192.168.1.115:5353 : answer _iio._tcp.local. PTR "iiod on pluto #2._iio._tcp.local." rclass 0x1 ttl 10 length 19 192.168.1.115:5353 : answer pluto-2.local. A 192.168.1.115 Signed-off-by: Robin Getz <[email protected]> [pcercuei: change %d to %ld in print format string] Signed-off-by: Paul Cercueil <[email protected]> (cherry picked from commit 38483f3)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patchset makes a bunch of functions compliant with their interface as defined in iio.h. Those functions are supposed to return 0 on success, while their current implementation returns the number of bytes written instead.
The patch was verified against a previously failing scenario which uses iio_device_attr_write_longlong() only, but the same resolution should apply cleanly to all other affected functions.
Patches to different families of functions has been kept separate for clarity. Feel free to squash them down if this is more convenient for the repository commit policy.