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.
21 lines
548 B
C
21 lines
548 B
C
#include <string.h>
|
|
#include <stdio.h>
|
|
|
|
#include "test_helpers.h"
|
|
|
|
int main(void) {
|
|
char* source = "The quick drawn fix jumps over the lazy bug";
|
|
|
|
// should be "The quick drawn fix jumps over the lazy bug"
|
|
char* res1 = strpbrk(source, "From The Very Beginning");
|
|
printf("%s\n", (res1) ? res1 : "NULL");
|
|
|
|
// should be "lazy bug"
|
|
char* res2 = strpbrk(source, "lzbg");
|
|
printf("%s\n", (res2) ? res2 : "NULL");
|
|
|
|
// should be "NULL"
|
|
char* res3 = strpbrk(source, "404");
|
|
printf("%s\n", (res3) ? res3 : "NULL");
|
|
}
|