b9874d0941
Add redbear-usb-storage-check in-guest binary that validates USB mass storage read and write I/O: discovers /scheme/disk/ devices, writes a test pattern to sector 2048, reads it back, verifies match, restores original content. Updates test-usb-storage-qemu.sh with write-proof verification step. Includes all accumulated Red Bear OS work: kernel patches, relibc patches, driver infrastructure, DRM/GPU, KDE recipes, firmware, validation tooling, build system hardening, and documentation.
14 lines
370 B
C
14 lines
370 B
C
#include <assert.h>
|
|
#include <wchar.h>
|
|
|
|
int main(void) {
|
|
wchar_t *haystack = L"Hello World!";
|
|
|
|
assert(wcschr(haystack, L'H') == haystack);
|
|
assert(wcschr(haystack, L'W') == &haystack[6]);
|
|
assert(wcschr(haystack, L'\0') == &haystack[12]); // the terminating nul is considered part of the string
|
|
assert(wcschr(haystack, L'X') == NULL);
|
|
|
|
return 0;
|
|
}
|