On Wed, 7 Dec 2022, Mouse wrote:
case ATAIOCTRIM:
{ unsigned char rq[512];
struct ata_command cmd;
[...]
printf("TRIM %s: calling exec\n",device_xname(wd->sc_dev));
rv = wd->atabus->ata_exec_command(wd->drvp,&cmd);
printf("TRIM %s: returned %d\n",device_xname(wd->sc_dev),rv);
return(0);
}
break;
Ah, shouldn't `cmd' be allocated memory rather than being a locally-scoped variable? -RVP