Allow bytes to be removed from a custr
Add functions to libcustr to allow the remove of bytes from the beginning, end, and in the middle of a custr. We are using this for some SmartOS specific code, but they seem like they could be generally useful for other illumos-gate consumers (the libcustr library is still kept private) and we'd prefer to avoid any divergence from the upstream if we can avoid it.
This also adds the start of some libcustr tests as well.
Updated by Jason King over 2 years ago
For testing, I booted a BE with this change and ran the new custr tests that test the new functions as part of this change.
In addition, the EDAR (encrypted data at rest) project on SmartOS has been using these changes for several months without any problems.
Updated by Electric Monk over 2 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 356ce177517a15babb8fd801d490f239298643b7 Author: Jason King <email@example.com> Date: 2020-01-14T15:36:41.000Z 12178 Allow bytes to be removed from a custr Reviewed by: Toomas Soome <firstname.lastname@example.org> Reviewed by: Andy Fiddaman <email@example.com> Approved by: Gordon Ross <firstname.lastname@example.org>