Hello, Last night I spent some time with a confussion that maybe it can be avoided (or maybe not).
Let's say that a module calls grub_file_open and it fails (file doesn't exist or whatever). grub_errno is setted up. This module is not resetting grub_errno and makes another call to grub_file_open with a valid file. But grub_file_open does: ------ device_name = grub_file_get_device_name (name); if (grub_errno) return 0; ------ (without resetting grub_errno before or in grub_file_get_device_name) So caling grub_file_open with an invalid file name and then with valid one returns error two times. I was expecting the library functions to setup errno if there is some error. But not that the functions behaves different in function of the previous errno. Mainly because this can cause some strange effects changing the code (adding some call before that changes errno and the user is not resetting) I would reset errno at beginning of grub_file_open, and other places. I've search some documentation about the errno standard without succeeding, I'm sure that here there is people who is more familiar with it. -- Carles Pina i Estany http://pinux.info _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel