Skip to content
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

Merged
merged 3 commits into from May 17, 2016
Merged

Misc fixes #152

merged 3 commits into from May 17, 2016

Conversation

cathay4t
Copy link
Contributor

@cathay4t cathay4t commented May 15, 2016

@cathay4t
Copy link
Contributor Author

@tasleson Sorry, we might need 1.3.2 release as I introduced a regression bug into 1.3.1.

@cathay4t
Copy link
Contributor Author

Found more issue on lsm_local_disk.c, fixing.

@cathay4t
Copy link
Contributor Author

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) {
Copy link
Member

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>
@cathay4t
Copy link
Contributor Author

Thank you for the note.

Fixed.

@tasleson tasleson merged commit a1eba0d into libstorage:master May 17, 2016
@tasleson
Copy link
Member

@cathay4t Thanks Gris!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants