Squirre17 / Autokd

automate kernel exploit environment deploy
1 stars 0 forks source link

some way for disable info output #20

Closed Squirre17 closed 1 year ago

Squirre17 commented 1 year ago
int devfd = -1;

void write_to_dev(char *buf, i32 sz) {
    // ACT("write 0x%x byte to dev from buf %p", sz, (void *)buf);
    int r = write(devfd, buf, sz);
    if(r != sz)
        PANIC("write");
}

void read_from_dev(char *buf, i32 sz) {
    // ACT("read 0x%x byte from dev to buf %p", sz, (void *)buf);
    int r = read(devfd, buf, sz);
    if(r != sz)
        PANIC("read");
}
Squirre17 commented 1 year ago

user to comment it is the best way I think