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
Misc fixes #152
Misc fixes #152
Conversation
cathay4t
commented
May 15, 2016
•
edited
edited
- Fix a bug introduced by PR Fix RHEL/Fedora mock build test failure. #150.
- Add new configure option to skip memory leak check test.
- Fix lsm_local_disk_vpd83_search() for RHEL/Fedora mock build.
@tasleson Sorry, we might need 1.3.2 release as I introduced a regression bug into 1.3.1. |
Found more issue on lsm_local_disk.c, fixing. |
New patch included for lsm_local_disk_vpd83_search() in RHEL/Fedora mock build. |
|
||
assert(path != NULL); | ||
|
||
fd = open(path, O_RDONLY); | ||
if (fd == -1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest changing this to:
if ( fd == -1 && errno == ENOENT)
so that we are examining errno
only when open returns an error, see:
http://www.gnu.org/software/libc/manual/html_node/Checking-for-Errors.html
for more information.
Problem: The lsm_local_disk_list() will not include any disks when running as non-root user. Root cause: The _file_exists() try to open disk path as read only which normally only failed on non-root user. Fix: Only indicate file not exist when got ENOENT error. Signed-off-by: Gris Ge <fge@redhat.com>
* New option '--without-mem-leak-test' to './configure' which could disable memory leak check. Signed-off-by: Gris Ge <fge@redhat.com>
Problem: RHEL/Fedora mock build will fail as lsm_local_disk_vpd83_search() failed to find provided disks. Root cause: '/dev' is not mounted in RHEL/Fedora mock build. The disk path list generated by _sysfs_get_all_sd_names() do not actually exist in /dev/ folder. Fix: Use lsm_local_disk_list() to enumerate local disks and remove unneeded function _sysfs_get_all_sd_names(). Signed-off-by: Gris Ge <fge@redhat.com>
Thank you for the note. Fixed. |
@cathay4t Thanks Gris! |