summaryrefslogtreecommitdiffstats
path: root/isys/devices.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix off-by-one errors in read.Bill Nottingham2009-05-271-4/+4
| | | | | Only read in 63 bytes, to make sure we preserve any trailing NULs for end of string.
* Fix blank network device descriptions in the loader. (#501757)Bill Nottingham2009-05-201-0/+1
| | | | | | | This appears to be the source of the problem, and fixes the issue in brief testing. It is completely baffling to me why this would only manifest now; it's not like this code has changed since it was added.
* Check return value of asprintf() consistentlyDavid Cantrell2008-06-271-8/+26
| | | | | | | | | For instances where the asprintf() was ignored, wrap it in a test to check if it failed. If it failed, log a message and abort. There may be some instances where abort may not be what we want to do, however, we were ignoring the return value completely so if we did get a failure, it would just SIGSEGV. Now it will SIGABRT instead.
* Per strtol(3) man page, set errno=0 before call.David Cantrell2008-06-271-0/+3
| | | | | | | | | | From the NOTES section of strtol(3): "Since strtol() can legitimately return 0, LONG_MAX, or LONG_MIN (LLONG_MAX or LLONG_MIN for strtoll()) on both success and failure, the calling program should set errno to 0 before the call, and then determine if an error occurred by checking whether errno has a non-zero value after the call."
* Use strtol() instead of atoi()David Cantrell2008-06-261-2/+26
| | | | | | | Code cleanup patch. Use strtol() to convert strings to ints, rather than atoi(). No error checking capability with atoi(). Also add error handling to detect strtol failures.
* The units for /sys/block/foo/size aren't bytes. Fixes finding some disksJeremy Katz2008-03-201-1/+1
|
* Add the MAC address to the network device selection screen (#428229).Chris Lumens2008-01-161-1/+7
|
* Add some simple hardware probing code that uses sysfs.Bill Nottingham2007-12-201-0/+165
This is in isys because the EDD code needs it. Otherwise it would just be in the loader.