In reference to the message sent by Andrzej Pietrasiewicz
(about libusbg (formerly libgadget)) I would like to propose
some changes to libusbg.
Creating directories is now performed after successful memory
allocation and gadget function creation. Hard coded values are
replaced with constants. Error handling added to functions that
operates on strings.
Changes since v6:
- add error handling for fprintf()
- change error handling for fputs()
Changes since v5:
- replace MAX_PATH_LENGTH with USBG_MAX_PATH_LENGTH and
MAX_LENGTH with USBG_MAX_STR_LENGTH
- add USBG_MAX_NAME_LENGTH
Changes since v4:
- fix commit messages
Changes since v3:
- changes are now in four separate files
- fix code indentation
Changes since v2:
- fix code indentation
- remove unused variable ret
Changes since v1:
- fix typos in MAX_LENGTH throughout
Stanislaw Wadas (4):
libusbg: Replace array lengths with defines
libusbg: Add fputs()/fgets() error handling
libusbg: Move mkdir functions
libusbg: Add inline to gadget_write_string().
include/usbg/usbg.h | 36 ++++++++++---------
src/usbg.c | 100 +++++++++++++++++++++++++++++----------------------
2 files changed, 77 insertions(+), 59 deletions(-)
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html