This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

termios patch


The attached patch fixes tcflush() and tcdrain() in the termios package. These functions would call the fo_getinfo() function of the file system code with a 0 length (the length value is unused). The fo_getinfo() code in devfs.cxx would then convert this into a non-NULL pointer to a value of 0 when calling cyg_io_get_config(). This combination (non-NULL pointer to 0 value) is a special case in cyg_io_get_config() used to determine if the get_config method is available for the device. It always returns success (ENOERR) when the method is defined and does nothing.

By changing the length value passed to the fo_getinfo() function to a non-zero value, this avoids this.

Jay

Attachment: termios.pat
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]