--- trunk/src/devices/dev_random.c 2007/10/08 16:18:00 4 +++ trunk/src/devices/dev_random.c 2007/10/08 16:21:17 34 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2005 Anders Gavare. All rights reserved. + * Copyright (C) 2004-2007 Anders Gavare. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * - * $Id: dev_random.c,v 1.1 2005/02/25 06:14:30 debug Exp $ + * $Id: dev_random.c,v 1.7 2006/12/30 13:30:59 debug Exp $ * * A simple device which returns random data for all reads, and discards all * writes. @@ -41,17 +41,10 @@ #include "misc.h" -/* - * dev_random_access(): - * - * Returns 1 if ok, 0 on error. - */ -int dev_random_access(struct cpu *cpu, struct memory *mem, - uint64_t relative_addr, unsigned char *data, size_t len, - int writeflag, void *extra) +DEVICE_ACCESS(random) { if (writeflag == MEM_READ) { - int i; + unsigned int i; for (i=0; imachine->memory, devinit->name, devinit->addr, devinit->len, - dev_random_access, NULL, MEM_DEFAULT, NULL); + dev_random_access, NULL, DM_DEFAULT, NULL); return 1; }